Class MoveSelectionCommand

    • Constructor Detail

      • MoveSelectionCommand

        public MoveSelectionCommand​(SelectionLayer.MoveDirectionEnum direction,
                                    boolean shiftMask,
                                    boolean controlMask)
        Creates a MoveSelectionCommand that doesn't specify a step count nor an ITraversalStrategy. Using this constructor will lead to a selection movement that uses the ITraversalStrategy that is registered with the MoveSelectionCommandHandler.
        Parameters:
        direction - The direction to move to.
        shiftMask - boolean flag to indicate whether the shift key modifier is enabled or not
        controlMask - boolean flag to indicate whether the control key modifier is enabled or not
      • MoveSelectionCommand

        public MoveSelectionCommand​(SelectionLayer.MoveDirectionEnum direction,
                                    Integer stepSize,
                                    boolean shiftMask,
                                    boolean controlMask)
        Creates a MoveSelectionCommand that specifies the number of steps to move directly. Using this constructor will cause the usage of the registered ITraversalStrategy in the MoveSelectionCommandHandler while using the specified step size.
        Parameters:
        direction - The direction to move to.
        stepSize - The number of steps to move in the given direction.
        shiftMask - boolean flag to indicate whether the shift key modifier is enabled or not
        controlMask - boolean flag to indicate whether the control key modifier is enabled or not
      • MoveSelectionCommand

        public MoveSelectionCommand​(SelectionLayer.MoveDirectionEnum direction,
                                    ITraversalStrategy traversalStrategy,
                                    boolean shiftMask,
                                    boolean controlMask)
        Parameters:
        direction - The direction to move to.
        traversalStrategy - the traversal strategy to determine the number of steps to move and the behavior on moving over the border
        shiftMask - boolean flag to indicate whether the shift key modifier is enabled or not
        controlMask - boolean flag to indicate whether the control key modifier is enabled or not
    • Method Detail

      • getStepSize

        public Integer getStepSize()
        Returns:
        The number of steps to move. Can be null.
      • getTraversalStrategy

        public ITraversalStrategy getTraversalStrategy()
        Returns:
        The traversal strategy to use for moving.