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
Cells.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledNested 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
ConstructorsConstructorDescriptionAbstractCellTree(TreeViewModel viewModel) Construct a newCellTreewith the specifiedTreeViewModeland root value. -
Method Summary
Modifier and TypeMethodDescriptionaddCloseHandler(CloseHandler<TreeNode> handler) Adds aCloseEventhandler.addOpenHandler(OpenHandler<TreeNode> handler) Adds anOpenEventhandler.protected <T> TreeViewModel.NodeInfo<?>getNodeInfo(T value) Get theTreeViewModel.NodeInfothat will provide the information to retrieve and display the children of the specified value.abstract TreeNodeGet the rootTreeNode.Get theTreeViewModelthat backs this tree.protected booleanCheck if keyboard selection is disabled.protected booleanCheck if the value is known to be a leaf node.voidMethods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods 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, unsinkEventsMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
AbstractCellTree
Construct a newCellTreewith the specifiedTreeViewModeland root value.- Parameters:
viewModel- theTreeViewModelthat backs the tree
-
-
Method Details
-
getKeyboardSelectionPolicy
Description copied from interface:HasKeyboardSelectionPolicy- Specified by:
getKeyboardSelectionPolicyin interfaceHasKeyboardSelectionPolicy- Returns:
- the selection policy
- See Also:
-
getRootTreeNode
Get the rootTreeNode.- Returns:
- the
TreeNodeat the root of the tree
-
getTreeViewModel
Get theTreeViewModelthat backs this tree.- Returns:
- the
TreeViewModel
-
setKeyboardSelectionPolicy
Description copied from interface:HasKeyboardSelectionPolicy- Specified by:
setKeyboardSelectionPolicyin interfaceHasKeyboardSelectionPolicy- Parameters:
policy- the selection policy- See Also:
-
getNodeInfo
Get theTreeViewModel.NodeInfothat 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