Previous Page
Next Page

5.1. List-Oriented Viewers

JFace list viewers, such as ListViewer, TableViewer, and treeViewer, allow you to directly use your domain model objects (e.g., business objects such as Company, Person, Department, etc.) without needing to manually decompose them into their basic string, numerical, and image elements. The viewers do this by providing adapter interfaces for such things as retrieving an item's label (both image and text), for accessing an item's children (in the case of a tree), for selecting an item from a list, for sorting items in the list, for filtering items in the list, and for converting an arbitrary input into a list suitable for the underlying SWT widget (see Figure 5-1).

Figure 5-1. Relationship between viewers and adapters.



Previous Page
Next Page