com.vaadin.terminal.gwt.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.terminal.gwt.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.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

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
static String CLASSNAME
           
static String CLASSNAME_FOCUSED
           
 String key
           
protected  com.google.gwt.user.client.Element nodeCaptionSpan
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
VTree.TreeNode()
           
 
Method Summary
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 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 onAttach()
           
 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?
protected  void setSelected(boolean selected)
          Adds/removes Vaadin specific style name.
 void showContextMenu(com.google.gwt.user.client.Event event)
           
 String toString()
           
 void updateFromUIDL(UIDL uidl, ApplicationConnection client)
           
 
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, adopt, clear, disown, 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, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
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, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

nodeCaptionSpan

protected com.google.gwt.user.client.Element nodeCaptionSpan
Constructor Detail

VTree.TreeNode

public VTree.TreeNode()
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 interface com.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent in class com.google.gwt.user.client.ui.Widget

constructDom

protected void constructDom()

updateFromUIDL

public void updateFromUIDL(UIDL uidl,
                           ApplicationConnection client)

isLeaf

public boolean isLeaf()

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 interface ActionOwner

Returns:
Array of IActions

getClient

public ApplicationConnection getClient()

Specified by:
getClient in interface ActionOwner

getPaintableId

public String getPaintableId()

Specified by:
getPaintableId in interface ActionOwner

setSelected

protected void setSelected(boolean selected)

Adds/removes Vaadin specific style name. This method ought to be called only from VTree.

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)

onAttach

public void onAttach()

Overrides:
onAttach in class com.google.gwt.user.client.ui.Widget

onDetach

protected void onDetach()

Overrides:
onDetach in class com.google.gwt.user.client.ui.Widget

toString

public String toString()

Overrides:
toString in class com.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