This package contains the viewer framework. The viewer framework is an independent JFace module. Using it requires a knowledge of SWT, but does not require familiarity with any of the other JFace modules. The framework consists of abstract base classes for viewers (
- an input - the object that serves as the viewer's model
- a widget - the SWT control through which the viewer's model is displayed
- a content provider - mediates between the model and viewer
- a label provider - maps model objects to displayable labels containing text and/or an image
Viewer
, StructuredViewer
,
AbstractTreeViewer
) together with concrete viewer classes (ListViewer
,
TreeViewer
,
TableViewer
,
TableTreeViewer
, CheckboxTreeViewer
,
and CheckboxTableViewer
),
and various lesser support classes. The concrete structured viewer classes
are ready-to-use and have built-in support for drag-and-drop, filtering
(IViewerFilter
and ViewerFilter
), and sorting (IViewerSorter
and ViewerSorter
); these classes may also be subclassed further
if required.
In general terms, creating a viewer involves the following steps:
IContentProvider
),ILabelProvider
),IContentProvider.inputChanged
).
Also, each viewer registers with its label provider for notification of
changes that would affect what the viewer displays (see ILabelProviderListener.stateChanged
).
Note: None of the classes in this package maintain global state.