The TreeTable supports the usual {@link Table} features like lazy loading, soit should be no problem to display lots of items at once. Only required rows and some cache rows are sent to the client.
TreeTable supports standard {@link Hierarchical} container interfaces, butalso a more fine tuned version - {@link Collapsible}. A container implementing the {@link Collapsible} interface stores the collapsed/expandedstate internally and can this way scale better on the server side than with standard Hierarchical implementations. Developer must however note that {@link Collapsible} containers can not be shared among several users as theyshare UI state in the container.
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 {@code TreeTable} instance. Using directly those static constants provides typesafety, as in the following example:
{@preformat javaTreeTable table = ...; // Put here a TreeTable instance. TreeTable.Node node = table.getRoot(); CharSequence name = node.getValue(TableColumn.NAME); Class> type = node.getValue(TableColumn.TYPE);}In the above example, the type of value returned by the {@link 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 {@link #getColumns()}. However this column list does not provide the above type-safety. @author Martin Desruisseaux (Geomatys) @since 0.3 @version 0.3 @module
|
|
|
|
|
|