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 usingCells.
-
-
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 newCellTreewith the specifiedTreeViewModeland root value.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description HandlerRegistrationaddCloseHandler(CloseHandler<TreeNode> handler)Adds aCloseEventhandler.HandlerRegistrationaddOpenHandler(OpenHandler<TreeNode> handler)Adds anOpenEventhandler.HasKeyboardSelectionPolicy.KeyboardSelectionPolicygetKeyboardSelectionPolicy()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 TreeNodegetRootTreeNode()Get the rootTreeNode.TreeViewModelgetTreeViewModel()Get theTreeViewModelthat backs this tree.protected booleanisKeyboardSelectionDisabled()Check if keyboard selection is disabled.protected booleanisLeaf(java.lang.Object value)Check if the value is known to be a leaf node.voidsetKeyboardSelectionPolicy(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 newCellTreewith the specifiedTreeViewModeland root value.- Parameters:
viewModel- theTreeViewModelthat backs the tree
-
-
Method Detail
-
addCloseHandler
public HandlerRegistration addCloseHandler(CloseHandler<TreeNode> handler)
Description copied from interface:HasCloseHandlersAdds aCloseEventhandler.- Specified by:
addCloseHandlerin interfaceHasCloseHandlers<TreeNode>- Parameters:
handler- the handler- Returns:
- the registration for the event
-
addOpenHandler
public HandlerRegistration addOpenHandler(OpenHandler<TreeNode> handler)
Description copied from interface:HasOpenHandlersAdds anOpenEventhandler.- Specified by:
addOpenHandlerin interfaceHasOpenHandlers<TreeNode>- Parameters:
handler- the handler- Returns:
- the registration for the event
-
getKeyboardSelectionPolicy
public HasKeyboardSelectionPolicy.KeyboardSelectionPolicy getKeyboardSelectionPolicy()
Description copied from interface:HasKeyboardSelectionPolicy- Specified by:
getKeyboardSelectionPolicyin interfaceHasKeyboardSelectionPolicy- Returns:
- the selection policy
- See Also:
HasKeyboardSelectionPolicy.setKeyboardSelectionPolicy(KeyboardSelectionPolicy)
-
getRootTreeNode
public abstract TreeNode getRootTreeNode()
Get the rootTreeNode.- Returns:
- the
TreeNodeat the root of the tree
-
getTreeViewModel
public TreeViewModel getTreeViewModel()
Get theTreeViewModelthat backs this tree.- Returns:
- the
TreeViewModel
-
setKeyboardSelectionPolicy
public void setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy policy)
Description copied from interface:HasKeyboardSelectionPolicy- Specified by:
setKeyboardSelectionPolicyin interfaceHasKeyboardSelectionPolicy- Parameters:
policy- the selection policy- See Also:
HasKeyboardSelectionPolicy.getKeyboardSelectionPolicy()
-
getNodeInfo
protected <T> TreeViewModel.NodeInfo<?> getNodeInfo(T value)
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
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
-
-