Class WTreeTable


public class WTreeTable
extends WCompositeWidget
A table with a navigatable tree in the first column.

A WTreeTable implements a tree table, where additional data associated is associated with tree items, which are organized in columns.

Unlike the MVC-based WTreeView widget, the tree renders a widget hierarchy, rather than a hierarhical standard model. This provides extra flexibility (as any widget can be used as contents), at the cost of server-side, client-side and bandwidth resources (especially for large tree tables).

The actual data is organized and provided by WTreeTableNode widgets.

To use the tree table, you need first to call addColumn() to specify the additional data columns. Next, you need to set the tree root using setTreeRoot() and bind additional information (text or other widgets) in each node using setColumnWidget(). Thus, you cannot change the number of columns once the tree root has been set.

The table cannot be given a height using CSS style rules, instead you must use layout managers, or use WCompositeWidget#resize().

A screenshot of the treetable:

An example WTreeTable (default)

An example WTreeTable (polished)

See Also:
WTreeTableNode, WTreeView