Class 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().

See Also:
  • Constructor Details

  • Method Details

    • 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()