Class EditSelectionCommandHandler
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler<EditSelectionCommand>
-
- org.eclipse.nebula.widgets.nattable.edit.command.EditSelectionCommandHandler
-
- All Implemented Interfaces:
ILayerCommandHandler<EditSelectionCommand>
public class EditSelectionCommandHandler extends AbstractLayerCommandHandler<EditSelectionCommand>
Command handler for handlingEditSelectionCommand
s. Will first check if all selected cells are editable and if they have the same editor configured. Will call theEditController
for activation of the edit mode if these checks succeed.
-
-
Constructor Summary
Constructors Constructor Description EditSelectionCommandHandler(SelectionLayer selectionLayer)
Creates a command handler that performs the edit checks on theSelectionLayer
.EditSelectionCommandHandler(SelectionLayer selectionLayer, IUniqueIndexLayer upperLayer)
Creates a command handler that performs the edit checks based on the given upper layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doCommand(EditSelectionCommand command)
Class<EditSelectionCommand>
getCommandClass()
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler
doCommand
-
-
-
-
Constructor Detail
-
EditSelectionCommandHandler
public EditSelectionCommandHandler(SelectionLayer selectionLayer)
Creates a command handler that performs the edit checks on theSelectionLayer
.- Parameters:
selectionLayer
- TheSelectionLayer
to retrieve the current selection.
-
EditSelectionCommandHandler
public EditSelectionCommandHandler(SelectionLayer selectionLayer, IUniqueIndexLayer upperLayer)
Creates a command handler that performs the edit checks based on the given upper layer. Needed for example if the upper layer adds information that is needed for checks, e.g. a tree layer.- Parameters:
selectionLayer
- TheSelectionLayer
to retrieve the current selection.upperLayer
- The layer on top of the givenSelectionLayer
to which the selection should be converted to. Can benull
which causes the resulting selected cells to be related to theSelectionLayer
.- Since:
- 1.6
-
-
Method Detail
-
getCommandClass
public Class<EditSelectionCommand> getCommandClass()
-
doCommand
public boolean doCommand(EditSelectionCommand command)
- Specified by:
doCommand
in classAbstractLayerCommandHandler<EditSelectionCommand>
-
-