Provides a framework for viewers, which are model-based content adapters for SWT widgets.
Package SpecificationA viewer is a model-based adapter on an SWT widget. Each viewer has four parts:
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
AbstractTreeViewer) together with concrete viewer classes (
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 (
ViewerFilter), and sorting (
ViewerSorter); these classes may also be subclassed further if required.
In general terms, creating a viewer involves the following steps:
- instantiating a viewer on some pre-existing SWT widget,
setting the viewer's content provider (an object implementing
setting the viewer's label provider (an object implementing
- and, finally, setting the viewer's input.
IContentProvider.inputChanged). Also, each viewer registers with its label provider for notification of changes that would affect what the viewer displays (see
Note: None of the classes in this package maintain global state.
Interface Summary Interface Description DelegatingStyledCellLabelProvider.IStyledLabelProviderInterface marking a label provider that provides styled text labels and images. IBaseLabelProviderA label provider maps an element of the viewer's model to an optional image and optional text string used to display the element in the viewer's control. IBasicPropertyConstantsPredefined property names used for elements displayed in viewers. ICellEditorListenerA listener which is notified of significant events in the life of a cell editor. ICellEditorValidatorAn interface for validating a cell editor's input. ICellModifierA cell modifier is used to access the data model from a cell editor in an abstract way. ICheckableInterface for objects that support elements with a checked state. ICheckStateListenerA listener which is notified of changes to the checked state of items in checkbox viewers. ICheckStateProviderInterface to provide checked and grayed state information about data in trees or tables. IColorDecoratorThe IColorDecorator is an interface for objects that return a color to decorate either the foreground and background colors for displaying an an object. IColorProviderInterface to provide color representation for a given element. IContentProviderA content provider mediates between the viewer's model and the viewer itself. IDecorationDefines the result of decorating an element. IDecorationContextA decoration context provides additional information to a label decorator. IDelayedLabelDecoratorA delayed label decorator is a label decorator that may not have a decoration available immediately. IDoubleClickListenerA listener which is notified of double-click events on viewers. IElementComparerThis interface is used to compare elements in a viewer for equality, and to provide the hash code for an element. IFilterInterface for filters. IFontDecoratorThe IFontDecorator is an interface for objects that return a font to decorate an object. IFontProviderInterface to provide font representation for a given element. IIndexableLazyContentProviderAdds efficient element indexing support to ILazyContentProvider. IInputProviderInterface common to all objects that provide an input. IInputSelectionProviderInterface common to all objects that provide both an input and a selection. ILabelDecoratorA label decorator decorates the label text and image for some element. ILabelProviderExtends
IBaseLabelProviderwith the methods to provide the text and/or image for the label of a given element.
ILabelProviderListenerA listener which is notified when a label provider's state changes. ILazyContentProviderThe ILazyContentProvider is the content provider for table viewers created using the SWT.VIRTUAL flag that only wish to return their contents as they are queried. ILazyTreeContentProviderThe ILazyTreeContentProvider is the content provider for tree viewers created using the SWT.VIRTUAL flag that only wish to return their contents as they are queried. ILazyTreePathContentProviderThe ILazyTreePathContentProvider is a tree path-based content provider for tree viewers created using the SWT.VIRTUAL flag that only wish to return their contents as they are queried. ILightweightLabelDecoratorThe
ILightweightLabelDecoratoris a decorator that decorates using a prefix, suffix and overlay image rather than doing all of the image and text management itself like an
IOpenListenerA listener which is notified of open events on viewers. IPostSelectionProviderSelection provider extension interface to allow providers to notify about post selection changed events. ISelectionInterface for a selection. ISelectionChangedListenerA listener which is notified when a viewer's selection changes. ISelectionProviderInterface common to all objects that provide a selection. IStructuredContentProviderAn interface to content providers for structured viewers. IStructuredSelectionA selection containing elements. ITableColorProviderInterface to provide color representation for a given cell within the row for an element in a table. ITableFontProviderThe ITableFontProvider is a font provider that provides fonts to individual cells within tables. ITableLabelProviderExtends
IBaseLabelProviderwith the methods to provide the text and/or image for each column of a given element.
IToolTipProviderInterface to provide tool tip information for a given element. ITreeContentProviderAn interface to content providers for tree-structure-oriented viewers. ITreePathContentProviderAn interface to content providers for tree-structure-oriented viewers that provides content based on the path of elements in the tree viewer. ITreePathLabelProviderAn extension to
ILabelProviderthat is given the path of the element being decorated, when it is available.
ITreeSelectionA selection containing tree paths. ITreeViewerListenerA listener which is notified when a tree viewer expands or collapses a node. IViewerLabelProviderExtends
IBaseLabelProviderwith the methods to update the label for a given element.
StructuredViewerInternals.AssociateListenerNothing to see here.
Class Summary Class Description AbstractListViewerAbstract base class for viewers that contain lists of items (such as a combo or list). AbstractTableViewerThis is a widget independent class implementors of
Tablelike widgets can use to provide a viewer on top of their widget implementations.
AbstractTreeViewerAbstract base implementation for tree-structure-oriented viewers (trees and table trees). AcceptAllFilterFilter that accepts everything. ArrayContentProviderThis implementation of
IStructuredContentProviderhandles the case where the viewer input is an unchanging array or collection of elements.
BaseLabelProviderBaseLabelProvider is a default concrete implementation of
StyledString.Stylerthat applies bold style on the given font.
CellEditorAbstract base class for cell editors. CellEditor.LayoutDataStruct-like layout data for cell editors, with reasonable defaults for all fields. CellLabelProviderThe CellLabelProvider is an abstract implementation of a label provider for structured viewers. CellNavigationStrategyThis class implementation the strategy how the table is navigated using the keyboard. CheckboxCellEditorA cell editor that manages a checkbox. CheckboxTableViewerA concrete viewer based on an SWT
Tablecontrol with checkboxes on each node.
CheckboxTreeViewerA concrete tree-structured viewer based on an SWT
Treecontrol with checkboxes on each node.
CheckStateChangedEventEvent object describing a change to the checked state of a viewer element. ColorCellEditorA cell editor that manages a color field. ColumnLabelProvider ColumnLayoutDataAn abstract column layout data describing the information needed (by
TableLayout) to properly lay out a table.
ColumnPixelDataDescribes the width of a table column in pixels, and whether the column is resizable. ColumnViewerThe ColumnViewer is the abstract superclass of viewers that have columns (e.g., AbstractTreeViewer and AbstractTableViewer). ColumnViewerEditorThis is the base for all editor implementations of Viewers. ColumnViewerEditorActivationEventThis event is passed on when a cell-editor is going to be activated ColumnViewerEditorActivationListenerParties interested in activation and deactivation of editors extend this class and implement any or all of the methods ColumnViewerEditorActivationStrategyThis class is responsible to determine if a cell selection event is triggers an editor activation. ColumnViewerEditorDeactivationEventThis event is fired when an editor deactivated ColumnViewerToolTipSupportThe ColumnViewerTooltipSupport is the class that provides tool tips for ColumnViewers. ColumnWeightDataDescribes the width of a table column in terms of a weight, a minimum width, and whether the column is resizable. ComboBoxCellEditorA cell editor that presents a list of items in a combo box. ComboBoxViewerCellEditorA cell editor that presents a list of items in a combo box. ComboViewerA concrete viewer based either on an SWT
ContentViewerA content viewer is a model-based adapter on a widget which accesses its model by means of a content provider and a label provider. DecoratingLabelProviderA decorating label provider is a label provider which combines a nested label provider and an optional decorator. DecoratingStyledCellLabelProviderA
DelegatingStyledCellLabelProviderthat uses a nested
DelegatingStyledCellLabelProvider.IStyledLabelProviderto compute styled text label and image and takes a
ILabelDecoratorto decorate the label.
DecorationContextA concrete implementation of the
IDecorationContextinterface, suitable for instantiating.
DecorationOverlayIconis an image descriptor that can be used to overlay decoration images on to the 4 corner quadrants of a base image.
StyledCellLabelProviderthat delegates requests for the styled string and the image to a
DialogCellEditorAn abstract cell editor that uses a dialog. DoubleClickEventEvent object describing a double-click. EditingSupportEditingSupport is the abstract superclass of the support for cell editing. FocusCellHighlighter FocusCellOwnerDrawHighlighterA concrete implementation of
FocusCellHighlighterusing by setting the control into owner draw mode and highlighting the currently selected cell.
LabelDecoratorThe LabelDecorator is an abstract superclass of ILabelDecorators that support IDecorationContext. LabelProviderA label provider implementation which, by default, uses an element's
toStringvalue for its text and
nullfor its image.
LabelProviderChangedEventEvent object describing a label provider state change. ListViewerA concrete viewer based on an SWT
NamedHandleObjectLabelProviderA label provider for instances of
NamedHandlerObject, which exposes the name as the label.
OpenEventEvent object describing an open which may be generated from a selection or default selection event. OwnerDrawLabelProviderOwnerDrawLabelProvider is an abstract implementation of a label provider that handles custom draw. SelectionChangedEventEvent object describing a selection change. StructuredSelectionA concrete implementation of the
IStructuredSelectioninterface, suitable for instantiating.
StructuredViewerAbstract base implementation for structure-oriented viewers (trees, lists, tables). StructuredViewerInternalsThis class is not part of the public API of JFace. StyledCellLabelProviderA
StyledCellLabelProvidersupports styled labels by using owner draw.
StyledStringA mutable string with styled ranges. StyledString.StylerA styler will be asked to apply its styles to one ore more ranges in the
TableLayoutA layout for a table. TableViewerA concrete viewer based on a SWT
TableViewerColumnViewerColumn implementation for TableViewer to enable column-specific label providers and editing support. TableViewerEditorThis is an editor-implementation for
TableViewerFocusCellManagerThis class is responsible to provide the concept of cells for
TableViewerRowTableViewerRow is the Table specific implementation of ViewerRow TextCellEditorA cell editor that manages a text entry field. TreeColumnViewerLabelProviderTreeViewerLabelProvider is the ViewerLabelProvider that handles TreePaths. TreeExpansionEventEvent object describing a tree node being expanded or collapsed. TreeNodeA simple data structure that is useful for implemented tree models. TreeNodeContentProviderA content provider that expects every element to be a
TreePathA tree path denotes a model element in a tree viewer. TreePathViewerSorterA viewer sorter that is provided extra context in the form of the path of the parent element of the elements being sorted. TreeSelectionA concrete implementation of the
ITreeSelectioninterface, suitable for instantiating.
TreeViewerA concrete viewer based on an SWT
TreeViewerColumnViewerColumn implementation for TreeViewer to enable column-specific label providers and editing support. TreeViewerEditorThis is an editor implementation for
TreeViewerFocusCellManagerThis class is responsible to provide the concept of cells for
TreeViewerRowTreeViewerRow is the Tree implementation of ViewerRow. ViewerA viewer is a model-based adapter on a widget. ViewerCellThe ViewerCell is the JFace representation of a cell entry in a ViewerRow. ViewerColumnInstances of this class represent a column of a
ViewerComparatorA viewer comparator is used by a
StructuredViewerto reorder the elements provided by its content provider.
ViewerDropAdapterThis adapter class provides generic drag-and-drop support for a viewer. ViewerFilterA viewer filter is used by a structured viewer to extract a subset of elements provided by its content provider. ViewerLabelThe ViewerLabel is the class that is passed to a viewer to handle updates of labels. ViewerRowViewerRow is the abstract superclass of the part that represents items in a Table or Tree. ViewerSorter Deprecated.use