public interface MouseRobot
Modifier and Type | Method and Description |
---|---|
Set<MouseButton> |
getPressedButtons()
Gets the buttons that have been pressed but not yet released.
|
void |
move(Point2D location)
Moves mouse to given location.
|
void |
moveNoWait(Point2D location)
Moves mouse to given location.
|
void |
press(MouseButton... buttons)
Presses given buttons, until explicitly released via
release(MouseButton...) . |
void |
pressNoWait(MouseButton... buttons)
Presses given buttons, until explicitly released via
release(MouseButton...) . |
void |
release(MouseButton... buttons)
Releases given buttons.
|
void |
releaseNoWait(MouseButton... buttons)
Releases given buttons.
|
void |
scroll(int wheelAmount)
Scrolls mouse wheel by the given amount.
|
void |
scrollNoWait(int wheelAmount)
Scrolls mouse wheel by the given amount.
|
void press(MouseButton... buttons)
release(MouseButton...)
. Once pressed,
calls WaitForAsyncUtils.waitForFxEvents()
.
Note: passing in an empty MouseButton[]
will call press(MouseButton.PRIMARY)
.buttons
- the mouse buttonsvoid pressNoWait(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 buttonsSet<MouseButton> getPressedButtons()
void release(MouseButton... buttons)
WaitForAsyncUtils.waitForFxEvents()
.
Note: passing in an empty MouseButton[]
will release all pressed MouseButton
s.buttons
- the mouse buttonsvoid releaseNoWait(MouseButton... buttons)
WaitForAsyncUtils.waitForFxEvents()
is not called.
Note: passing in an empty MouseButton[]
will release all pressed MouseButton
s.buttons
- the mouse buttonsvoid move(Point2D location)
WaitForAsyncUtils.waitForFxEvents()
.location
- the location to movevoid moveNoWait(Point2D location)
WaitForAsyncUtils.waitForFxEvents()
is
not called.location
- the location to movevoid scroll(int wheelAmount)
WaitForAsyncUtils.waitForFxEvents()
.wheelAmount
- the amount to scrollvoid scrollNoWait(int wheelAmount)
WaitForAsyncUtils.waitForFxEvents()
is not called.wheelAmount
- the amount to scroll