Package net.storm.api.interact.mouse
Interface MouseMovementStrategy
- All Known Implementing Classes:
BezierCurveMouseMovement,DirectMouseMovement,LinearPathMouseMovement
public interface MouseMovementStrategy
Strategy interface for customizing mouse movement behavior during interactions.
Implementations generate a path (sequence of points) that defines the SHAPE of the mouse movement. The SPEED of execution is determined by the InteractManager based on queue size and other factors.
Responsibilities
- Strategy (this interface): Defines the PATH shape (linear, curved, etc.)
- InteractManager: Determines execution SPEED based on queue size
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classRepresents a mouse movement path - a sequence of points defining the path shape. -
Method Summary
Modifier and TypeMethodDescriptiongeneratePath(Point current, Point target) Generates a mouse movement path from the current position to the target position.
-
Method Details
-
generatePath
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)
- 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
-