Section 5.1. List-Oriented Viewers


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.




Eclipse(c) Building Commercial-Quality Plug-ins
Eclipse: Building Commercial-Quality Plug-ins (2nd Edition)
ISBN: 032142672X
EAN: 2147483647
Year: 2004
Pages: 200

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net