public class MouseRobotImpl extends java.lang.Object implements MouseRobot
| Constructor and Description |
|---|
MouseRobotImpl(BaseRobot baseRobot) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<javafx.scene.input.MouseButton> |
getPressedButtons()
Gets the mouse buttons that have been pressed but not yet released.
|
void |
move(javafx.geometry.Point2D location)
Moves the mouse to the given location.
|
void |
moveNoWait(javafx.geometry.Point2D location)
Moves the mouse to the given location.
|
void |
press(javafx.scene.input.MouseButton... buttons)
Presses the given mouse buttons, until explicitly released via
MouseRobot.release(MouseButton...). |
void |
pressNoWait(javafx.scene.input.MouseButton... buttons)
Presses the given mouse buttons, until explicitly released via
MouseRobot.release(MouseButton...). |
void |
release(javafx.scene.input.MouseButton... buttons)
Releases the given mouse buttons.
|
void |
releaseNoWait(javafx.scene.input.MouseButton... buttons)
Releases the given mouse buttons.
|
void |
scroll(int wheelAmount)
Scrolls the mouse wheel by the given amount.
|
void |
scrollNoWait(int wheelAmount)
Scrolls the mouse wheel by the given amount.
|
public MouseRobotImpl(BaseRobot baseRobot)
public void press(javafx.scene.input.MouseButton... buttons)
MouseRobotMouseRobot.release(MouseButton...).
Once pressed, calls WaitForAsyncUtils.waitForFxEvents().
Note: passing in an empty MouseButton[] will call press(MouseButton.PRIMARY).
press in interface MouseRobotbuttons - the mouse buttons to presspublic void pressNoWait(javafx.scene.input.MouseButton... buttons)
MouseRobotMouseRobot.release(MouseButton...).
Once pressed, WaitForAsyncUtils.waitForFxEvents() is not called.
Note: passing in an empty MouseButton[] will call press(MouseButton.PRIMARY).
pressNoWait in interface MouseRobotbuttons - the mouse buttons to press without waiting afterwardspublic void release(javafx.scene.input.MouseButton... buttons)
MouseRobotWaitForAsyncUtils.waitForFxEvents().
Note: passing in an empty MouseButton[] will release all pressed MouseButtons.
release in interface MouseRobotbuttons - the mouse buttons to releasepublic void releaseNoWait(javafx.scene.input.MouseButton... buttons)
MouseRobotWaitForAsyncUtils.waitForFxEvents()
is not called.
Note: passing in an empty MouseButton[] will release all pressed MouseButtons.
releaseNoWait in interface MouseRobotbuttons - the mouse buttons to release without waiting afterwardspublic void move(javafx.geometry.Point2D location)
MouseRobotWaitForAsyncUtils.waitForFxEvents().move in interface MouseRobotlocation - the location to move the mouse topublic void moveNoWait(javafx.geometry.Point2D location)
MouseRobotWaitForAsyncUtils.waitForFxEvents()
is not called.moveNoWait in interface MouseRobotlocation - the location to move the mouse to without waiting afterwardspublic void scroll(int wheelAmount)
MouseRobotWaitForAsyncUtils.waitForFxEvents().scroll in interface MouseRobotwheelAmount - the amount to scroll the mouse bypublic void scrollNoWait(int wheelAmount)
MouseRobotWaitForAsyncUtils.waitForFxEvents() is not called.scrollNoWait in interface MouseRobotwheelAmount - the amount to scroll the mouse by without waiting afterwardspublic final java.util.Set<javafx.scene.input.MouseButton> getPressedButtons()
MouseRobotgetPressedButtons in interface MouseRobot