public final class ColumnConfigurationImpl extends Object implements ColumnConfiguration
ColumnConfiguration
.ALL_FEATURES, COLUMN_ID, DMR, FEATURE_COLUMN_FILTER, FEATURE_COLUMN_HIDE_SHOW, FEATURE_COLUMN_REGEX_FILTER, FEATURES, ID, MIN_WIDTH, NO_WEIGHT, RESIZABLE, WEIGHT
Constructor and Description |
---|
ColumnConfigurationImpl(Set<Feature> enabledFeatures,
boolean resizeable,
boolean moveable,
int styleBits,
int weight,
int minWidth,
org.eclipse.core.databinding.observable.value.IObservableValue columnText,
org.eclipse.core.databinding.observable.value.IObservableValue tooltipText,
CellLabelProviderFactory labelProviderFactory,
EditingSupportCreator editingSupport,
org.eclipse.swt.graphics.Image image,
Map<String,Object> data,
List<ConfigurationCallback<org.eclipse.jface.viewers.AbstractTableViewer,org.eclipse.jface.viewers.ViewerColumn>> configurationCallbacks)
Constructs a new
ColumnConfiguration . |
Modifier and Type | Method and Description |
---|---|
Optional<org.eclipse.jface.viewers.EditingSupport> |
createEditingSupport(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
Called to setup the
EditingSupport for the viewer. |
org.eclipse.jface.viewers.CellLabelProvider |
createLabelProvider(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
The cell label provider which will be set on the column.
|
void |
dispose()
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.IObservableValue |
getColumnText()
The header text for the column.
|
org.eclipse.core.databinding.observable.value.IObservableValue |
getColumnTooltip()
The column header tooltip text.
|
List<ConfigurationCallback<org.eclipse.jface.viewers.AbstractTableViewer,org.eclipse.jface.viewers.ViewerColumn>> |
getConfigurationCallbacks()
Get the list of additional ConfigurationCallbacks.
|
Map<String,Object> |
getData()
Get the underlying data map.
|
Object |
getData(String key)
Get an arbitrary element from the data map.
|
Set<Feature> |
getEnabledFeatures()
Returns a static array of enabled features.
|
int |
getMinWidth()
The minimal width of the column.
|
int |
getStyleBits()
The SWT style bits which will be used to create the column.
|
int |
getWeight()
The weight of the column.
|
boolean |
isMoveable()
true if moveable, false otherwise. |
boolean |
isResizeable()
true if resizeable, false otherwise. |
Property<Object> |
matchFilter()
Set a filter on the current column.
|
void |
setData(Map<String,Object> data)
Add the contents of the given map to the data map.
|
Property<Boolean> |
showFilterControl()
Toggle the visible state of the filter control.
|
Property<Boolean> |
visible()
Toggle the visible state of the column.
|
public ColumnConfigurationImpl(Set<Feature> enabledFeatures, boolean resizeable, boolean moveable, int styleBits, int weight, int minWidth, org.eclipse.core.databinding.observable.value.IObservableValue columnText, org.eclipse.core.databinding.observable.value.IObservableValue tooltipText, CellLabelProviderFactory labelProviderFactory, EditingSupportCreator editingSupport, org.eclipse.swt.graphics.Image image, Map<String,Object> data, List<ConfigurationCallback<org.eclipse.jface.viewers.AbstractTableViewer,org.eclipse.jface.viewers.ViewerColumn>> configurationCallbacks)
ColumnConfiguration
.enabledFeatures
- list of enabled featuresresizeable
- resizeablemoveable
- moveablestyleBits
- styleBitsweight
- weightminWidth
- minWidthcolumnText
- columnTexttooltipText
- tooltipTextlabelProviderFactory
- labelProvidereditingSupport
- editingSupport. May be null
to indicate that there is no editing supportpublic Set<Feature> getEnabledFeatures()
ColumnConfiguration
getEnabledFeatures
in interface ColumnConfiguration
public boolean isResizeable()
ColumnConfiguration
true
if resizeable, false
otherwise.isResizeable
in interface ColumnConfiguration
public boolean isMoveable()
ColumnConfiguration
true
if moveable, false
otherwise.isMoveable
in interface ColumnConfiguration
public int getStyleBits()
ColumnConfiguration
getStyleBits
in interface ColumnConfiguration
public int getWeight()
ColumnConfiguration
getWeight
in interface ColumnConfiguration
public int getMinWidth()
ColumnConfiguration
getMinWidth
in interface ColumnConfiguration
public org.eclipse.core.databinding.observable.value.IObservableValue getColumnText()
ColumnConfiguration
getColumnText
in interface ColumnConfiguration
public org.eclipse.core.databinding.observable.value.IObservableValue getColumnTooltip()
ColumnConfiguration
getColumnTooltip
in interface ColumnConfiguration
public org.eclipse.jface.viewers.CellLabelProvider createLabelProvider(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
ColumnConfiguration
createLabelProvider
in interface ColumnConfiguration
columnViewer
- the column viewerpublic Optional<org.eclipse.jface.viewers.EditingSupport> createEditingSupport(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
ColumnConfiguration
EditingSupport
for the viewer.createEditingSupport
in interface ColumnConfiguration
columnViewer
- the AbstractTableViewer
public Optional<org.eclipse.swt.graphics.Image> getColumnImage()
ColumnConfiguration
getColumnImage
in interface ColumnConfiguration
public void setData(Map<String,Object> data)
ColumnConfiguration
setData
in interface ColumnConfiguration
data
- objectpublic Object getData(String key)
ColumnConfiguration
getData
in interface ColumnConfiguration
key
- (see constants)public Map<String,Object> getData()
ColumnConfiguration
getData
in interface ColumnConfiguration
public List<ConfigurationCallback<org.eclipse.jface.viewers.AbstractTableViewer,org.eclipse.jface.viewers.ViewerColumn>> getConfigurationCallbacks()
ColumnConfiguration
getConfigurationCallbacks
in interface ColumnConfiguration
public Property<Boolean> visible()
ColumnConfiguration
visible
in interface ColumnConfiguration
public Property<Boolean> showFilterControl()
ColumnConfiguration
showFilterControl
in interface ColumnConfiguration
public Property<Object> matchFilter()
ColumnConfiguration
matchFilter
in interface ColumnConfiguration
public void dispose()
ColumnConfiguration
dispose
in interface ColumnConfiguration
Copyright © 2019. All rights reserved.