Class CellBrowser.TreeNodeImpl<C>
- java.lang.Object
- 
- com.google.gwt.user.cellview.client.CellBrowser.TreeNodeImpl<C>
 
- 
- Type Parameters:
- C- the data type of the children of the node
 - All Implemented Interfaces:
- TreeNode
 - Enclosing class:
- CellBrowser
 
 class CellBrowser.TreeNodeImpl<C> extends java.lang.Object implements TreeNode A node in the tree.
- 
- 
Constructor SummaryConstructors Constructor Description TreeNodeImpl(TreeViewModel.NodeInfo<C> nodeInfo, java.lang.Object value, CellBrowser.BrowserCellList<C> display, Widget widget)Construct a newCellBrowser.TreeNodeImpl.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetChildCount()Get the number of children of the node.CgetChildValue(int index)Get the value associated with a child node.(package private) CellBrowser.BrowserCellList<C>getDisplay()(package private) java.lang.ObjectgetFocusedKey()Return the key of the value that is focused in this node's display.intgetIndex()Get the index of the current node relative to its parent.CellBrowser.TreeNodeImpl<?>getParent()Get the parent node of this node.java.lang.ObjectgetValue()Get the value associated with this node.booleanisChildLeaf(int index)Check whether or not a child node is a leaf node.booleanisChildOpen(int index)Check whether or not a child node is open.booleanisDestroyed()Check whether or not the current node is destroyed.(package private) booleanisFocusedOpen()Return true if the focused value is open, false if not.TreeNodesetChildOpen(int index, boolean open)Open or close a child node and fire an event.TreeNodesetChildOpen(int index, boolean open, boolean fireEvents)Open or close the node, optionally firing an event.
 
- 
- 
- 
Constructor Detail- 
TreeNodeImplpublic TreeNodeImpl(TreeViewModel.NodeInfo<C> nodeInfo, java.lang.Object value, CellBrowser.BrowserCellList<C> display, Widget widget) Construct a newCellBrowser.TreeNodeImpl.- Parameters:
- nodeInfo- the nodeInfo for the children nodes
- value- the value of the node
- display- the display associated with the node
- widget- the widget that wraps the display
 
 
- 
 - 
Method Detail- 
getChildCountpublic int getChildCount() Description copied from interface:TreeNodeGet the number of children of the node.- Specified by:
- getChildCountin interface- TreeNode
- Returns:
- the child count
 
 - 
getChildValuepublic C getChildValue(int index) Description copied from interface:TreeNodeGet the value associated with a child node.- Specified by:
- getChildValuein interface- TreeNode
- Parameters:
- index- the child index
- Returns:
- the value
 
 - 
getIndexpublic int getIndex() Description copied from interface:TreeNodeGet the index of the current node relative to its parent.
 - 
getParentpublic CellBrowser.TreeNodeImpl<?> getParent() Description copied from interface:TreeNodeGet the parent node of this node.
 - 
getValuepublic java.lang.Object getValue() Description copied from interface:TreeNodeGet the value associated with this node. This method can be called on destroyed nodes.
 - 
isChildLeafpublic boolean isChildLeaf(int index) Description copied from interface:TreeNodeCheck whether or not a child node is a leaf node.- Specified by:
- isChildLeafin interface- TreeNode
- Parameters:
- index- the index of the child
- Returns:
- true if a leaf node, false if not
 
 - 
isChildOpenpublic boolean isChildOpen(int index) Description copied from interface:TreeNodeCheck whether or not a child node is open.- Specified by:
- isChildOpenin interface- TreeNode
- Parameters:
- index- the index of the child
- Returns:
- true if open, false if closed
 
 - 
isDestroyedpublic boolean isDestroyed() Description copied from interface:TreeNodeCheck whether or not the current node is destroyed. The node is destroyed when it is closed, even if it still appears in the tree as an unopened non-leaf node. Once a node is destroyed, calling most methods on the node results in anIllegalStateException.- Specified by:
- isDestroyedin interface- TreeNode
- Returns:
- true if destroyed, false if active
 
 - 
setChildOpenpublic TreeNode setChildOpen(int index, boolean open) Description copied from interface:TreeNodeOpen or close a child node and fire an event. Ifopenis true and theTreeNodesuccessfully opens, returns the childTreeNode. Delegates toTreeNode.setChildOpen(int,boolean, boolean).- Specified by:
- setChildOpenin interface- TreeNode
- Parameters:
- index- the index of the child
- open- true to open, false to close
- Returns:
- the TreeNodethat was opened, or null if the node was closed or could not be opened
 
 - 
setChildOpenpublic TreeNode setChildOpen(int index, boolean open, boolean fireEvents) Description copied from interface:TreeNodeOpen or close the node, optionally firing an event. Ifopenis true and theTreeNodesuccessfully opens, returns the childTreeNode.- Specified by:
- setChildOpenin interface- TreeNode
- Parameters:
- index- the index of the child
- open- true to open, false to flose
- fireEvents- true to fire an event, false not to
- Returns:
- the TreeNodethat was opened, or null if the node was closed or could not be opened
 
 - 
getDisplayCellBrowser.BrowserCellList<C> getDisplay() 
 - 
getFocusedKeyjava.lang.Object getFocusedKey() Return the key of the value that is focused in this node's display.
 - 
isFocusedOpenboolean isFocusedOpen() Return true if the focused value is open, false if not.
 
- 
 
-