Class MoveSelectionAction
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.selection.action.AbstractKeySelectAction
-
- org.eclipse.nebula.widgets.nattable.selection.action.MoveSelectionAction
-
- All Implemented Interfaces:
IKeyAction
- Direct Known Subclasses:
PasteOrMoveSelectionAction
public class MoveSelectionAction extends AbstractKeySelectAction
IKeyAction
to perform selection movements on key press. By default it will move the selection by 1 into the specified direction. It is possible to specify anITraversalStrategy
that should be used on moving into the given direction. This allows different traversal behavior on different key strokes, e.g. axis cycle on up/down, table cycle on left/right.
-
-
Constructor Summary
Constructors Constructor Description MoveSelectionAction(SelectionLayer.MoveDirectionEnum direction)
Create a MoveSelectionAction that executes aMoveSelectionCommand
to move the selection into the given direction by 1.MoveSelectionAction(SelectionLayer.MoveDirectionEnum direction, boolean shiftMask, boolean ctrlMask)
Create a MoveSelectionAction that executes aMoveSelectionCommand
to move the selection into the given direction by 1.MoveSelectionAction(SelectionLayer.MoveDirectionEnum direction, ITraversalStrategy traversalStrategy)
Create a MoveSelectionAction that executes aMoveSelectionCommand
to move the selection into the given direction by using the givenITraversalStrategy
.MoveSelectionAction(SelectionLayer.MoveDirectionEnum direction, ITraversalStrategy traversalStrategy, boolean shiftMask, boolean ctrlMask)
Create a MoveSelectionAction that executes aMoveSelectionCommand
to move the selection into the given direction by using the givenITraversalStrategy
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run(NatTable natTable, org.eclipse.swt.events.KeyEvent event)
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.selection.action.AbstractKeySelectAction
getDirection, isControlMask, isShiftMask, setControlMask, setShiftMask
-
-
-
-
Constructor Detail
-
MoveSelectionAction
public MoveSelectionAction(SelectionLayer.MoveDirectionEnum direction)
Create a MoveSelectionAction that executes aMoveSelectionCommand
to move the selection into the given direction by 1. Using this constructor theITraversalStrategy
registered with theMoveSelectionCommandHandler
will be used to handle traversal.- Parameters:
direction
- The direction the selection should move to.
-
MoveSelectionAction
public MoveSelectionAction(SelectionLayer.MoveDirectionEnum direction, boolean shiftMask, boolean ctrlMask)
Create a MoveSelectionAction that executes aMoveSelectionCommand
to move the selection into the given direction by 1. Using this constructor theITraversalStrategy
registered with theMoveSelectionCommandHandler
will be used to handle traversal.This constructor allows to specify if key modifiers should are activated.
- Parameters:
direction
- The direction the selection should move to.shiftMask
- Whether the shift modifier is activated.ctrlMask
- Whether the control modifier is activated.
-
MoveSelectionAction
public MoveSelectionAction(SelectionLayer.MoveDirectionEnum direction, ITraversalStrategy traversalStrategy)
Create a MoveSelectionAction that executes aMoveSelectionCommand
to move the selection into the given direction by using the givenITraversalStrategy
.- Parameters:
direction
- The direction the selection should move to.traversalStrategy
- TheITraversalStrategy
that should be used by moving the selection.
-
MoveSelectionAction
public MoveSelectionAction(SelectionLayer.MoveDirectionEnum direction, ITraversalStrategy traversalStrategy, boolean shiftMask, boolean ctrlMask)
Create a MoveSelectionAction that executes aMoveSelectionCommand
to move the selection into the given direction by using the givenITraversalStrategy
.This constructor allows to specify if key modifiers should are activated.
- Parameters:
direction
- The direction the selection should move to.traversalStrategy
- TheITraversalStrategy
that should be used by moving the selection.shiftMask
- Whether the shift modifier is activated.ctrlMask
- Whether the control modifier is activated.
-
-
Method Detail
-
run
public void run(NatTable natTable, org.eclipse.swt.events.KeyEvent event)
- Specified by:
run
in interfaceIKeyAction
- Overrides:
run
in classAbstractKeySelectAction
-
-