Class ScrollRobotImpl

java.lang.Object
org.testfx.robot.impl.ScrollRobotImpl
All Implemented Interfaces:
ScrollRobot

public class ScrollRobotImpl extends Object implements ScrollRobot
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final MouseRobot
     
    private static final int
     
    private static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    scroll(int amount)
    Scrolls vertically by amount (in terms of ticks of a mouse wheel).
    void
    scroll(int positiveAmount, javafx.geometry.HorizontalDirection direction)
    Scrolls horizontally by amount (in terms of ticks of a mouse wheel) in given direction.
    void
    scroll(int positiveAmount, javafx.geometry.VerticalDirection direction)
    Scrolls vertically by amount (in terms of ticks of a mouse wheel) in given direction.
    void
    scrollDown(int positiveAmount)
    Scrolls down by amount (in terms of ticks of a wheel).
    void
    scrollLeft(int positiveAmount)
    Scrolls left by amount (in terms of ticks of a wheel).
    void
    scrollRight(int positiveAmount)
    Scrolls right by amount (in terms of ticks of a wheel).
    void
    scrollUp(int positiveAmount)
    Scrolls up by amount (in terms of ticks of a mouse wheel).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SCROLL_ONE_UP_OR_LEFT

      private static final int SCROLL_ONE_UP_OR_LEFT
      See Also:
    • SCROLL_ONE_DOWN_OR_RIGHT

      private static final int SCROLL_ONE_DOWN_OR_RIGHT
      See Also:
    • mouseRobot

      private final MouseRobot mouseRobot
  • Constructor Details

    • ScrollRobotImpl

      public ScrollRobotImpl(MouseRobot mouseRobot)
  • Method Details

    • scroll

      public void scroll(int amount)
      Description copied from interface: ScrollRobot
      Scrolls vertically by amount (in terms of ticks of a mouse wheel). If amount is positive we scroll up, if it's negative we scroll down.
      Specified by:
      scroll in interface ScrollRobot
      Parameters:
      amount - the number of scroll ticks to scroll
    • scroll

      public void scroll(int positiveAmount, javafx.geometry.VerticalDirection direction)
      Description copied from interface: ScrollRobot
      Scrolls vertically by amount (in terms of ticks of a mouse wheel) in given direction.
      Specified by:
      scroll in interface ScrollRobot
      Parameters:
      positiveAmount - the number of scroll ticks to scroll vertically
      direction - the vertical direction in which to scroll (up or down)
    • scrollUp

      public void scrollUp(int positiveAmount)
      Description copied from interface: ScrollRobot
      Scrolls up by amount (in terms of ticks of a mouse wheel).
      Specified by:
      scrollUp in interface ScrollRobot
      Parameters:
      positiveAmount - the number of scroll ticks to scroll up
    • scrollDown

      public void scrollDown(int positiveAmount)
      Description copied from interface: ScrollRobot
      Scrolls down by amount (in terms of ticks of a wheel).
      Specified by:
      scrollDown in interface ScrollRobot
      Parameters:
      positiveAmount - the number of scroll ticks to scroll down
    • scroll

      public void scroll(int positiveAmount, javafx.geometry.HorizontalDirection direction)
      Description copied from interface: ScrollRobot
      Scrolls horizontally by amount (in terms of ticks of a mouse wheel) in given direction.
      Specified by:
      scroll in interface ScrollRobot
      Parameters:
      positiveAmount - the number of scroll ticks to scroll horizontally
      direction - the horizontal direction in which to scroll (left or right)
    • scrollRight

      public void scrollRight(int positiveAmount)
      Description copied from interface: ScrollRobot
      Scrolls right by amount (in terms of ticks of a wheel).
      Specified by:
      scrollRight in interface ScrollRobot
      Parameters:
      positiveAmount - the number of scroll ticks to scroll right
    • scrollLeft

      public void scrollLeft(int positiveAmount)
      Description copied from interface: ScrollRobot
      Scrolls left by amount (in terms of ticks of a wheel).
      Specified by:
      scrollLeft in interface ScrollRobot
      Parameters:
      positiveAmount - the number of scroll ticks to scroll left