public abstract class AbstractCellTree extends Composite implements HasOpenHandlers<TreeNode>, HasCloseHandlers<TreeNode>, HasKeyboardSelectionPolicy
Cell
s.UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasKeyboardSelectionPolicy.KeyboardSelectionPolicy
DEBUG_ID_PREFIX
Constructor and Description |
---|
AbstractCellTree(TreeViewModel viewModel)
Construct a new
CellTree with the specified TreeViewModel
and root value. |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addCloseHandler(CloseHandler<TreeNode> handler)
Adds a
CloseEvent handler. |
HandlerRegistration |
addOpenHandler(OpenHandler<TreeNode> handler)
Adds an
OpenEvent handler. |
HasKeyboardSelectionPolicy.KeyboardSelectionPolicy |
getKeyboardSelectionPolicy()
|
protected <T> TreeViewModel.NodeInfo<?> |
getNodeInfo(T value)
Get the
TreeViewModel.NodeInfo that will provide the information to retrieve and
display the children of the specified value. |
abstract TreeNode |
getRootTreeNode()
Get the root
TreeNode . |
TreeViewModel |
getTreeViewModel()
Get the
TreeViewModel that backs this tree. |
protected boolean |
isKeyboardSelectionDisabled()
Check if keyboard selection is disabled.
|
protected boolean |
isLeaf(java.lang.Object value)
Check if the value is known to be a leaf node.
|
void |
setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy policy)
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fireEvent
public AbstractCellTree(TreeViewModel viewModel)
CellTree
with the specified TreeViewModel
and root value.viewModel
- the TreeViewModel
that backs the treepublic HandlerRegistration addCloseHandler(CloseHandler<TreeNode> handler)
HasCloseHandlers
CloseEvent
handler.addCloseHandler
in interface HasCloseHandlers<TreeNode>
handler
- the handlerpublic HandlerRegistration addOpenHandler(OpenHandler<TreeNode> handler)
HasOpenHandlers
OpenEvent
handler.addOpenHandler
in interface HasOpenHandlers<TreeNode>
handler
- the handlerpublic HasKeyboardSelectionPolicy.KeyboardSelectionPolicy getKeyboardSelectionPolicy()
HasKeyboardSelectionPolicy
getKeyboardSelectionPolicy
in interface HasKeyboardSelectionPolicy
HasKeyboardSelectionPolicy.setKeyboardSelectionPolicy(KeyboardSelectionPolicy)
public abstract TreeNode getRootTreeNode()
TreeNode
.TreeNode
at the root of the treepublic TreeViewModel getTreeViewModel()
TreeViewModel
that backs this tree.TreeViewModel
public void setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy policy)
HasKeyboardSelectionPolicy
setKeyboardSelectionPolicy
in interface HasKeyboardSelectionPolicy
policy
- the selection policyHasKeyboardSelectionPolicy.getKeyboardSelectionPolicy()
protected <T> TreeViewModel.NodeInfo<?> getNodeInfo(T value)
TreeViewModel.NodeInfo
that will provide the information to retrieve and
display the children of the specified value.value
- the value in the parent nodeTreeViewModel.NodeInfo
protected boolean isKeyboardSelectionDisabled()
protected boolean isLeaf(java.lang.Object value)
value
- the value at the node