public static final class MousePressed.Builder
extends java.lang.Object
MousePressed.
Builders are created by invoking MousePressed.newBuilder(Point). Each of the setter methods
modifies the state of the builder and returns the same instance. Builders are not thread-safe
and should not be used concurrently from multiple threads without external synchronization.
| Modifier and Type | Method and Description |
|---|---|
MousePressed |
build()
Returns a new
MousePressed instance built from the current state of this
builder. |
MousePressed.Builder |
button(MouseButton mouseButton)
Sets the button that is pressed.
|
MousePressed.Builder |
clickCount(int clickCount)
Sets the count of consecutive clicks that happened in a short amount of time.
|
MousePressed.Builder |
keyModifiers(KeyModifiers keyModifiers)
Sets the keyboard modifiers applied.
|
MousePressed.Builder |
locationOnScreen(Point locationOnScreen)
Sets the mouse position relative to the bounds of the screen.
|
public MousePressed.Builder locationOnScreen(Point locationOnScreen)
locationOnScreen - the mouse positionpublic MousePressed.Builder button(MouseButton mouseButton)
mouseButton - the pressed buttonpublic MousePressed.Builder keyModifiers(KeyModifiers keyModifiers)
keyModifiers - the keyboard modifierspublic MousePressed.Builder clickCount(int clickCount)
clickCount - the count of clicksjava.lang.IllegalArgumentException - when clickCount is negativepublic MousePressed build()
MousePressed instance built from the current state of this
builder.MousePressed instance