Class MoveRowSelectionCommandHandler

All Implemented Interfaces:
ILayerCommandHandler<MoveSelectionCommand>

public class MoveRowSelectionCommandHandler extends MoveCellSelectionCommandHandler
Preserves the basic semantics of the cell selection. Additionally it selects the entire row when a cell in the row is selected.
  • Constructor Details

    • MoveRowSelectionCommandHandler

      public MoveRowSelectionCommandHandler(SelectionLayer selectionLayer)
      Create a MoveRowSelectionCommandHandler for the given SelectionLayer. Uses the ITraversalStrategy.AXIS_TRAVERSAL_STRATEGY as default strategy for selection movement.
      Parameters:
      selectionLayer - The SelectionLayer on which the selection should be performed.
    • MoveRowSelectionCommandHandler

      public MoveRowSelectionCommandHandler(SelectionLayer selectionLayer, ITraversalStrategy traversalStrategy)
      Create a MoveRowSelectionCommandHandler for the given SelectionLayer.
      Parameters:
      selectionLayer - The SelectionLayer on which the selection should be performed.
      traversalStrategy - The strategy that should be used for selection movements. Can not be null.
    • MoveRowSelectionCommandHandler

      public MoveRowSelectionCommandHandler(SelectionLayer selectionLayer, ITraversalStrategy horizontalTraversalStrategy, ITraversalStrategy verticalTraversalStrategy)
      Create a MoveRowSelectionCommandHandler for the given SelectionLayer .
      Parameters:
      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 Details

    • moveLastSelectedLeft

      protected void moveLastSelectedLeft(ITraversalStrategy traversalStrategy, boolean withShiftMask, boolean withControlMask)
      Description copied from class: MoveSelectionCommandHandler
      Moves the selection from the current position to the left.
      Overrides:
      moveLastSelectedLeft in class MoveCellSelectionCommandHandler
      Parameters:
      traversalStrategy - the traversal strategy to determine the number of steps to move and the behavior on moving over the border
      withShiftMask - boolean flag to indicate whether the shift key modifier is enabled or not
      withControlMask - boolean flag to indicate whether the control key modifier is enabled or not
    • moveLastSelectedRight

      protected void moveLastSelectedRight(ITraversalStrategy traversalStrategy, boolean withShiftMask, boolean withControlMask)
      Description copied from class: MoveSelectionCommandHandler
      Moves the selection from the current position to the right.
      Overrides:
      moveLastSelectedRight in class MoveCellSelectionCommandHandler
      Parameters:
      traversalStrategy - the traversal strategy to determine the number of steps to move and the behavior on moving over the border
      withShiftMask - boolean flag to indicate whether the shift key modifier is enabled or not
      withControlMask - boolean flag to indicate whether the control key modifier is enabled or not
    • moveLastSelectedUp

      protected void moveLastSelectedUp(ITraversalStrategy traversalStrategy, boolean withShiftMask, boolean withControlMask)
      Description copied from class: MoveSelectionCommandHandler
      Moves the selection from the current position up.
      Overrides:
      moveLastSelectedUp in class MoveCellSelectionCommandHandler
      Parameters:
      traversalStrategy - the traversal strategy to determine the number of steps to move and the behavior on moving over the border
      withShiftMask - boolean flag to indicate whether the shift key modifier is enabled or not
      withControlMask - boolean flag to indicate whether the control key modifier is enabled or not
    • moveLastSelectedDown

      protected void moveLastSelectedDown(ITraversalStrategy traversalStrategy, boolean withShiftMask, boolean withControlMask)
      Description copied from class: MoveSelectionCommandHandler
      Moves the selection from the current position down.
      Overrides:
      moveLastSelectedDown in class MoveCellSelectionCommandHandler
      Parameters:
      traversalStrategy - the traversal strategy to determine the number of steps to move and the behavior on moving over the border
      withShiftMask - boolean flag to indicate whether the shift key modifier is enabled or not
      withControlMask - boolean flag to indicate whether the control key modifier is enabled or not