Class GroupByCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.groupby.GroupByCommand
- All Implemented Interfaces:
ILayerCommand
Command to trigger a groupBy action.
- Since:
- 2.6
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGroupByCommand(GroupByCommand.GroupByAction action, int... indexes) Performs the specified groupBy action for the given indexes. -
Method Summary
Modifier and TypeMethodDescriptionSame semantics asObject.clone()Used to make a copies of the command if has to passed to different layer stacks.booleanconvertToTargetLayer(ILayer targetLayer) Convert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer.int[]
-
Constructor Details
-
GroupByCommand
Performs the specified groupBy action for the given indexes.- Parameters:
action- The groupBy action to performGroupByCommand.GroupByAction.ADD- Add the given indexes to the existing grouping.GroupByCommand.GroupByAction.CLEAR- Clears the existing grouping. Given indexes will be ignored.GroupByCommand.GroupByAction.REMOVE- Removes the given indexes from the existing grouping.GroupByCommand.GroupByAction.SET- Set the given indexes which overrides the existing grouping.
indexes- The indexes of the columns/rows that should be grouped.
-
-
Method Details
-
getAction
- Returns:
- The groupBy action to perform.
-
getIndexes
public int[] getIndexes()- Returns:
- The indexes of the columns/rows that should be grouped.
-
cloneCommand
Description copied from interface:ILayerCommandSame semantics asObject.clone()Used to make a copies of the command if has to passed to different layer stacks.- Specified by:
cloneCommandin interfaceILayerCommand- Returns:
- a cloned instance of the command
- See Also:
-
convertToTargetLayer
Description copied from interface:ILayerCommandConvert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer. If it is not possible to convert the command to the target layer, then this method will return false and the state of this command object will remain unchanged. Note: Commands should not be processed if they fail conversion.- Specified by:
convertToTargetLayerin interfaceILayerCommand- Parameters:
targetLayer- the target layer- Returns:
- true if the command is valid after conversion, false if the command is no longer valid.
-