|Java TM Look and Feel Design Guidelines: Advanced Topics > Part II: Special Topics > 5: Idioms > Tree Table Idiom||
A tree table is a table in which the leftmost column is a tree of objects, one object to a row, and the other columns consist of rows that describe the corresponding object in the tree. Figure 55 shows a tree table. You can use a tree table to display two or more properties of each object in a tree.Figure 55 Tree Table
In tree tables, each object in the tree is either a leaf node (such as a file) or a container (such as a folder). A container can contain leaf nodes and other containers. Users can expand or collapse rows for containers to show or hide rows for the container's contents.
Figure 56 shows containers and leaf nodes in tree table.Figure 56 Containers and Leaf Nodes in a Tree Table
By default, tree tables enable users to select only a single row. Selecting a row that corresponds to a container does not select rows for the container's contents. Moving or copying a container's row within a tree table also moves or copies the rows for the container's contents. Likewise, deleting a container's row from a tree table also deletes the rows for the container's contents.
You can enable users to sort the rows of a tree table. The default sort is hierarchical. It sorts leaf nodes and containers as a single set, with each container's contents sorted under that container.
In some applications, users might need to sort all rows of tree table as a single set, ignoring whether rows are for containers or leaf nodes. You can provide this capability by enabling users to convert a tree table into a non-hierarchical table. If you provide this capability, also provide a separate command for performing the conversion.
|Java Look and Feel Design Guidelines: Advanced Topics.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved.