A viewer is a model-based adapter on a widget.
A viewer can be created as an adapter on a pre-existing control (e.g., creating a ListViewer
on an existing List
control). All viewers also provide a convenience constructor for creating the control.
Implementing a concrete viewer typically involves the following steps:
- create SWT controls for viewer (in constructor) (optional)
- initialize SWT controls from input (inputChanged)
- define viewer-specific update methods
- support selections (
setSelection
, getSelection
)