Class DirectMouseMovement

java.lang.Object
net.storm.api.interact.mouse.DirectMouseMovement
All Implemented Interfaces:
MouseMovementStrategy

public class DirectMouseMovement extends Object implements MouseMovementStrategy
Default mouse movement strategy that instantly moves the cursor to the target position. Generates a single-point path (just the target), resulting in instant movement.
  • Constructor Details

    • DirectMouseMovement

      public DirectMouseMovement()
  • Method Details

    • generatePath

      public MouseMovementStrategy.MousePath generatePath(Point current, Point target)
      Description copied from interface: MouseMovementStrategy
      Generates a mouse movement path from the current position to the target position.

      This method must NOT:

      • Dispatch any events
      • Block the thread
      • Determine execution speed (that's the InteractManager's job)
      Specified by:
      generatePath in interface MouseMovementStrategy
      Parameters:
      current - The current mouse position (can be null if unknown)
      target - The target position to move to
      Returns:
      A MousePath containing the sequence of points defining the path shape