Class AbstractCellTree
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
com.google.gwt.user.cellview.client.AbstractCellTree
- All Implemented Interfaces:
HasAttachHandlers
,HasCloseHandlers<TreeNode>
,HasOpenHandlers<TreeNode>
,HasHandlers
,HasKeyboardSelectionPolicy
,EventListener
,HasVisibility
,IsRenderable
,IsWidget
- Direct Known Subclasses:
CellBrowser
,CellTree
public abstract class AbstractCellTree
extends Composite
implements HasOpenHandlers<TreeNode>, HasCloseHandlers<TreeNode>, HasKeyboardSelectionPolicy
An abstract representation of a tree widget that renders items using
Cell
s.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
Nested classes/interfaces inherited from interface com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy
HasKeyboardSelectionPolicy.KeyboardSelectionPolicy
-
Field Summary
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionAbstractCellTree
(TreeViewModel viewModel) Construct a newCellTree
with the specifiedTreeViewModel
and root value. -
Method Summary
Modifier and TypeMethodDescriptionaddCloseHandler
(CloseHandler<TreeNode> handler) Adds aCloseEvent
handler.addOpenHandler
(OpenHandler<TreeNode> handler) Adds anOpenEvent
handler.protected <T> TreeViewModel.NodeInfo
<?> getNodeInfo
(T value) Get theTreeViewModel.NodeInfo
that will provide the information to retrieve and display the children of the specified value.abstract TreeNode
Get the rootTreeNode
.Get theTreeViewModel
that backs this tree.protected boolean
Check if keyboard selection is disabled.protected boolean
Check if the value is known to be a leaf node.void
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
AbstractCellTree
Construct a newCellTree
with the specifiedTreeViewModel
and root value.- Parameters:
viewModel
- theTreeViewModel
that backs the tree
-
-
Method Details
-
getKeyboardSelectionPolicy
Description copied from interface:HasKeyboardSelectionPolicy
- Specified by:
getKeyboardSelectionPolicy
in interfaceHasKeyboardSelectionPolicy
- Returns:
- the selection policy
- See Also:
-
getRootTreeNode
Get the rootTreeNode
.- Returns:
- the
TreeNode
at the root of the tree
-
getTreeViewModel
Get theTreeViewModel
that backs this tree.- Returns:
- the
TreeViewModel
-
setKeyboardSelectionPolicy
Description copied from interface:HasKeyboardSelectionPolicy
- Specified by:
setKeyboardSelectionPolicy
in interfaceHasKeyboardSelectionPolicy
- Parameters:
policy
- the selection policy- See Also:
-
getNodeInfo
Get theTreeViewModel.NodeInfo
that will provide the information to retrieve and display the children of the specified value.- Parameters:
value
- the value in the parent node- Returns:
- the
TreeViewModel.NodeInfo
-
isKeyboardSelectionDisabled
protected boolean isKeyboardSelectionDisabled()Check if keyboard selection is disabled.- Returns:
- true if disabled, false if enabled.
-
isLeaf
Check if the value is known to be a leaf node.- Parameters:
value
- the value at the node- Returns:
- true if the node is known to be a leaf node, false otherwise