Package org.testfx.robot.impl
Class MoveRobotImpl
java.lang.Object
org.testfx.robot.impl.MoveRobotImpl
- All Implemented Interfaces:
MoveRobot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BaseRobot
private static final long
private static final long
private final MouseRobot
private static final long
private final SleepRobot
-
Constructor Summary
ConstructorsConstructorDescriptionMoveRobotImpl
(BaseRobot baseRobot, MouseRobot mouseRobot, SleepRobot sleepRobot) -
Method Summary
Modifier and TypeMethodDescriptionprivate javafx.geometry.Point2D
interpolatePointBetween
(javafx.geometry.Point2D point0, javafx.geometry.Point2D point1, double factor) private List
<javafx.geometry.Point2D> interpolatePointsBetween
(javafx.geometry.Point2D sourcePoint, javafx.geometry.Point2D targetPoint, int pointOffsetCount) private double
interpolateValuesBetween
(double value0, double value1, double factor) private double
limitValueBetween
(double value, double minValue, double maxValue) void
Moves the mouse from the current location to the given (x
,y
) location.private void
moveMouseStepwiseBetween
(javafx.geometry.Point2D sourcePoint, javafx.geometry.Point2D targetPoint, Motion motion) void
moveTo
(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 Details
-
SLEEP_AFTER_MOVEMENT_STEP_IN_MILLIS
private static final long SLEEP_AFTER_MOVEMENT_STEP_IN_MILLIS- See Also:
-
MIN_POINT_OFFSET_COUNT
private static final long MIN_POINT_OFFSET_COUNT- See Also:
-
MAX_POINT_OFFSET_COUNT
private static final long MAX_POINT_OFFSET_COUNT -
baseRobot
-
mouseRobot
-
sleepRobot
-
-
Constructor Details
-
MoveRobotImpl
-
-
Method Details
-
moveTo
Description copied from interface:MoveRobot
Moves the mouse to the (x,y) position specified by the givenPointQuery.query()
using the specifiedmotion
(see:Motion
) and clicks whatever is under it. -
moveBy
Description copied from interface:MoveRobot
Moves 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 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)
-