com.vaadin.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.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:
public class VTree.TreeNode extends com.google.gwt.user.client.ui.SimplePanel implements ActionOwner
-
-
Field Summary
Fields Modifier and Type Field Description String[]
actionKeys
For internal use only.
com.google.gwt.user.client.ui.FlowPanel
childNodeContainer
For internal use only.
boolean
childrenLoaded
For internal use only.
static String
CLASSNAME
static String
CLASSNAME_FOCUSED
String
key
protected com.google.gwt.dom.client.Element
nodeCaptionSpan
-
Constructor Summary
Constructors Constructor Description TreeNode()
-
Method Summary
All Methods Modifier and Type Method Description protected void
constructDom()
protected void
emphasis(VerticalDropLocation detail)
Action[]
getActions()
List<VTree.TreeNode>
getChildren()
Returns the children of the node
ApplicationConnection
getClient()
VerticalDropLocation
getDropDetail(com.google.gwt.dom.client.NativeEvent currentGwtEvent)
String
getPaintableId()
boolean
getState()
For internal use only.
boolean
isCaptionElement(com.google.gwt.dom.client.Element target)
Checks if the given element is the caption or the icon.
boolean
isChildrenLoaded()
boolean
isGrandParentOf(VTree.TreeNode child)
Travels up the hierarchy looking for this node
boolean
isLeaf()
protected boolean
isSelected()
boolean
isSibling(VTree.TreeNode node)
void
onBrowserEvent(com.google.gwt.user.client.Event event)
protected void
onDetach()
void
scrollIntoView()
Scrolls the caption into view
void
setFocused(boolean focused)
Is the node focused?
void
setHtml(String html)
For internal use only.
void
setIcon(String iconUrl, String altText)
void
setNodeStyleName(String styleName)
void
setSelected(boolean selected)
Adds/removes Vaadin specific style name.
void
setState(boolean state, boolean notifyServer)
For internal use only.
void
setText(String text)
For internal use only.
void
showContextMenu(com.google.gwt.user.client.Event event)
String
toString()
-
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
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
See Also:
-
CLASSNAME_FOCUSED
public static final String CLASSNAME_FOCUSED
See Also:
-
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 VerticalDropLocation getDropDetail(com.google.gwt.dom.client.NativeEvent currentGwtEvent)
-
emphasis
protected void emphasis(VerticalDropLocation detail)
-
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
Specified by:
onBrowserEvent
in interfacecom.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent
in 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 checkReturns:
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:
getActions
in interfaceActionOwner
Returns:
Array of IActions
-
getClient
public ApplicationConnection getClient()
Specified by:
getClient
in interfaceActionOwner
-
getPaintableId
public String getPaintableId()
Specified by:
getPaintableId
in 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 notReturns:
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:
onDetach
in classcom.google.gwt.user.client.ui.Widget
-
toString
public String toString()
Overrides:
toString
in 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)
-
-