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 usingCell
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
Constructors Constructor Description AbstractCellTree(TreeViewModel viewModel)
Construct a newCellTree
with the specifiedTreeViewModel
and root value.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description HandlerRegistration
addCloseHandler(CloseHandler<TreeNode> handler)
Adds aCloseEvent
handler.HandlerRegistration
addOpenHandler(OpenHandler<TreeNode> handler)
Adds anOpenEvent
handler.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy
getKeyboardSelectionPolicy()
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
getRootTreeNode()
Get the rootTreeNode
.TreeViewModel
getTreeViewModel()
Get theTreeViewModel
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)
-
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 Detail
-
AbstractCellTree
public AbstractCellTree(TreeViewModel viewModel)
Construct a newCellTree
with the specifiedTreeViewModel
and root value.- Parameters:
viewModel
- theTreeViewModel
that backs the tree
-
-
Method Detail
-
addCloseHandler
public HandlerRegistration addCloseHandler(CloseHandler<TreeNode> handler)
Description copied from interface:HasCloseHandlers
Adds aCloseEvent
handler.- Specified by:
addCloseHandler
in interfaceHasCloseHandlers<TreeNode>
- Parameters:
handler
- the handler- Returns:
- the registration for the event
-
addOpenHandler
public HandlerRegistration addOpenHandler(OpenHandler<TreeNode> handler)
Description copied from interface:HasOpenHandlers
Adds anOpenEvent
handler.- Specified by:
addOpenHandler
in interfaceHasOpenHandlers<TreeNode>
- Parameters:
handler
- the handler- Returns:
- the registration for the event
-
getKeyboardSelectionPolicy
public HasKeyboardSelectionPolicy.KeyboardSelectionPolicy getKeyboardSelectionPolicy()
Description copied from interface:HasKeyboardSelectionPolicy
- Specified by:
getKeyboardSelectionPolicy
in interfaceHasKeyboardSelectionPolicy
- Returns:
- the selection policy
- See Also:
HasKeyboardSelectionPolicy.setKeyboardSelectionPolicy(KeyboardSelectionPolicy)
-
getRootTreeNode
public abstract TreeNode getRootTreeNode()
Get the rootTreeNode
.- Returns:
- the
TreeNode
at the root of the tree
-
getTreeViewModel
public TreeViewModel getTreeViewModel()
Get theTreeViewModel
that backs this tree.- Returns:
- the
TreeViewModel
-
setKeyboardSelectionPolicy
public void setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy policy)
Description copied from interface:HasKeyboardSelectionPolicy
- Specified by:
setKeyboardSelectionPolicy
in interfaceHasKeyboardSelectionPolicy
- Parameters:
policy
- the selection policy- See Also:
HasKeyboardSelectionPolicy.getKeyboardSelectionPolicy()
-
getNodeInfo
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.- 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
protected boolean isLeaf(java.lang.Object value)
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
-
-