eu.webtoolkit.jwt
Class WTreeTableNode

java.lang.Object
  extended by eu.webtoolkit.jwt.WObject
      extended by eu.webtoolkit.jwt.WWidget
          extended by eu.webtoolkit.jwt.WCompositeWidget
              extended by eu.webtoolkit.jwt.WTreeNode
                  extended by eu.webtoolkit.jwt.WTreeTableNode

public class WTreeTableNode
extends WTreeNode

A specialized tree node which allows additional data to be associated with each node.

Additional data for each column can be set using setColumnWidget().

CSS

This widget is styled by the current CSS theme. See WTreeNode for details.

See Also:
WTreeNode, WTreeTable

Nested Class Summary
 
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WTreeNode
WTreeNode.ChildCountPolicy, WTreeNode.LoadPolicy
 
Constructor Summary
WTreeTableNode(java.lang.CharSequence labelText)
          Creates a new tree table node.
WTreeTableNode(java.lang.CharSequence labelText, WIconPair labelIcon)
          Creates a new tree table node.
WTreeTableNode(java.lang.CharSequence labelText, WIconPair labelIcon, WTreeTableNode parentNode)
          Creates a new tree table node.
 
Method Summary
 WWidget getColumnWidget(int column)
          Returns the widget set for a column.
 void insertChildNode(int index, WTreeNode node)
          Inserts a child node.
 void setColumnWidget(int column, WWidget widget)
          Sets a widget to be displayed in the given column for this node.
protected  void setTable(WTreeTable table)
          Sets the table for this node.
 
Methods inherited from class eu.webtoolkit.jwt.WTreeNode
addChildNode, collapse, collapsed, descendantAdded, descendantRemoved, doCollapse, doExpand, expand, expanded, getChildCountPolicy, getChildNodes, getDisplayedChildCount, getImagePack, getLabel, getLabelArea, getLabelIcon, getParentNode, getTree, isExpandable, isExpanded, isPopulated, isSelectable, populate, remove, removeChildNode, renderSelected, selected, setChildCountPolicy, setChildrenDecorated, setImagePack, setInteractive, setLabelIcon, setLoadPolicy, setNodeVisible, setSelectable, undoDoCollapse, undoDoExpand
 
Methods inherited from class eu.webtoolkit.jwt.WCompositeWidget
addStyleClass, boxBorder, boxPadding, callJavaScriptMember, doJavaScript, enableAjax, find, getAttributeValue, getClearSides, getDecorationStyle, getFloatSide, getHeight, getId, getImplementation, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getStyleClass, getTabIndex, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, isDisabled, isEnabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isVisible, load, propagateSetEnabled, refresh, removeStyleClass, resize, setAttributeValue, setClearSides, setDecorationStyle, setDisabled, setFloatSide, setHidden, setHiddenKeepsGeometry, setId, setImplementation, setInline, setJavaScriptMember, setLineHeight, setMargin, setMaximumSize, setMinimumSize, setOffsets, setPopup, setPositionScheme, setStyleClass, setTabIndex, setToolTip, setVerticalAlignment
 
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, isRendered, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr
 
Methods inherited from class eu.webtoolkit.jwt.WObject
getObjectName, setObjectName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WTreeTableNode

public WTreeTableNode(java.lang.CharSequence labelText,
                      WIconPair labelIcon,
                      WTreeTableNode parentNode)
Creates a new tree table node.

See Also:
WTreeNode.WTreeNode(CharSequence labelText, WIconPair labelIcon, WTreeNode parent)

WTreeTableNode

public WTreeTableNode(java.lang.CharSequence labelText)
Creates a new tree table node.

Calls this(labelText, (WIconPair)null, (WTreeTableNode)null)


WTreeTableNode

public WTreeTableNode(java.lang.CharSequence labelText,
                      WIconPair labelIcon)
Creates a new tree table node.

Calls this(labelText, labelIcon, (WTreeTableNode)null)

Method Detail

setColumnWidget

public void setColumnWidget(int column,
                            WWidget widget)
Sets a widget to be displayed in the given column for this node.

Columns are counted starting from 0 for the tree list itself, and 1 for the first additional column.

The node label (in column 0) is not considered a column widget. To set a custom widget in column 0, you can add a widget to the WTreeNode#getLabelArea().


getColumnWidget

public WWidget getColumnWidget(int column)
Returns the widget set for a column.

Returns the widget set previously using setColumnWidget(), or null if no widget was previously set.


insertChildNode

public void insertChildNode(int index,
                            WTreeNode node)
Description copied from class: WTreeNode
Inserts a child node.

Inserts the node node at index index.

Overrides:
insertChildNode in class WTreeNode

setTable

protected void setTable(WTreeTable table)
Sets the table for this node.

This method is called when the node is inserted, directly, or indirectly into a table.

You may want to reimplement this method if you wish to customize the behaviour of the node depending on table properties. For example to only associate data with the node when the tree list is actually used inside a table.

See Also:
getTable()