|Java TM Look and Feel Design Guidelines: Advanced Topics > Part II: Special Topics > 5: Idioms > Container-and-Contents Idiom||
Users sometimes need to view a hierarchy of containers--for example, a set of file folders--while also viewing the contents of a selected container--for example, the list of documents in a selected folder. You can provide this capability by using the Container-and-Contents idiom, which consists of a split pane displaying a different view in each of its two panes:
For a description of split panes, see Chapter 7 of Java Look and Feel Design Guidelines , 2d ed.
Figure 62 shows the Container-and-Contents idiom used in the upper two panes of an email application.Figure 62 Container-and-Contents Idiom in an Email Application
In the Container-and-Contents idiom, the left and right panes work together. Changing the selection in the left pane (the tree) changes which object's contents are displayed in the right pane (the table).
In Figure 62, the right pane displays the contents of only one container--labeled Inbox in the left pane--so this behavior does not apply to the figure.
Ensure that double-clicking a collapsed container in the left pane expands that container and makes its subnodes visible in the right pane. Likewise, ensure that double-clicking an expanded container in the left pane collapses that container and causes its subnodes to be become visible in the right pane.
|Java Look and Feel Design Guidelines: Advanced Topics.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved.