FileDocCategorySizeDatePackage
TreeNode.javaAPI DocJava SE 6 API1773Tue Jun 10 00:27:02 BST 2008javax.swing.tree

TreeNode

public interface TreeNode
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 {@link 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.

version
1.25 11/17/05
author
Rob Davis
author
Scott Violet

Fields Summary
Constructors Summary
Methods Summary
public java.util.Enumerationchildren()
Returns the children of the receiver as an Enumeration.

public booleangetAllowsChildren()
Returns true if the receiver allows children.

public javax.swing.tree.TreeNodegetChildAt(int childIndex)
Returns the child TreeNode at index childIndex.

public intgetChildCount()
Returns the number of children TreeNodes the receiver contains.

public intgetIndex(javax.swing.tree.TreeNode node)
Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.

public javax.swing.tree.TreeNodegetParent()
Returns the parent TreeNode of the receiver.

public booleanisLeaf()
Returns true if the receiver is a leaf.