static class CellTreeNodeView.TreeNodeImpl extends java.lang.Object implements TreeNode
TreeNode that delegates to a
CellTreeNodeView. This class is intentionally static because we
might move it to a new CellTreeNodeView, and we don't want
non-static references to the old CellTreeNodeView.| Constructor and Description |
|---|
TreeNodeImpl(CellTreeNodeView<?> nodeView) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
flush()
Flush pending changes in the view.
|
int |
getChildCount()
Get the number of children of the node.
|
java.lang.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.
|
(package private) CellTreeNodeView<?> |
getNodeView() |
TreeNode |
getParent()
Get the parent node of this node.
|
java.lang.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.
|
public TreeNodeImpl(CellTreeNodeView<?> nodeView)
public int getChildCount()
TreeNodegetChildCount in interface TreeNodepublic java.lang.Object getChildValue(int index)
TreeNodegetChildValue in interface TreeNodeindex - the child indexpublic int getIndex()
TreeNodefinal CellTreeNodeView<?> getNodeView()
public TreeNode getParent()
TreeNodepublic java.lang.Object getValue()
TreeNodepublic boolean isChildLeaf(int index)
TreeNodeisChildLeaf in interface TreeNodeindex - the index of the childpublic boolean isChildOpen(int index)
TreeNodeisChildOpen in interface TreeNodeindex - the index of the childpublic boolean isDestroyed()
TreeNodeIllegalStateException.isDestroyed in interface TreeNodepublic TreeNode setChildOpen(int index, boolean open)
TreeNodeopen is true
and the TreeNode successfully opens, returns the child
TreeNode. Delegates to TreeNode.setChildOpen(int,boolean, boolean).setChildOpen in interface TreeNodeindex - 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 openedpublic TreeNode setChildOpen(int index, boolean open, boolean fireEvents)
TreeNodeopen is
true and the TreeNode successfully opens, returns the child
TreeNode.setChildOpen in interface TreeNodeindex - 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 openedvoid flush()