Package org.testfx.robot.impl
Class ScrollRobotImpl
- java.lang.Object
-
- org.testfx.robot.impl.ScrollRobotImpl
-
- All Implemented Interfaces:
ScrollRobot
public class ScrollRobotImpl extends java.lang.Object implements ScrollRobot
-
-
Field Summary
Fields Modifier and Type Field Description private MouseRobotmouseRobotprivate static intSCROLL_ONE_DOWN_OR_RIGHTprivate static intSCROLL_ONE_UP_OR_LEFT
-
Constructor Summary
Constructors Constructor Description ScrollRobotImpl(MouseRobot mouseRobot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidscroll(int amount)Scrolls vertically byamount(in terms of ticks of a mouse wheel).voidscroll(int positiveAmount, javafx.geometry.HorizontalDirection direction)Scrolls horizontally byamount(in terms of ticks of a mouse wheel) in given direction.voidscroll(int positiveAmount, javafx.geometry.VerticalDirection direction)Scrolls vertically byamount(in terms of ticks of a mouse wheel) in given direction.voidscrollDown(int positiveAmount)Scrolls down byamount(in terms of ticks of a wheel).voidscrollLeft(int positiveAmount)Scrolls left byamount(in terms of ticks of a wheel).voidscrollRight(int positiveAmount)Scrolls right byamount(in terms of ticks of a wheel).voidscrollUp(int positiveAmount)Scrolls up byamount(in terms of ticks of a mouse wheel).
-
-
-
Field Detail
-
SCROLL_ONE_UP_OR_LEFT
private static final int SCROLL_ONE_UP_OR_LEFT
- See Also:
- Constant Field Values
-
SCROLL_ONE_DOWN_OR_RIGHT
private static final int SCROLL_ONE_DOWN_OR_RIGHT
- See Also:
- Constant Field Values
-
mouseRobot
private final MouseRobot mouseRobot
-
-
Constructor Detail
-
ScrollRobotImpl
public ScrollRobotImpl(MouseRobot mouseRobot)
-
-
Method Detail
-
scroll
public void scroll(int amount)
Description copied from interface:ScrollRobotScrolls vertically byamount(in terms of ticks of a mouse wheel). Ifamountis positive we scroll up, if it's negative we scroll down.- Specified by:
scrollin interfaceScrollRobot- Parameters:
amount- the number of scroll ticks to scroll
-
scroll
public void scroll(int positiveAmount, javafx.geometry.VerticalDirection direction)Description copied from interface:ScrollRobotScrolls vertically byamount(in terms of ticks of a mouse wheel) in given direction.- Specified by:
scrollin interfaceScrollRobot- Parameters:
positiveAmount- the number of scroll ticks to scroll verticallydirection- the vertical direction in which to scroll (up or down)
-
scrollUp
public void scrollUp(int positiveAmount)
Description copied from interface:ScrollRobotScrolls up byamount(in terms of ticks of a mouse wheel).- Specified by:
scrollUpin interfaceScrollRobot- Parameters:
positiveAmount- the number of scroll ticks to scroll up
-
scrollDown
public void scrollDown(int positiveAmount)
Description copied from interface:ScrollRobotScrolls down byamount(in terms of ticks of a wheel).- Specified by:
scrollDownin interfaceScrollRobot- Parameters:
positiveAmount- the number of scroll ticks to scroll down
-
scroll
public void scroll(int positiveAmount, javafx.geometry.HorizontalDirection direction)Description copied from interface:ScrollRobotScrolls horizontally byamount(in terms of ticks of a mouse wheel) in given direction.- Specified by:
scrollin interfaceScrollRobot- Parameters:
positiveAmount- the number of scroll ticks to scroll horizontallydirection- the horizontal direction in which to scroll (left or right)
-
scrollRight
public void scrollRight(int positiveAmount)
Description copied from interface:ScrollRobotScrolls right byamount(in terms of ticks of a wheel).- Specified by:
scrollRightin interfaceScrollRobot- Parameters:
positiveAmount- the number of scroll ticks to scroll right
-
scrollLeft
public void scrollLeft(int positiveAmount)
Description copied from interface:ScrollRobotScrolls left byamount(in terms of ticks of a wheel).- Specified by:
scrollLeftin interfaceScrollRobot- Parameters:
positiveAmount- the number of scroll ticks to scroll left
-
-