public interface TreeNode
Modifier and Type | Method and Description |
---|---|
int |
getChildCount()
Get the number of children of the node.
|
Object |
getChildValue(int index)
Get the value associated with a child node.
|
int |
getIndex()
Get the index of the current node relative to its parent.
|
TreeNode |
getParent()
Get the parent node of this node.
|
Object |
getValue()
Get the value associated with this node.
|
boolean |
isChildLeaf(int index)
Check whether or not a child node is a leaf node.
|
boolean |
isChildOpen(int index)
Check whether or not a child node is open.
|
boolean |
isDestroyed()
Check whether or not the current node is destroyed.
|
TreeNode |
setChildOpen(int index,
boolean open)
Open or close a child node and fire an event.
|
TreeNode |
setChildOpen(int index,
boolean open,
boolean fireEvents)
Open or close the node, optionally firing an event.
|
int getChildCount()
Object getChildValue(int index)
index
- the child indexint getIndex()
TreeNode getParent()
Object getValue()
boolean isChildLeaf(int index)
index
- the index of the childboolean isChildOpen(int index)
index
- the index of the childboolean isDestroyed()
IllegalStateException
.TreeNode setChildOpen(int index, boolean open)
open
is true
and the TreeNode
successfully opens, returns the child
TreeNode
. Delegates to setChildOpen(int,boolean, boolean)
.index
- the index of the childopen
- true to open, false to closeTreeNode
that was opened, or null if the node was
closed or could not be openedTreeNode setChildOpen(int index, boolean open, boolean fireEvents)
open
is
true and the TreeNode
successfully opens, returns the child
TreeNode
.index
- the index of the childopen
- true to open, false to flosefireEvents
- true to fire an event, false not toTreeNode
that was opened, or null if the node was
closed or could not be openedCopyright © 2018. All rights reserved.