Package com.vaadin.v7.client.ui
Class VTree.TreeNode
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.vaadin.v7.client.ui.VTree.TreeNode
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.AcceptsOneWidget,com.google.gwt.user.client.ui.HasOneWidget,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,ActionOwner,Iterable<com.google.gwt.user.client.ui.Widget>
- Enclosing class:
- VTree
public class VTree.TreeNode extends com.google.gwt.user.client.ui.SimplePanel implements ActionOwner
-
-
Field Summary
Fields Modifier and Type Field Description String[]actionKeysFor internal use only.com.google.gwt.user.client.ui.FlowPanelchildNodeContainerFor internal use only.booleanchildrenLoadedFor internal use only.static StringCLASSNAMEstatic StringCLASSNAME_FOCUSEDStringkeyprotected com.google.gwt.dom.client.ElementnodeCaptionSpan
-
Constructor Summary
Constructors Constructor Description TreeNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconstructDom()protected voidemphasis(com.vaadin.shared.ui.dd.VerticalDropLocation detail)Action[]getActions()List<VTree.TreeNode>getChildren()Returns the children of the node.ApplicationConnectiongetClient()com.vaadin.shared.ui.dd.VerticalDropLocationgetDropDetail(com.google.gwt.dom.client.NativeEvent currentGwtEvent)StringgetPaintableId()booleangetState()For internal use only.booleanisCaptionElement(com.google.gwt.dom.client.Element target)Checks if the given element is the caption or the icon.booleanisChildrenLoaded()booleanisGrandParentOf(VTree.TreeNode child)Travels up the hierarchy looking for this node.booleanisLeaf()protected booleanisSelected()booleanisSibling(VTree.TreeNode node)voidonBrowserEvent(com.google.gwt.user.client.Event event)protected voidonDetach()voidscrollIntoView()Scrolls the caption into view.voidsetFocused(boolean focused)Is the node focused?voidsetHtml(String html)For internal use only.voidsetIcon(String iconUrl, String altText)voidsetNodeStyleName(String styleName)voidsetSelected(boolean selected)Adds/removes Vaadin specific style name.voidsetState(boolean state, boolean notifyServer)For internal use only.voidsetText(String text)For internal use only.voidshowContextMenu(com.google.gwt.user.client.Event event)StringtoString()-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
- See Also:
- Constant Field Values
-
CLASSNAME_FOCUSED
public static final String CLASSNAME_FOCUSED
- See Also:
- Constant Field Values
-
key
public String key
-
actionKeys
public String[] actionKeys
For internal use only. May be removed or replaced in the future.
-
childrenLoaded
public boolean childrenLoaded
For internal use only. May be removed or replaced in the future.
-
nodeCaptionSpan
protected com.google.gwt.dom.client.Element nodeCaptionSpan
-
childNodeContainer
public com.google.gwt.user.client.ui.FlowPanel childNodeContainer
For internal use only. May be removed or replaced in the future.
-
-
Method Detail
-
getDropDetail
public com.vaadin.shared.ui.dd.VerticalDropLocation getDropDetail(com.google.gwt.dom.client.NativeEvent currentGwtEvent)
-
emphasis
protected void emphasis(com.vaadin.shared.ui.dd.VerticalDropLocation detail)
-
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEventin interfacecom.google.gwt.user.client.EventListener- Overrides:
onBrowserEventin classcom.google.gwt.user.client.ui.Widget
-
isCaptionElement
public boolean isCaptionElement(com.google.gwt.dom.client.Element target)
Checks if the given element is the caption or the icon.- Parameters:
target- The element to check- Returns:
- true if the element is the caption or the icon
-
constructDom
protected void constructDom()
-
isLeaf
public boolean isLeaf()
-
setState
public void setState(boolean state, boolean notifyServer)For internal use only. May be removed or replaced in the future.
-
getState
public boolean getState()
For internal use only. May be removed or replaced in the future.
-
setText
public void setText(String text)
For internal use only. May be removed or replaced in the future.
-
setHtml
public void setHtml(String html)
For internal use only. May be removed or replaced in the future.
-
isChildrenLoaded
public boolean isChildrenLoaded()
-
getChildren
public List<VTree.TreeNode> getChildren()
Returns the children of the node.- Returns:
- A set of tree nodes
-
getActions
public Action[] getActions()
- Specified by:
getActionsin interfaceActionOwner
-
getClient
public ApplicationConnection getClient()
- Specified by:
getClientin interfaceActionOwner
-
getPaintableId
public String getPaintableId()
- Specified by:
getPaintableIdin interfaceActionOwner
-
setSelected
public void setSelected(boolean selected)
Adds/removes Vaadin specific style name.For internal use only. May be removed or replaced in the future.
- Parameters:
selected-
-
isSelected
protected boolean isSelected()
-
isGrandParentOf
public boolean isGrandParentOf(VTree.TreeNode child)
Travels up the hierarchy looking for this node.- Parameters:
child- The child which grandparent this is or is not- Returns:
- True if this is a grandparent of the child node
-
isSibling
public boolean isSibling(VTree.TreeNode node)
-
showContextMenu
public void showContextMenu(com.google.gwt.user.client.Event event)
-
onDetach
protected void onDetach()
- Overrides:
onDetachin classcom.google.gwt.user.client.ui.Widget
-
toString
public String toString()
- Overrides:
toStringin classcom.google.gwt.user.client.ui.UIObject
-
setFocused
public void setFocused(boolean focused)
Is the node focused?- Parameters:
focused- True if focused, false if not
-
scrollIntoView
public void scrollIntoView()
Scrolls the caption into view.
-
setNodeStyleName
public void setNodeStyleName(String styleName)
-
-