Class GroupByConfigLabelModifier
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.extension.glazedlists.groupBy.GroupByConfigLabelModifier
-
- All Implemented Interfaces:
IConfigLabelAccumulator
public class GroupByConfigLabelModifier extends Object implements IConfigLabelAccumulator
This is a special kind ofIConfigLabelAccumulator
since it doesn't add a label but remove one on a special condition. If theLabelStack
of a cell contains theTreeLayer.TREE_COLUMN_CELL
label but there is no active grouping, the label gets removed so there is no tree styling (mainly left horizontal alignment) for the tree column.Since the
TreeLayer.TREE_COLUMN_CELL
label will be removed by thisIConfigLabelAccumulator
, it needs to be set to a label that is located on top of theTreeLayer
who adds the label. This for example can be the ViewportLayer.
-
-
Constructor Summary
Constructors Constructor Description GroupByConfigLabelModifier(GroupByModel groupByModel)
Create a newGroupByConfigLabelModifier
that removes theTreeLayer.TREE_COLUMN_CELL
label if no grouping is active.
-
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 position
-
-
-
Constructor Detail
-
GroupByConfigLabelModifier
public GroupByConfigLabelModifier(GroupByModel groupByModel)
Create a newGroupByConfigLabelModifier
that removes theTreeLayer.TREE_COLUMN_CELL
label if no grouping is active.- Parameters:
groupByModel
- TheGroupByModel
which is used to check whether a grouping is active or not.
-
-
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
-
-