Class ColumnLabelAccumulator
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.layer.cell.ColumnLabelAccumulator
-
- All Implemented Interfaces:
IConfigLabelAccumulator
,IConfigLabelProvider
public class ColumnLabelAccumulator extends Object implements IConfigLabelProvider
Accumulator for column labels allowing to configure cells by their column position. The label of a column isCOLUMN_LABEL_PREFIX
+ column position.
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLUMN_LABEL_PREFIX
The common prefix of column labels (value is "COLUMN_" ).
-
Constructor Summary
Constructors Constructor Description ColumnLabelAccumulator()
Create aColumnLabelAccumulator
.ColumnLabelAccumulator(IDataProvider dataProvider)
Create aColumnLabelAccumulator
which can be used in conjunction with CSS styling, because the labels that are added to the cells are predictable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition)
Add labels applicable to this cell positionCollection<String>
getProvidedLabels()
Returns the labels that are provided by thisIConfigLabelAccumulator
.
-
-
-
Field Detail
-
COLUMN_LABEL_PREFIX
public static final String COLUMN_LABEL_PREFIX
The common prefix of column labels (value is "COLUMN_" ).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ColumnLabelAccumulator
public ColumnLabelAccumulator()
Create aColumnLabelAccumulator
. Creating it via this constructor won't add support for CSS styling because it is not calculatable which labels are created by this instance.- See Also:
ColumnLabelAccumulator(IDataProvider)
-
ColumnLabelAccumulator
public ColumnLabelAccumulator(IDataProvider dataProvider)
Create aColumnLabelAccumulator
which can be used in conjunction with CSS styling, because the labels that are added to the cells are predictable.- Parameters:
dataProvider
- TheIDataProvider
that should be used to calculate which columns are added by this instance.- Since:
- 1.4
-
-
Method Detail
-
accumulateConfigLabels
public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition)
Description copied from interface:IConfigLabelAccumulator
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
-
getProvidedLabels
public Collection<String> getProvidedLabels()
Returns the labels that are provided by thisIConfigLabelAccumulator
. It needs to return all labels that might be applied to support the usage of corresponding selectors in NatTable CSS styling.- Specified by:
getProvidedLabels
in interfaceIConfigLabelProvider
- Returns:
- The labels that are provided by this
IConfigLabelAccumulator
. - Since:
- 1.4
-
-