T
- the type that this view containsclass CellTreeNodeView<T> extends UIObject
Modifier and Type | Class and Description |
---|---|
(package private) static class |
CellTreeNodeView.NodeCellList<C>
The
HasData used to show children. |
(package private) static interface |
CellTreeNodeView.Template |
(package private) static class |
CellTreeNodeView.TreeNodeImpl
An implementation of
TreeNode that delegates to a
CellTreeNodeView . |
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
Modifier and Type | Field and Description |
---|---|
(package private) CellTreeNodeView.NodeCellList<?> |
listView
The list view used to display the nodes.
|
DEBUG_ID_PREFIX
Constructor and Description |
---|
CellTreeNodeView(CellTree tree,
CellTreeNodeView<?> parent,
TreeViewModel.NodeInfo<T> parentNodeInfo,
Element elem,
T value,
CellTree.CellTreeMessages messages)
Construct a
CellTreeNodeView . |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
belongsToTree(CellTree tree) |
protected void |
cleanup(boolean destroy)
Unregister the list handler and destroy all child nodes.
|
protected boolean |
consumeAnimate() |
protected <C> CellTreeNodeView<C> |
createTreeNodeView(TreeViewModel.NodeInfo<C> nodeInfo,
Element childElem,
C childValue,
java.lang.Object viewData)
Returns an instance of TreeNodeView of the same subclass as the calling
object.
|
(package private) Element |
ensureAnimationFrame()
Ensure that the animation frame exists and return it.
|
(package private) Element |
ensureChildContainer()
Ensure that the child container exists and return it.
|
(package private) Element |
ensureContentContainer()
Ensure that the content container exists and return it.
|
protected void |
fireEventToCell(NativeEvent event)
Fire an event to the
AbstractCell . |
protected Element |
getCellParent()
Returns the element that parents the cell contents of this node.
|
int |
getChildCount() |
CellTreeNodeView<?> |
getChildNode(int childIndex) |
protected Element |
getImageElement()
Returns the element corresponding to the open/close image.
|
(package private) int |
getIndex()
Return the index of this node in its parent.
|
(package private) CellTreeNodeView<?> |
getParentNode()
Return the parent node, or null if this node is the root.
|
protected Element |
getSelectionElement()
Returns the element that selection styles are applied to.
|
(package private) static Element |
getSelectionElement(Element nodeElem)
Returns the element that selection is applied to.
|
(package private) Element |
getShowMoreElement() |
(package private) TreeNode |
getTreeNode()
Get a
TreeNode with a public API for this node view. |
protected java.lang.Object |
getValueKey()
Returns the key for the value of this node using the parent's
implementation of NodeInfo.getKey().
|
(package private) int |
indexOf(CellTreeNodeView<?> child) |
(package private) boolean |
isDestroyed() |
boolean |
isLeaf() |
boolean |
isOpen()
Check whether or not this node is open.
|
(package private) boolean |
isRootNode()
Check if this node is a root node.
|
(package private) boolean |
isSelected()
Check if the value of this node is selected.
|
protected <C> void |
onOpen(TreeViewModel.NodeInfo<C> nodeInfo)
Set up the node when it is opened.
|
(package private) boolean |
resetFocusOnCell()
Reset focus on this node.
|
(package private) void |
setKeyboardSelected(boolean selected,
boolean stealFocus)
Select or deselect this node with the keyboard.
|
(package private) void |
setKeyboardSelectedStyle(boolean selected)
Add or remove the keyboard selected style.
|
boolean |
setOpen(boolean open,
boolean fireEvents)
Sets whether this item's children are displayed.
|
(package private) void |
setSelected(boolean selected)
Select or deselect this node.
|
(package private) void |
showFewer() |
(package private) void |
showMore() |
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, sinkEvents, toString, unsinkEvents
CellTreeNodeView.NodeCellList<?> listView
CellTreeNodeView(CellTree tree, CellTreeNodeView<?> parent, TreeViewModel.NodeInfo<T> parentNodeInfo, Element elem, T value, CellTree.CellTreeMessages messages)
CellTreeNodeView
.tree
- the parent CellTreeNodeView
parent
- the parent CellTreeNodeView
parentNodeInfo
- the TreeViewModel.NodeInfo
of the parentelem
- the outer element of this CellTreeNodeView
value
- the value of this nodemessages
- translation messagesstatic Element getSelectionElement(Element nodeElem)
nodeElem
- the element that represents the nodepublic int getChildCount()
public CellTreeNodeView<?> getChildNode(int childIndex)
public boolean isLeaf()
public boolean isOpen()
public boolean setOpen(boolean open, boolean fireEvents)
open
- whether the item is openfireEvents
- true to fire events if the state changesprotected void cleanup(boolean destroy)
destroy
- true to destroy this nodeprotected boolean consumeAnimate()
protected <C> CellTreeNodeView<C> createTreeNodeView(TreeViewModel.NodeInfo<C> nodeInfo, Element childElem, C childValue, java.lang.Object viewData)
C
- the data type of the node's childrennodeInfo
- a NodeInfo object describing the child nodeschildElem
- the DOM element used to parent the new TreeNodeViewchildValue
- the child's valueviewData
- view data associated with the nodeprotected void fireEventToCell(NativeEvent event)
AbstractCell
.event
- the native eventprotected Element getCellParent()
protected Element getImageElement()
protected Element getSelectionElement()
protected java.lang.Object getValueKey()
protected <C> void onOpen(TreeViewModel.NodeInfo<C> nodeInfo)
C
- the child data type of the nodenodeInfo
- the TreeViewModel.NodeInfo
that provides information about the
child valuesboolean belongsToTree(CellTree tree)
Element ensureAnimationFrame()
Element ensureChildContainer()
Element ensureContentContainer()
int getIndex()
CellTreeNodeView<?> getParentNode()
Element getShowMoreElement()
TreeNode getTreeNode()
TreeNode
with a public API for this node view.TreeNode
int indexOf(CellTreeNodeView<?> child)
boolean isDestroyed()
boolean isRootNode()
boolean isSelected()
boolean resetFocusOnCell()
void setKeyboardSelected(boolean selected, boolean stealFocus)
selected
- true if selected, false if notstealFocus
- true to steal focusvoid setKeyboardSelectedStyle(boolean selected)
selected
- true if selected, false if notvoid setSelected(boolean selected)
selected
- true to select, false to deselectvoid showFewer()
void showMore()