| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.nebula.widgets.nattable.selection.MoveSelectionCommandHandler<T>
T - The type of the ILayerCommand this
            ILayerCommandHandler handles. Needs to be a
            MoveSelectionCommand or subtype.public abstract class MoveSelectionCommandHandler<T extends MoveSelectionCommand>
Abstraction of the selection behavior during navigation in the grid.
 Implementations of this class specify what to select when the selection moves
 by responding to the MoveSelectionCommand.
MoveCellSelectionCommandHandler, 
MoveRowSelectionCommandHandler| Field Summary | |
|---|---|
protected  ITraversalStrategy | 
horizontalTraversalStrategy
The strategy to use on horizontal traversal.  | 
protected  SelectionLayer | 
selectionLayer
The SelectionLayer instance which is needed to perform selection operations.  | 
protected  ITraversalStrategy | 
verticalTraversalStrategy
The strategy to use on vertical traversal.  | 
| Constructor Summary | |
|---|---|
MoveSelectionCommandHandler(SelectionLayer selectionLayer)
Create a MoveSelectionCommandHandler for the given SelectionLayer
 . | 
|
MoveSelectionCommandHandler(SelectionLayer selectionLayer,
                            ITraversalStrategy traversalStrategy)
Create a MoveSelectionCommandHandler for the given SelectionLayer
 . | 
|
MoveSelectionCommandHandler(SelectionLayer selectionLayer,
                            ITraversalStrategy horizontalTraversalStrategy,
                            ITraversalStrategy verticalTraversalStrategy)
Create a MoveSelectionCommandHandler for the given SelectionLayer
 . | 
|
| Method Summary | |
|---|---|
 boolean | 
doCommand(ILayer targetLayer,
          T command)
 | 
protected  ITraversalStrategy | 
getTraversalStrategy(T command)
Determines the ITraversalStrategy that should be used to move the
 selection on handling the given command. | 
protected abstract  void | 
moveLastSelectedDown(ITraversalStrategy traversalStrategy,
                     boolean withShiftMask,
                     boolean withControlMask)
Moves the selection from the current position down.  | 
protected abstract  void | 
moveLastSelectedLeft(ITraversalStrategy traversalStrategy,
                     boolean withShiftMask,
                     boolean withControlMask)
Moves the selection from the current position to the left.  | 
protected abstract  void | 
moveLastSelectedRight(ITraversalStrategy traversalStrategy,
                      boolean withShiftMask,
                      boolean withControlMask)
Moves the selection from the current position to the right.  | 
protected abstract  void | 
moveLastSelectedUp(ITraversalStrategy traversalStrategy,
                   boolean withShiftMask,
                   boolean withControlMask)
Moves the selection from the current position up.  | 
protected  void | 
moveSelection(SelectionLayer.MoveDirectionEnum moveDirection,
              ITraversalStrategy traversalStrategy,
              boolean withShiftMask,
              boolean withControlMask)
Moves the selection from the current position into the given move direction.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.eclipse.nebula.widgets.nattable.command.ILayerCommandHandler | 
|---|
getCommandClass | 
| Field Detail | 
|---|
protected final SelectionLayer selectionLayer
protected final ITraversalStrategy horizontalTraversalStrategy
protected final ITraversalStrategy verticalTraversalStrategy
| Constructor Detail | 
|---|
public MoveSelectionCommandHandler(SelectionLayer selectionLayer)
SelectionLayer
 . Uses the ITraversalStrategy.AXIS_TRAVERSAL_STRATEGY as default
 strategy for selection movement.
selectionLayer - The SelectionLayer on which the selection should be
            performed.
public MoveSelectionCommandHandler(SelectionLayer selectionLayer,
                                   ITraversalStrategy traversalStrategy)
SelectionLayer
 .
selectionLayer - The SelectionLayer on which the selection should be
            performed.traversalStrategy - The strategy that should be used for selection movements. Can
            not be null.
public MoveSelectionCommandHandler(SelectionLayer selectionLayer,
                                   ITraversalStrategy horizontalTraversalStrategy,
                                   ITraversalStrategy verticalTraversalStrategy)
SelectionLayer
 .
selectionLayer - The SelectionLayer on which the selection should be
            performed.horizontalTraversalStrategy - The strategy that should be used for horizontal selection
            movements. Can not be null.verticalTraversalStrategy - The strategy that should be used for vertical selection
            movements. Can not be null.| Method Detail | 
|---|
public boolean doCommand(ILayer targetLayer,
                         T command)
doCommand in interface ILayerCommandHandler<T extends MoveSelectionCommand>targetLayer - the target layercommand - the command
protected ITraversalStrategy getTraversalStrategy(T command)
ITraversalStrategy that should be used to move the
 selection on handling the given command. The strategy is determined in
 the following way:
 ITraversalStrategy carried by the commandITraversalStrategy but a carries a
 dedicated step count, create a temporary ITraversalStrategy that
 is configured with the locally configured ITraversalStrategy but
 returns the step count carried by the command.ITraversalStrategy and no
 dedicated step count, the ITraversalStrategy registered with this
 command handler is returned.
command - The current handled command.
ITraversalStrategy that should be used to move the
         selection. null for SelectionLayer.MoveDirectionEnum.NONE.
protected void moveSelection(SelectionLayer.MoveDirectionEnum moveDirection,
                             ITraversalStrategy traversalStrategy,
                             boolean withShiftMask,
                             boolean withControlMask)
moveDirection - The direction to move to.traversalStrategy - the traversal strategy to determine the number of steps to
            move and the behavior on moving over the borderwithShiftMask - boolean flag to indicate whether the shift key modifier is
            enabled or notwithControlMask - boolean flag to indicate whether the control key modifier is
            enabled or not
protected abstract void moveLastSelectedRight(ITraversalStrategy traversalStrategy,
                                              boolean withShiftMask,
                                              boolean withControlMask)
traversalStrategy - the traversal strategy to determine the number of steps to
            move and the behavior on moving over the borderwithShiftMask - boolean flag to indicate whether the shift key modifier is
            enabled or notwithControlMask - boolean flag to indicate whether the control key modifier is
            enabled or not
protected abstract void moveLastSelectedLeft(ITraversalStrategy traversalStrategy,
                                             boolean withShiftMask,
                                             boolean withControlMask)
traversalStrategy - the traversal strategy to determine the number of steps to
            move and the behavior on moving over the borderwithShiftMask - boolean flag to indicate whether the shift key modifier is
            enabled or notwithControlMask - boolean flag to indicate whether the control key modifier is
            enabled or not
protected abstract void moveLastSelectedUp(ITraversalStrategy traversalStrategy,
                                           boolean withShiftMask,
                                           boolean withControlMask)
traversalStrategy - the traversal strategy to determine the number of steps to
            move and the behavior on moving over the borderwithShiftMask - boolean flag to indicate whether the shift key modifier is
            enabled or notwithControlMask - boolean flag to indicate whether the control key modifier is
            enabled or not
protected abstract void moveLastSelectedDown(ITraversalStrategy traversalStrategy,
                                             boolean withShiftMask,
                                             boolean withControlMask)
traversalStrategy - the traversal strategy to determine the number of steps to
            move and the behavior on moving over the borderwithShiftMask - boolean flag to indicate whether the shift key modifier is
            enabled or notwithControlMask - boolean flag to indicate whether the control key modifier is
            enabled or not
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||