Class AlternatingRowConfigLabelAccumulator
java.lang.Object
org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator
- All Implemented Interfaces:
IConfigLabelAccumulator,IConfigLabelProvider
- Direct Known Subclasses:
HierarchicalTreeAlternatingRowConfigLabelAccumulator
Applies 'odd'/'even' labels to all the rows. These labels are the used to
apply color to alternate rows.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an AlternatingRowConfigLabelAccumulator that operates on row positions.Creates an AlternatingRowConfigLabelAccumulator that operates on row indices. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) Add labels applicable to this cell positionReturns the labels that are provided by thisIConfigLabelAccumulator.
-
Field Details
-
ODD_ROW_CONFIG_TYPE
- See Also:
-
EVEN_ROW_CONFIG_TYPE
- See Also:
-
layer
The layer that should be used for row index transformation ornullif no transformation should be performed.- Since:
- 1.6
-
-
Constructor Details
-
AlternatingRowConfigLabelAccumulator
public AlternatingRowConfigLabelAccumulator()Creates an AlternatingRowConfigLabelAccumulator that operates on row positions. In several layer compositions, this will lead to jumping alternating colors, as e.g. the ViewportLayer updates row positions on scrolling. -
AlternatingRowConfigLabelAccumulator
Creates an AlternatingRowConfigLabelAccumulator that operates on row indices. To achieve that it uses the given layer to calculate the row index by given row position.- Parameters:
layer- The layer that should be used for row index transformation, typically the ViewportLayer or body layer stack.
-
-
Method Details
-
accumulateConfigLabels
Description copied from interface:IConfigLabelAccumulatorAdd labels applicable to this cell position- Specified by:
accumulateConfigLabelsin 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
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:
getProvidedLabelsin interfaceIConfigLabelProvider- Returns:
- The labels that are provided by this
IConfigLabelAccumulator. - Since:
- 1.4
-