Class GroupByConfigLabelModifier
java.lang.Object
org.eclipse.nebula.widgets.nattable.extension.glazedlists.groupBy.GroupByConfigLabelModifier
- All Implemented Interfaces:
IConfigLabelAccumulator
This is a special kind of
IConfigLabelAccumulator
since it doesn't
add a label but remove one on a special condition. If the LabelStack
of a cell contains the TreeLayer.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 this
IConfigLabelAccumulator
, it needs to be set to a label that is
located on top of the TreeLayer
who adds the label. This for example
can be the ViewportLayer.
-
Constructor Summary
ConstructorDescriptionGroupByConfigLabelModifier
(GroupByModel groupByModel) Create a newGroupByConfigLabelModifier
that removes theTreeLayer.TREE_COLUMN_CELL
label if no grouping is active. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accumulateConfigLabels
(LabelStack configLabels, int columnPosition, int rowPosition) Add labels applicable to this cell position
-
Constructor Details
-
GroupByConfigLabelModifier
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 Details
-
accumulateConfigLabels
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
-