Package com.teamdev.jxbrowser.dom.event
Class MouseEventParams.Builder
java.lang.Object
com.teamdev.jxbrowser.dom.event.MouseEventParams.Builder
- Enclosing interface:
- MouseEventParams
A builder of
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newMouseEventParams
instance built from the current state of this builder.button
(MouseEvent.Button button) Sets the mouse button that triggered the event.clickCount
(int clickCount) Sets the count of consecutive clicks that happened in a short amount of time for mouse events.clientLocation
(Point location) Sets the location of the mouse cursor in the component's coordinate system at the time the event occurred.screenLocation
(Point location) Sets the location of the mouse cursor in the screen's coordinate system at the time the event occurred.uiEventModifierParams
(UiEventModifierParams uiEventModifierParams) Sets the DOM UI event parameters with the key modifiers.
-
Method Details
-
uiEventModifierParams
Sets the DOM UI event parameters with the key modifiers.- Parameters:
uiEventModifierParams
- the DOM UI event parameters with the key modifiers- Returns:
- this builder
-
clientLocation
Sets the location of the mouse cursor in the component's coordinate system at the time the event occurred.- Parameters:
location
- the location of the mouse cursor in the component's coordinate system at the time the event occurred- Returns:
- this builder
-
screenLocation
Sets the location of the mouse cursor in the screen's coordinate system at the time the event occurred.- Parameters:
location
- the location of the mouse cursor in the screen's coordinate system at the time the event occurred- Returns:
- this builder
-
button
Sets the mouse button that triggered the event.- Parameters:
button
- the mouse button that triggered the event- Returns:
- this builder
-
clickCount
Sets the count of consecutive clicks that happened in a short amount of time for mouse events.- Parameters:
clickCount
- the count of consecutive clicks that happened in a short amount of time for mouse events- Returns:
- this builder
-
build
Returns a newMouseEventParams
instance built from the current state of this builder.- Returns:
- a new
MouseEventParams
instance
-