Package org.testfx.robot.impl
Class MoveRobotImpl
- java.lang.Object
-
- org.testfx.robot.impl.MoveRobotImpl
-
-
Field Summary
Fields Modifier and Type Field Description private BaseRobotbaseRobotprivate static longMAX_POINT_OFFSET_COUNTprivate static longMIN_POINT_OFFSET_COUNTprivate MouseRobotmouseRobotprivate static longSLEEP_AFTER_MOVEMENT_STEP_IN_MILLISprivate SleepRobotsleepRobot
-
Constructor Summary
Constructors Constructor Description MoveRobotImpl(BaseRobot baseRobot, MouseRobot mouseRobot, SleepRobot sleepRobot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private javafx.geometry.Point2DinterpolatePointBetween(javafx.geometry.Point2D point0, javafx.geometry.Point2D point1, double factor)private java.util.List<javafx.geometry.Point2D>interpolatePointsBetween(javafx.geometry.Point2D sourcePoint, javafx.geometry.Point2D targetPoint, int pointOffsetCount)private doubleinterpolateValuesBetween(double value0, double value1, double factor)private doublelimitValueBetween(double value, double minValue, double maxValue)voidmoveBy(double x, double y, Motion motion)Moves the mouse from the current location to the given (x,y) location.private voidmoveMouseStepwiseBetween(javafx.geometry.Point2D sourcePoint, javafx.geometry.Point2D targetPoint, Motion motion)voidmoveTo(PointQuery pointQuery, Motion motion)Moves the mouse to the (x,y) position specified by the givenPointQuery.query()using the specifiedmotion(see:Motion) and clicks whatever is under it.
-
-
-
Field Detail
-
SLEEP_AFTER_MOVEMENT_STEP_IN_MILLIS
private static final long SLEEP_AFTER_MOVEMENT_STEP_IN_MILLIS
- See Also:
- Constant Field Values
-
MIN_POINT_OFFSET_COUNT
private static final long MIN_POINT_OFFSET_COUNT
- See Also:
- Constant Field Values
-
MAX_POINT_OFFSET_COUNT
private static final long MAX_POINT_OFFSET_COUNT
-
baseRobot
private final BaseRobot baseRobot
-
mouseRobot
private final MouseRobot mouseRobot
-
sleepRobot
private final SleepRobot sleepRobot
-
-
Constructor Detail
-
MoveRobotImpl
public MoveRobotImpl(BaseRobot baseRobot, MouseRobot mouseRobot, SleepRobot sleepRobot)
-
-
Method Detail
-
moveTo
public void moveTo(PointQuery pointQuery, Motion motion)
Description copied from interface:MoveRobotMoves the mouse to the (x,y) position specified by the givenPointQuery.query()using the specifiedmotion(see:Motion) and clicks whatever is under it.
-
moveBy
public void moveBy(double x, double y, Motion motion)Description copied from interface:MoveRobotMoves the mouse from the current location to the given (x,y) location. The movement is done using the givenMotion.
-
moveMouseStepwiseBetween
private void moveMouseStepwiseBetween(javafx.geometry.Point2D sourcePoint, javafx.geometry.Point2D targetPoint, Motion motion)
-
interpolatePointsBetween
private java.util.List<javafx.geometry.Point2D> interpolatePointsBetween(javafx.geometry.Point2D sourcePoint, javafx.geometry.Point2D targetPoint, int pointOffsetCount)
-
limitValueBetween
private double limitValueBetween(double value, double minValue, double maxValue)
-
interpolatePointBetween
private javafx.geometry.Point2D interpolatePointBetween(javafx.geometry.Point2D point0, javafx.geometry.Point2D point1, double factor)
-
interpolateValuesBetween
private double interpolateValuesBetween(double value0, double value1, double factor)
-
-