public static final class MouseEventParams.Builder
extends java.lang.Object
MouseEventParams
.
Builders are created by invoking MouseEventParams.newBuilder()
. 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 |
---|---|
MouseEventParams |
build()
Returns a new
MouseEventParams instance built from the current state of this
builder. |
MouseEventParams.Builder |
button(MouseEvent.Button button)
Sets the mouse button that triggered the event.
|
MouseEventParams.Builder |
clickCount(int clickCount)
Sets the count of consecutive clicks that happened in a short amount of time for mouse
events.
|
MouseEventParams.Builder |
clientLocation(Point location)
Sets the location of the mouse cursor in the component's coordinate system at the time
the event occurred.
|
MouseEventParams.Builder |
screenLocation(Point location)
Sets the location of the mouse cursor in the screen's coordinate system at the time the
event occurred.
|
MouseEventParams.Builder |
uiEventModifierParams(UiEventModifierParams uiEventModifierParams)
Sets the DOM UI event parameters with the key modifiers.
|
public MouseEventParams.Builder uiEventModifierParams(UiEventModifierParams uiEventModifierParams)
uiEventModifierParams
- the DOM UI event parameters with the key modifierspublic MouseEventParams.Builder clientLocation(Point location)
location
- the location of the mouse cursor in the component's coordinate system at
the time the event occurredpublic MouseEventParams.Builder screenLocation(Point location)
location
- the location of the mouse cursor in the screen's coordinate system at the
time the event occurredpublic MouseEventParams.Builder button(MouseEvent.Button button)
button
- the mouse button that triggered the eventpublic MouseEventParams.Builder clickCount(int clickCount)
clickCount
- the count of consecutive clicks that happened in a short amount of time
for mouse eventspublic MouseEventParams build()
MouseEventParams
instance built from the current state of this
builder.MouseEventParams
instance