Class MoveRobotImpl

java.lang.Object
org.testfx.robot.impl.MoveRobotImpl
All Implemented Interfaces:
MoveRobot

public class MoveRobotImpl extends Object implements MoveRobot
  • 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

      private final BaseRobot baseRobot
    • mouseRobot

      private final MouseRobot mouseRobot
    • sleepRobot

      private final SleepRobot sleepRobot
  • Constructor Details

  • Method Details

    • moveTo

      public void moveTo(PointQuery pointQuery, Motion motion)
      Description copied from interface: MoveRobot
      Moves the mouse to the (x,y) position specified by the given PointQuery.query() using the specified motion (see: Motion) and clicks whatever is under it.
      Specified by:
      moveTo in interface MoveRobot
      Parameters:
      pointQuery - the pointQuery to move to
      motion - the type of motion to use for movement
    • moveBy

      public void moveBy(double x, double y, Motion motion)
      Description copied from interface: MoveRobot
      Moves the mouse from the current location to the given (x, y) location. The movement is done using the given Motion.
      Specified by:
      moveBy in interface MoveRobot
      Parameters:
      x - the amount by which to move the mouse horizontally
      y - the amount by which to move the mouse vertically
      motion - the type of motion to use for movement
    • 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)