Interface ColumnConfiguration
-
- All Known Implementing Classes:
ColumnConfigurationImpl
public interface ColumnConfigurationA ColumnConfiguration is used to configure how a viewer column shall be created and how it behaves during runtime.- Author:
- Johannes Faltermeier, Mat Hansen
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<Feature>ALL_FEATURESAll configurable features.static java.lang.StringCOLUMN_IDData key for column id.static java.lang.StringDMRData key for a domain model reference.static FeatureFEATURE_COLUMN_FILTERFeature toggle for column filter support.static FeatureFEATURE_COLUMN_HIDE_SHOWFeature toggle for column hide/show support.static FeatureFEATURE_COLUMN_REGEX_FILTERFeature toggle for column filter support.static Feature[]FEATURESDeprecated.Since 1.21, use the immutableALL_FEATURESset instead of this, which can be modified in place.static java.lang.StringIDColumn data configuration key.static java.lang.StringMIN_WIDTHData key for the minimum width of the column.static intNO_WEIGHTConstant indicating thatgetWeight()has no value.static java.lang.StringRESIZABLEData key for resizable columns.static java.lang.StringWEIGHTData key for column weight.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<org.eclipse.jface.viewers.EditingSupport>createEditingSupport(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)Called to setup theEditingSupportfor the viewer.org.eclipse.jface.viewers.CellLabelProvidercreateLabelProvider(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)The cell label provider which will be set on the column.voiddispose()Dispose this configuration and all its properties.Optional<org.eclipse.swt.graphics.Image>getColumnImage()The image of the column.org.eclipse.core.databinding.observable.value.IObservableValuegetColumnText()The header text for the column.org.eclipse.core.databinding.observable.value.IObservableValuegetColumnTooltip()The column header tooltip text.java.util.List<ConfigurationCallback<org.eclipse.jface.viewers.AbstractTableViewer,org.eclipse.jface.viewers.ViewerColumn>>getConfigurationCallbacks()Get the list of additional ConfigurationCallbacks.java.util.Map<java.lang.String,java.lang.Object>getData()Get the underlying data map.java.lang.ObjectgetData(java.lang.String key)Get an arbitrary element from the data map.java.util.Set<Feature>getEnabledFeatures()Returns a static array of enabled features.intgetMinWidth()The minimal width of the column.intgetStyleBits()The SWT style bits which will be used to create the column.intgetWeight()The weight of the column.booleanisMoveable()trueif moveable,falseotherwise.booleanisResizeable()trueif resizeable,falseotherwise.Property<java.lang.Object>matchFilter()Set a filter on the current column.voidsetData(java.util.Map<java.lang.String,java.lang.Object> data)Add the contents of the given map to the data map.Property<java.lang.Boolean>showFilterControl()Toggle the visible state of the filter control.Property<java.lang.Boolean>visible()Toggle the visible state of the column.
-
-
-
Field Detail
-
FEATURE_COLUMN_HIDE_SHOW
static final Feature FEATURE_COLUMN_HIDE_SHOW
Feature toggle for column hide/show support. Can be enabled on a per-column basis.
-
FEATURE_COLUMN_FILTER
static final Feature FEATURE_COLUMN_FILTER
Feature toggle for column filter support.
-
FEATURE_COLUMN_REGEX_FILTER
static final Feature FEATURE_COLUMN_REGEX_FILTER
Feature toggle for column filter support.
-
ALL_FEATURES
static final java.util.Set<Feature> ALL_FEATURES
All configurable features.- Since:
- 1.21
-
FEATURES
@Deprecated static final Feature[] FEATURES
Deprecated.Since 1.21, use the immutableALL_FEATURESset instead of this, which can be modified in place.All configurable features.
-
ID
static final java.lang.String ID
Column data configuration key.- See Also:
- Constant Field Values
-
RESIZABLE
static final java.lang.String RESIZABLE
Data key for resizable columns.- See Also:
- Constant Field Values
-
WEIGHT
static final java.lang.String WEIGHT
Data key for column weight.- See Also:
- Constant Field Values
-
NO_WEIGHT
static final int NO_WEIGHT
Constant indicating thatgetWeight()has no value.- See Also:
- Constant Field Values
-
MIN_WIDTH
static final java.lang.String MIN_WIDTH
Data key for the minimum width of the column.- See Also:
- Constant Field Values
-
COLUMN_ID
static final java.lang.String COLUMN_ID
Data key for column id.- See Also:
- Constant Field Values
-
DMR
static final java.lang.String DMR
Data key for a domain model reference.- See Also:
- Constant Field Values
-
-
Method Detail
-
getEnabledFeatures
java.util.Set<Feature> getEnabledFeatures()
Returns a static array of enabled features.- Returns:
- array of enabled features.
-
isResizeable
boolean isResizeable()
trueif resizeable,falseotherwise.- Returns:
- whether the column is resizeable
-
isMoveable
boolean isMoveable()
trueif moveable,falseotherwise.- Returns:
- whether the column is moveable
-
getStyleBits
int getStyleBits()
The SWT style bits which will be used to create the column.- Returns:
- the SWT style bits for the column
-
getWeight
int getWeight()
The weight of the column.- Returns:
- the weight of the column
-
getMinWidth
int getMinWidth()
The minimal width of the column.- Returns:
- the min width of the column in pixels
-
getColumnText
org.eclipse.core.databinding.observable.value.IObservableValue getColumnText()
The header text for the column.- Returns:
- the column header text
-
getColumnTooltip
org.eclipse.core.databinding.observable.value.IObservableValue getColumnTooltip()
The column header tooltip text.- Returns:
- the column header tooltip
-
createLabelProvider
org.eclipse.jface.viewers.CellLabelProvider createLabelProvider(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
The cell label provider which will be set on the column.- Parameters:
columnViewer- the column viewer- Returns:
- the label provider
-
createEditingSupport
Optional<org.eclipse.jface.viewers.EditingSupport> createEditingSupport(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
Called to setup theEditingSupportfor the viewer.- Parameters:
columnViewer- theAbstractTableViewer- Returns:
- the editing support for the column, if present
-
getColumnImage
Optional<org.eclipse.swt.graphics.Image> getColumnImage()
The image of the column.- Returns:
- the column image, if present
-
getData
java.lang.Object getData(java.lang.String key)
Get an arbitrary element from the data map.- Parameters:
key- (see constants)- Returns:
- object
-
setData
void setData(java.util.Map<java.lang.String,java.lang.Object> data)
Add the contents of the given map to the data map.- Parameters:
data- object
-
getData
java.util.Map<java.lang.String,java.lang.Object> getData()
Get the underlying data map.- Returns:
- data map object
-
getConfigurationCallbacks
java.util.List<ConfigurationCallback<org.eclipse.jface.viewers.AbstractTableViewer,org.eclipse.jface.viewers.ViewerColumn>> getConfigurationCallbacks()
Get the list of additional ConfigurationCallbacks.- Returns:
- list of ConfigurationCallbacks.
-
visible
Property<java.lang.Boolean> visible()
Toggle the visible state of the column.- Returns:
- visible property
-
showFilterControl
Property<java.lang.Boolean> showFilterControl()
Toggle the visible state of the filter control.- Returns:
- visible property
-
matchFilter
Property<java.lang.Object> matchFilter()
Set a filter on the current column.- Returns:
- visible property
-
dispose
void dispose()
Dispose this configuration and all its properties.
-
-