public interface MouseRobot
| 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
release(MouseButton...). |
void |
pressNoWait(javafx.scene.input.MouseButton... buttons)
Presses the given mouse buttons, until explicitly released via
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.
|
void press(javafx.scene.input.MouseButton... buttons)
release(MouseButton...).
Once pressed, calls WaitForAsyncUtils.waitForFxEvents().
Note: passing in an empty MouseButton[] will call press(MouseButton.PRIMARY).
buttons - the mouse buttons to pressvoid pressNoWait(javafx.scene.input.MouseButton... buttons)
release(MouseButton...).
Once pressed, WaitForAsyncUtils.waitForFxEvents() is not called.
Note: passing in an empty MouseButton[] will call press(MouseButton.PRIMARY).
buttons - the mouse buttons to press without waiting afterwardsjava.util.Set<javafx.scene.input.MouseButton> getPressedButtons()
void release(javafx.scene.input.MouseButton... buttons)
WaitForAsyncUtils.waitForFxEvents().
Note: passing in an empty MouseButton[] will release all pressed MouseButtons.
buttons - the mouse buttons to releasevoid releaseNoWait(javafx.scene.input.MouseButton... buttons)
WaitForAsyncUtils.waitForFxEvents()
is not called.
Note: passing in an empty MouseButton[] will release all pressed MouseButtons.
buttons - the mouse buttons to release without waiting afterwardsvoid move(javafx.geometry.Point2D location)
WaitForAsyncUtils.waitForFxEvents().location - the location to move the mouse tovoid moveNoWait(javafx.geometry.Point2D location)
WaitForAsyncUtils.waitForFxEvents()
is not called.location - the location to move the mouse to without waiting afterwardsvoid scroll(int wheelAmount)
WaitForAsyncUtils.waitForFxEvents().wheelAmount - the amount to scroll the mouse byvoid scrollNoWait(int wheelAmount)
WaitForAsyncUtils.waitForFxEvents() is not called.wheelAmount - the amount to scroll the mouse by without waiting afterwards