javax.swing.tree.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 TreeModel
for more information.
For further information and examples of using tree nodes,
see How to Use Tree Nodes
in The Java Tutorial.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the children of the receiver as an
Enumeration . | |||||||||||
Returns true if the receiver allows children.
| |||||||||||
Returns the child
TreeNode at index
childIndex . | |||||||||||
Returns the number of children
TreeNode s the receiver
contains. | |||||||||||
Returns the index of
node in the receivers children. | |||||||||||
Returns the parent
TreeNode of the receiver. | |||||||||||
Returns true if the receiver is a leaf.
|
Returns true if the receiver allows children.
Returns the child TreeNode
at index
childIndex
.
Returns the number of children TreeNode
s the receiver
contains.
Returns the index of node
in the receivers children.
If the receiver does not contain node
, -1 will be
returned.
Returns true if the receiver is a leaf.