C
- the data type of the children of the nodeclass CellBrowser.TreeNodeImpl<C> extends java.lang.Object implements TreeNode
Constructor and Description |
---|
TreeNodeImpl(TreeViewModel.NodeInfo<C> nodeInfo,
java.lang.Object value,
CellBrowser.BrowserCellList<C> display,
Widget widget)
Construct a new
CellBrowser.TreeNodeImpl . |
Modifier and Type | Method and Description |
---|---|
int |
getChildCount()
Get the number of children of the node.
|
C |
getChildValue(int index)
Get the value associated with a child node.
|
(package private) CellBrowser.BrowserCellList<C> |
getDisplay() |
(package private) java.lang.Object |
getFocusedKey()
Return the key of the value that is focused in this node's display.
|
int |
getIndex()
Get the index of the current node relative to its parent.
|
CellBrowser.TreeNodeImpl<?> |
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.
|
(package private) boolean |
isFocusedOpen()
Return true if the focused value is open, false if not.
|
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(TreeViewModel.NodeInfo<C> nodeInfo, java.lang.Object value, CellBrowser.BrowserCellList<C> display, Widget widget)
CellBrowser.TreeNodeImpl
.nodeInfo
- the nodeInfo for the children nodesvalue
- the value of the nodedisplay
- the display associated with the nodewidget
- the widget that wraps the displaypublic int getChildCount()
TreeNode
getChildCount
in interface TreeNode
public C getChildValue(int index)
TreeNode
getChildValue
in interface TreeNode
index
- the child indexpublic int getIndex()
TreeNode
public CellBrowser.TreeNodeImpl<?> getParent()
TreeNode
public java.lang.Object getValue()
TreeNode
public boolean isChildLeaf(int index)
TreeNode
isChildLeaf
in interface TreeNode
index
- the index of the childpublic boolean isChildOpen(int index)
TreeNode
isChildOpen
in interface TreeNode
index
- the index of the childpublic boolean isDestroyed()
TreeNode
IllegalStateException
.isDestroyed
in interface TreeNode
public TreeNode setChildOpen(int index, boolean open)
TreeNode
open
is true
and the TreeNode
successfully opens, returns the child
TreeNode
. Delegates to TreeNode.setChildOpen(int,boolean, boolean)
.setChildOpen
in interface TreeNode
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 openedpublic TreeNode setChildOpen(int index, boolean open, boolean fireEvents)
TreeNode
open
is
true and the TreeNode
successfully opens, returns the child
TreeNode
.setChildOpen
in interface 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 openedCellBrowser.BrowserCellList<C> getDisplay()
java.lang.Object getFocusedKey()
boolean isFocusedOpen()