public class VTree extends FocusElementPanel implements VHasDropHandler, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.BlurHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.KeyDownHandler, SubPartAware, ActionOwner, HandlesAriaCaption
| Modifier and Type | Class and Description |
|---|---|
class |
VTree.TreeNode |
| Modifier and Type | Field and Description |
|---|---|
com.google.gwt.user.client.ui.FlowPanel |
body
For internal use only.
|
String[] |
bodyActionKeys
For internal use only.
|
static String |
CLASSNAME |
ApplicationConnection |
client
For internal use only.
|
TreeConnector |
connector
For internal use only.
|
boolean |
disabled
For internal use only.
|
int |
dragMode
For internal use only.
|
VTree.TreeNode |
focusedNode
For internal use only.
|
VLazyExecutor |
iconLoaded |
boolean |
immediate
For internal use only.
|
boolean |
isHtmlContentAllowed
For internal use only.
|
boolean |
isMultiselect
For internal use only.
|
boolean |
isNullSelectionAllowed
For internal use only.
|
VTree.TreeNode |
lastSelection
For internal use only.
|
static MultiSelectMode |
MULTISELECT_MODE_DEFAULT
Deprecated.
As of 7.0, use
MultiSelectMode.DEFAULT instead. |
static MultiSelectMode |
MULTISELECT_MODE_SIMPLE
Deprecated.
As of 7.0, use
MultiSelectMode.SIMPLE instead. |
MultiSelectMode |
multiSelectMode
For internal use only.
|
String |
paintableId
For internal use only.
|
boolean |
readonly
For internal use only.
|
boolean |
rendering
For internal use only.
|
boolean |
selectable
For internal use only.
|
Set<String> |
selectedIds
For internal use only.
|
| Constructor and Description |
|---|
VTree() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindAriaCaption(com.google.gwt.user.client.Element captionElement)
Called to bind the provided caption (label in HTML speak) element to the
main input element of the Widget.
|
void |
clearNodeToKeyMap() |
void |
deselectAll()
Deselects all items in the tree
|
String |
getActionCaption(String actionKey) |
String |
getActionIcon(String actionKey) |
Action[] |
getActions() |
ApplicationConnection |
getClient() |
VTree.TreeNode |
getCommonGrandParent(VTree.TreeNode node1,
VTree.TreeNode node2)
Returns the first common parent of two nodes
|
VDropHandler |
getDropHandler() |
protected VTree.TreeNode |
getFirstRootNode()
Returns the first root node of the tree or null if there are no root
nodes.
|
protected VTree.TreeNode |
getLastRootNode()
Returns the last root node of the tree or null if there are no root
nodes.
|
protected int |
getNavigationDownKey()
Get the key that moves the selection head downwards.
|
protected int |
getNavigationEndKey()
Get the key the moves the selection to the end of the table.
|
protected int |
getNavigationLeftKey()
Get the key that scrolls to the left in the table.
|
protected int |
getNavigationPageDownKey()
Get the key the moves the selection one page down in the table.
|
protected int |
getNavigationPageUpKey()
Get the key the moves the selection one page up in the table.
|
protected int |
getNavigationRightKey()
Get the key that scroll to the right on the table.
|
protected int |
getNavigationSelectKey()
Get the key that selects an item in the table.
|
protected int |
getNavigationStartKey()
Get the key the moves the selection to the beginning of the table.
|
protected int |
getNavigationUpKey()
Get the key that moves the selection head upwards.
|
VTree.TreeNode |
getNodeByKey(String key) |
String |
getPaintableId() |
protected List<VTree.TreeNode> |
getRootNodes()
Returns a list of all root nodes in the Tree in the order they appear in
the tree.
|
com.google.gwt.user.client.Element |
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided in
subPart. |
String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component.
|
protected boolean |
handleKeyNavigation(int keycode,
boolean ctrl,
boolean shift)
Handles the keyboard navigation
|
boolean |
isSelected(VTree.TreeNode treeNode)
Is a node selected in the tree
|
void |
onBlur(com.google.gwt.event.dom.client.BlurEvent event) |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
onFocus(com.google.gwt.event.dom.client.FocusEvent event) |
void |
onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event) |
void |
onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event) |
void |
registerAction(String key,
String caption,
String iconUrl) |
void |
registerNode(VTree.TreeNode treeNode) |
void |
setFocusedNode(VTree.TreeNode node)
Focuses a node and scrolls it into view
|
void |
setFocusedNode(VTree.TreeNode node,
boolean scrollIntoView)
Sets the node currently in focus
|
void |
setSelected(VTree.TreeNode treeNode,
boolean selected) |
void |
updateDropHandler(UIDL childUidl)
For internal use only.
|
getFocusElement, setFocus, setTabIndex, setWidgetaddBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, focusadd, getContainerElement, getWidget, iterator, remove, setWidgetadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String CLASSNAME
@Deprecated public static final MultiSelectMode MULTISELECT_MODE_DEFAULT
MultiSelectMode.DEFAULT instead.@Deprecated public static final MultiSelectMode MULTISELECT_MODE_SIMPLE
MultiSelectMode.SIMPLE instead.public final com.google.gwt.user.client.ui.FlowPanel body
public Set<String> selectedIds
public ApplicationConnection client
public String paintableId
public boolean selectable
public boolean isMultiselect
public VTree.TreeNode lastSelection
public VTree.TreeNode focusedNode
public MultiSelectMode multiSelectMode
public boolean immediate
public boolean isNullSelectionAllowed
public boolean isHtmlContentAllowed
public boolean disabled
public boolean readonly
public boolean rendering
public int dragMode
public String[] bodyActionKeys
public TreeConnector connector
public VLazyExecutor iconLoaded
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.Widgetprotected VTree.TreeNode getFirstRootNode()
VTree.TreeNodeprotected VTree.TreeNode getLastRootNode()
VTree.TreeNodeprotected List<VTree.TreeNode> getRootNodes()
VTree.TreeNodes.public void updateDropHandler(UIDL childUidl)
public void setSelected(VTree.TreeNode treeNode, boolean selected)
public boolean isSelected(VTree.TreeNode treeNode)
treeNode - The node to checkpublic VDropHandler getDropHandler()
getDropHandler in interface VHasDropHandlerpublic VTree.TreeNode getNodeByKey(String key)
public void deselectAll()
public VTree.TreeNode getCommonGrandParent(VTree.TreeNode node1, VTree.TreeNode node2)
node1 - The first nodenode2 - The second nodepublic void setFocusedNode(VTree.TreeNode node, boolean scrollIntoView)
node - The node to focus or null to remove the focus completelyscrollIntoView - Scroll the node into viewpublic void setFocusedNode(VTree.TreeNode node)
node - The node to focuspublic void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
onFocus in interface com.google.gwt.event.dom.client.FocusHandlerpublic void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
onBlur in interface com.google.gwt.event.dom.client.BlurHandlerpublic void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)
onKeyPress in interface com.google.gwt.event.dom.client.KeyPressHandlerpublic void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
onKeyDown in interface com.google.gwt.event.dom.client.KeyDownHandlerprotected boolean handleKeyNavigation(int keycode,
boolean ctrl,
boolean shift)
keycode - The keycode of the pressed keyctrl - Was ctrl pressedshift - Was shift pressedprotected int getNavigationUpKey()
protected int getNavigationDownKey()
protected int getNavigationLeftKey()
protected int getNavigationRightKey()
protected int getNavigationSelectKey()
protected int getNavigationPageUpKey()
protected int getNavigationPageDownKey()
protected int getNavigationStartKey()
protected int getNavigationEndKey()
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAwaresubPart. The subPart identifier is component specific and
may be any string of characters, numbers, space characters and brackets.getSubPartElement in interface SubPartAwaresubPart - The identifier for the element inside the componentpublic String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAwaresubElement is a part of the component and must never be null.
Note!
getSubPartElement(getSubPartName(element)) == element is not
always true. A component can choose to provide a more generic
identifier for any given element if the results of all interactions with
subElement are the same as interactions with the element
identified by the return value. For example a button can return an
identifier for the root element even though a DIV inside the button was
passed as subElement because interactions with the DIV and the
root button element produce the same result.
getSubPartName in interface SubPartAwaresubElement - The element the identifier string should uniquely identifysubElement or null
if no identifier could be provided.public Action[] getActions()
getActions in interface ActionOwnerpublic ApplicationConnection getClient()
getClient in interface ActionOwnerpublic String getPaintableId()
getPaintableId in interface ActionOwnerpublic void registerNode(VTree.TreeNode treeNode)
public void clearNodeToKeyMap()
public void bindAriaCaption(com.google.gwt.user.client.Element captionElement)
HandlesAriaCaptionbindAriaCaption in interface HandlesAriaCaptioncaptionElement - Element of the captionCopyright © 2016 Vaadin Ltd. All rights reserved.