Class ColumnOverrideLabelAccumulator
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.cell.AbstractOverrider
org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator
- All Implemented Interfaces:
IConfigLabelAccumulator
,IConfigLabelProvider
,IPersistable
Registers/Adds configuration labels for a given column (by index). Custom
ICellEditor
, ICellPainter
, IStyle
can then be
registered in the IConfigRegistry
against these labels.
Also @see RowOverrideLabelAccumulator
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This key is used to register overrides for all columns.static final String
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accumulateConfigLabels
(LabelStack configLabels, int columnPosition, int rowPosition) Add labels applicable to this cell positionvoid
loadState
(String prefix, Properties properties) Load the overrides state from the given properties file.void
registerColumnOverrides
(int columnIndex, String... configLabels) Register labels to be contributed a column.void
registerColumnOverrides
(int columnIndex, List<String> configLabels) Register labels to be contributed a column.void
registerColumnOverridesOnTop
(int columnIndex, String... configLabels) Register labels to be contributed a column.void
registerColumnOverridesOnTop
(int columnIndex, List<String> configLabels) Register labels to be contributed a column.void
registerOverrides
(String configLabel) Register a label to be contributed to all columns.void
registerOverrides
(List<String> configLabels) Register labels to be contributed to all columns.void
registerOverridesOnTop
(String configLabel) Register a label to be contributed to all columns.void
registerOverridesOnTop
(List<String> configLabels) Register labels to be contributed to all columns.void
saveState
(String prefix, Properties properties) Save the overrides to a properties file.void
unregisterOverrides
(int columnIndex, String configLabel) Unregister a label that was contributed for a column.void
unregisterOverrides
(int columnIndex, String... configLabels) Unregister labels that were contributed for a column.void
unregisterOverrides
(String configLabel) Unregister a label that was contributed for all columns.void
unregisterOverrides
(List<String> configLabels) Unregister labels that were contributed for all columns.Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.cell.AbstractOverrider
addOverrides, getOverrides, getOverrides, getProvidedLabels, registerOverrides, registerOverrides, registerOverridesOnTop, registerOverridesOnTop, removeOverride
-
Field Details
-
PERSISTENCE_KEY
- See Also:
-
ALL_COLUMN_KEY
This key is used to register overrides for all columns.- See Also:
-
-
Constructor Details
-
ColumnOverrideLabelAccumulator
-
-
Method Details
-
accumulateConfigLabels
Add labels applicable to this cell position- Specified by:
accumulateConfigLabels
in interfaceIConfigLabelAccumulator
- Parameters:
configLabels
- the labels currently applied to the cell. The labels contributed by this provider must be added to this stackcolumnPosition
- of the cell for which labels are being gatheredrowPosition
- of the cell for which labels are being gathered
-
registerColumnOverrides
Register labels to be contributed a column. This label will be applied to all cells in the column.- Parameters:
columnIndex
- The column index of the column to which the config label should be contributed.configLabels
- The config labels to add.
-
registerColumnOverrides
Register labels to be contributed a column. This label will be applied to all cells in the column.- Parameters:
columnIndex
- The column index of the column to which the config label should be contributed.configLabels
- The config labels to add.
-
registerColumnOverridesOnTop
Register labels to be contributed a column. This label will be applied to all cells in the column. Using this method will add the labels on top of the label stack.- Parameters:
columnIndex
- The column index of the column to which the config label should be contributed.configLabels
- The config labels to add.
-
registerColumnOverridesOnTop
Register labels to be contributed a column. This label will be applied to all cells in the column. Using this method will add the labels on top of the label stack.- Parameters:
columnIndex
- The column index of the column to which the config label should be contributed.configLabels
- The config labels to add.
-
unregisterOverrides
Unregister a label that was contributed for a column.- Parameters:
columnIndex
- The column index of the column to which a config label was contributed.configLabel
- The config label to remove.
-
unregisterOverrides
Unregister labels that were contributed for a column.- Parameters:
columnIndex
- The column index of the column to which a config label was contributed.configLabels
- The config labels to remove.
-
registerOverrides
Register a label to be contributed to all columns. This label will be applied to all cells.- Parameters:
configLabel
- The config label that should be added to all cells.
-
registerOverrides
Register labels to be contributed to all columns. These labels will be applied to all cells.- Parameters:
configLabels
- The config labels that should be added to all cells.
-
registerOverridesOnTop
Register a label to be contributed to all columns. This label will be applied to all cells.- Parameters:
configLabel
- The config label that should be added to all cells.
-
registerOverridesOnTop
Register labels to be contributed to all columns. These labels will be applied to all cells.- Parameters:
configLabels
- The config labels that should be added to all cells.
-
unregisterOverrides
Unregister a label that was contributed for all columns.- Parameters:
configLabel
- The config label to remove.
-
unregisterOverrides
Unregister labels that were contributed for all columns.- Parameters:
configLabels
- The config labels to remove.
-
saveState
Save the overrides to a properties file. A line is stored for every column. Example for column 0: prefix.columnOverrideLabelAccumulator.0 = LABEL1,LABEL2- Specified by:
saveState
in interfaceIPersistable
- Parameters:
prefix
- The prefix to use for the state keys. Is also used as the state configuration name.properties
- The Properties instance to save the state to.
-
loadState
Load the overrides state from the given properties file.- Specified by:
loadState
in interfaceIPersistable
- Parameters:
prefix
- The prefix to use for the state keys. Is also used as the state configuration name.properties
- The Properties instance to load the state from.- See Also:
-