to.etc.domui.component.tree
Interface ITreeNode<T extends ITreeNode<T>>

All Known Implementing Classes:
AbstractTreeNodeBase

public interface ITreeNode<T extends ITreeNode<T>>

Can be used to implement whatever's needed for a ITreeModel.

Author:
Frits Jalvingh Created on Oct 17, 2008

Method Summary
 T getChild(int index)
          Returns the nth child in the parent's list.
 int getChildCount()
          Returns the #of children for this object.
 T getParent()
           
 boolean hasChildren()
          If possible this should quickly decide if this node has children or not.
 

Method Detail

hasChildren

boolean hasChildren()
                    throws java.lang.Exception
If possible this should quickly decide if this node has children or not. This is used to render an expanded node's state icons. If determining whether a node has children is an expensive option this method should return TRUE always; this causes the state icon to display as if children are available and the user has the possibility to expand that node. At that time we'll call getChildCount() which must determine the #of children. If that returns zero it will at that time properly re-render the state of the node, showing that the node is actually a leaf and cannot be expanded further.

Parameters:
item -
Returns:
Throws:
java.lang.Exception

getChildCount

int getChildCount()
                  throws java.lang.Exception
Returns the #of children for this object. This must return the actual number.

Parameters:
item -
Returns:
Throws:
java.lang.Exception

getChild

T getChild(int index)
                                throws java.lang.Exception
Returns the nth child in the parent's list.

Parameters:
parent -
index -
Returns:
Throws:
java.lang.Exception

getParent

T getParent()
                                 throws java.lang.Exception
Throws:
java.lang.Exception