ITreeElement Interface

com.bea.ide.element
ITreeElement Interface

public interface ITreeElement

    extends IElement

This class is an extension of IElement that adds structure so that trees of elements may be constructed. Although called ITreeElement, the methods really allow a fairly arbitrary relationship to be defined. There is no semantic rule imposed on the structure by the interface. It could actually be a Graph, DAG or Linked list.


All Known Implementing Classes
DefaultTreeElement, DefaultDocumentElement, ControlVariable, ControlMethod, DefaultSourceElement
All Superinterfaces
IElement
All Known Subinterfaces

IDocumentElement, IDOMSourceElement, ILinkedElement, ISourceElement

Method Summary

public Enumeration
children()
Alternate means to obtain the children of this element.
public ITreeElement
getChild(int iChild)
Returns the nth child of this node.
public int
getChildCount()
Returns the total number of children for this element.
public ITreeElement
getParent()
Returns the parent of this node in the element structure.
 
Methods from interface com.bea.ide.element.IElement
getProperty, getPropertyDescriptors, setProperty
   

Method Detail

children() Method

public Enumeration children()
Alternate means to obtain the children of this element. Same rules apply as above. Note that the Enumeration returned may be invalidated by operations that modify the tree structure of this element.

Returns

Java enumeration that enumerates the children of this element

getChild(int) Method

public ITreeElement getChild(int iChild)
Returns the nth child of this node. The nth child should be well defined and calls to this method with the same value for iChild should return the same result as long as no changes are made to the tree.

Parameters

iChild
index of the child node to return

Returns

tree element that occupies the specified index in this node's list of descendants

getChildCount() Method

public int getChildCount()
Returns the total number of children for this element. This value should not change if there are no changes to the tree. getChild should return values for indices 0 through i-1 where i is the result of this method.

Returns

number of tree elements that are direct descendants of this node

getParent() Method

public ITreeElement getParent()
Returns the parent of this node in the element structure. The parent will typically have this node in it's list of children. However, if there are multiple parents, the value is implementation defined.

Returns

The parent element of this one or null if there is no parent.