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