Interface MouseAlgorithm
-
- All Known Implementing Classes:
StandardMouseAlgorithm
public interface MouseAlgorithmMouse Algorithm to handle both movement and click implementations
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclear()booleanhandleClick(MouseButton button)Handles the clicking process.booleanhandleMovement(AbstractMouseDestination destination)default voidhandleWheel(WheelMode mode)Handles a single scroll event.
-
-
-
Method Detail
-
handleMovement
boolean handleMovement(AbstractMouseDestination destination)
-
handleClick
boolean handleClick(MouseButton button)
Handles the clicking process. If you wish to use theStandardMouseAlgorithm.handleClick(MouseButton)you can implement this method and pass it toMouse.getDefaultMouseAlgorithm()- Parameters:
button-- Returns:
-
handleWheel
default void handleWheel(WheelMode mode)
Handles a single scroll event.Here's a minimal example that uses our built-in scroll events, with a very simple random timing between:
WheelEvent event = new WheelEvent(mode); event.run(); Thread.sleep(Calculations.random(20, 30));- Parameters:
mode- the direction of the scroll
-
clear
default void clear()
-
-