Class RowGroupsCommandHandler
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler<IRowGroupCommand>
-
- org.eclipse.nebula.widgets.nattable.group.performance.command.RowGroupsCommandHandler
-
- All Implemented Interfaces:
ILayerCommandHandler<IRowGroupCommand>
public class RowGroupsCommandHandler extends AbstractLayerCommandHandler<IRowGroupCommand>
Command handler for handlingIRowGroupCommand
s to create, remove and rename row groups.- Since:
- 1.6
-
-
Constructor Summary
Constructors Constructor Description RowGroupsCommandHandler(RowGroupHeaderLayer contextLayer, SelectionLayer selectionLayer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
displayRowGroupRenameDialog(DisplayRowGroupRenameDialogCommand command)
boolean
doCommand(IRowGroupCommand command)
Class<IRowGroupCommand>
getCommandClass()
protected boolean
handleCreateRowGroupCommand(String rowGroupName)
Creates a new row group with the given name out of the currently fully selected row positions.protected void
handleRemoveRowGroupCommand(int rowIndex)
Remove the row group at the given row index.protected void
handleUngroupCommand()
Remove the currently fully selected rows from their corresponding groups.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler
doCommand
-
-
-
-
Constructor Detail
-
RowGroupsCommandHandler
public RowGroupsCommandHandler(RowGroupHeaderLayer contextLayer, SelectionLayer selectionLayer)
-
-
Method Detail
-
doCommand
public boolean doCommand(IRowGroupCommand command)
- Specified by:
doCommand
in classAbstractLayerCommandHandler<IRowGroupCommand>
-
handleCreateRowGroupCommand
protected boolean handleCreateRowGroupCommand(String rowGroupName)
Creates a new row group with the given name out of the currently fully selected row positions. If a selected row is part of an existing group, the existing group will be removed and all rows belonging to that group will be also part of the new group.- Parameters:
rowGroupName
- The name of the new row group.- Returns:
true
if the row group could be created,false
if there are no rows fully selected.
-
handleRemoveRowGroupCommand
protected void handleRemoveRowGroupCommand(int rowIndex)
Remove the row group at the given row index.- Parameters:
rowIndex
- The row index to retrieve the row group to remove.
-
handleUngroupCommand
protected void handleUngroupCommand()
Remove the currently fully selected rows from their corresponding groups. Will also trigger a reorder to ensure a consistent group rendering
-
displayRowGroupRenameDialog
protected boolean displayRowGroupRenameDialog(DisplayRowGroupRenameDialogCommand command)
-
getCommandClass
public Class<IRowGroupCommand> getCommandClass()
-
-