Interface TreeTable

All Known Implementing Classes:
DefaultTreeTable, TreeTableView

public interface TreeTable
Defines the structure (list of columns) of a table and provides the root of the tree containing the data. TreeTable can be seen as a table in which the first column contains a tree. Every row in this table is a TreeTable.Node instance, and each node can have an arbitrary number of children nodes.

Below is an example of what a two-columns TreeTable instance may look like when formatted as a text:

In many cases, the columns are known in advance as hard-coded static constants. Those column constants are typically documented close to the class producing the TreeTable instance. Using directly those static constants provides type safety, as in the following example:

In the above example, the type of value returned by the TreeTable.Node.getValue(TableColumn) method is determined by the column constant. However, this approach is possible only when the table structure is known in advance. If a method needs to work with arbitrary tables, then that method can get the list of columns by a call to getColumns(). However this column list does not provide the above type-safety.
Since:
0.3
Version:
0.3
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A node in a tree combined with a row in a table.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the table columns, in the order they shall be rendered by default.
    Returns the root node of the tree.