charvax.swing.tree
Interface TreeNode

All Known Subinterfaces:
MutableTreeNode
All Known Implementing Classes:
DefaultMutableTreeNode

public interface TreeNode

This interface defines the requirements for an object that can be used as a node in a JTree.


Method Summary
 java.util.Enumeration children()
          Returns the children of the receiver as an Enumeration.
 boolean getAllowsChildren()
          Returns true if this TreeNode allows children.
 TreeNode getChildAt(int childIndex)
          Returns the child TreeNode at index childIndex.
 int getChildCount()
          Returns the number of children TreeNodes the TreeNode contains.
 TreeNode getParent()
          Returns the parent TreeNode of this TreeNode.
 boolean isLeaf()
          Returns true if this TreeNode is a leaf.
 

Method Detail

getChildAt

public TreeNode getChildAt(int childIndex)
Returns the child TreeNode at index childIndex.


getChildCount

public int getChildCount()
Returns the number of children TreeNodes the TreeNode contains.


getParent

public TreeNode getParent()
Returns the parent TreeNode of this TreeNode.


getAllowsChildren

public boolean getAllowsChildren()
Returns true if this TreeNode allows children.


isLeaf

public boolean isLeaf()
Returns true if this TreeNode is a leaf.


children

public java.util.Enumeration children()
Returns the children of the receiver as an Enumeration.