Package org.eclipse.jface.viewers
Class ViewerColumn
java.lang.Object
org.eclipse.jface.viewers.ViewerColumn
- Direct Known Subclasses:
TableViewerColumn,TreeViewerColumn
Instances of this class represent a column of a
ColumnViewer. Label
providers and editing support can be configured for each column separately.
Concrete subclasses of ColumnViewer should implement a matching
concrete subclass of ViewerColumn.- Since:
- 3.3
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedViewerColumn(ColumnViewer viewer, Widget columnOwner) Create a new instance of the receiver at columnIndex. -
Method Summary
Modifier and TypeMethodDescriptionReturns the viewer of this viewer column.protected voidDisposes of the label provider (if set), unregisters the listener and nulls the references to the label provider and editing support.voidsetEditingSupport(EditingSupport editingSupport) Set the editing support.voidsetLabelProvider(CellLabelProvider labelProvider) Set the label provider for the column.
-
Constructor Details
-
ViewerColumn
Create a new instance of the receiver at columnIndex.- Parameters:
viewer- the viewer the column is part ofcolumnOwner- the widget owning the viewer in case the widget has no columns this could be the widget itself
-
-
Method Details
-
setLabelProvider
Set the label provider for the column. Subclasses may extend but must call the super implementation.- Parameters:
labelProvider- the newCellLabelProvider
-
setEditingSupport
Set the editing support. Subclasses may extend but must call the super implementation.Users setting up an editable
TreeViewerorTableViewerwith more than 1 column have to pass the SWT.FULL_SELECTION style bit when creating the viewer- Parameters:
editingSupport- TheEditingSupportto set.
-
handleDispose
protected void handleDispose()Disposes of the label provider (if set), unregisters the listener and nulls the references to the label provider and editing support. This method is called when the underlying widget is disposed. Subclasses may extend but must call the super implementation. -
getViewer
Returns the viewer of this viewer column.- Returns:
- Returns the viewer.
- Since:
- 3.4
-