Home » openjdk-7 » javax » swing » tree » [javadoc | source]
javax.swing.tree
public interface: TreeNode [javadoc | source]

All Known Implementing Classes:
    FHTreeStateNode, IconNode, BidiRootElement, BidiElement, DefaultMutableTreeNode, BranchElement, TreeStateNode, AbstractElement, DynamicUtilTreeNode, MutableTreeNode, ChecklistNode, FileNode, LeafElement

Defines the requirements for an object that can be used as a tree node in a JTree.

Implementations of TreeNode that override equals will typically need to override hashCode as well. Refer to javax.swing.tree.TreeModel for more information. For further information and examples of using tree nodes, see How to Use Tree Nodes in The Java Tutorial.

Method from javax.swing.tree.TreeNode Summary:
children,   getAllowsChildren,   getChildAt,   getChildCount,   getIndex,   getParent,   isLeaf
Method from javax.swing.tree.TreeNode Detail:
 public Enumeration children()
    Returns the children of the receiver as an Enumeration.
 public boolean getAllowsChildren()
    Returns true if the receiver allows children.
 public TreeNode getChildAt(int childIndex)
    Returns the child TreeNode at index childIndex.
 public int getChildCount()
    Returns the number of children TreeNodes the receiver contains.
 public int getIndex(TreeNode node)
    Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.
 public TreeNode getParent()
    Returns the parent TreeNode of the receiver.
 public boolean isLeaf()
    Returns true if the receiver is a leaf.