Package com.teamdev.jxbrowser.dom.event
Interface MouseEventParams
- All Superinterfaces:
EventParams
,UiEventModifierParams
- All Known Subinterfaces:
WheelEventParams
The DOM mouse event parameters.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault MouseEvent.Button
button()
Returns a button pressed during events caused by pressing or releasing one or multiple buttons.default int
Returns the count of consecutive clicks that happened in a short amount of time for mouse events, such as "click", "mouseDown, "mouseUp".default Point
Returns the location of the mouse cursor in the local (DOM content) coordinate system at the time the event occurred.default boolean
Returnstrue
if the event bubbles up through the DOM.default boolean
Returnstrue
if the event can be canceled, and therefore prevented as if the event never happened.default boolean
Returnstrue
if the event is trusted, and therefore was generated by a user action.default KeyModifiers
Returns the key modifiers that are applied to the event.static MouseEventParams.Builder
Creates a newMouseEventParams
builder.default Point
Returns the location of the mouse cursor in the component's coordinate system at the time the event occurred.default Point
Returns the location of the mouse cursor in thedocument
coordinate system at the time the event occurred.default Point
Returns the location of the mouse cursor in the screen's coordinate system at the time the event occurred.
-
Method Details
-
newBuilder
Creates a newMouseEventParams
builder.- Returns:
- a new
MouseEventParams.Builder
instance
-
isBubbles
default boolean isBubbles()Returnstrue
if the event bubbles up through the DOM.- Specified by:
isBubbles
in interfaceEventParams
- Specified by:
isBubbles
in interfaceUiEventModifierParams
-
isCancelable
default boolean isCancelable()Returnstrue
if the event can be canceled, and therefore prevented as if the event never happened.- Specified by:
isCancelable
in interfaceEventParams
- Specified by:
isCancelable
in interfaceUiEventModifierParams
-
isTrusted
default boolean isTrusted()Returnstrue
if the event is trusted, and therefore was generated by a user action.- Specified by:
isTrusted
in interfaceEventParams
- Specified by:
isTrusted
in interfaceUiEventModifierParams
- Since:
- 7.12
-
clientLocation
Returns the location of the mouse cursor in the local (DOM content) coordinate system at the time the event occurred. -
screenLocation
Returns the location of the mouse cursor in the screen's coordinate system at the time the event occurred. -
offsetLocation
Returns the location of the mouse cursor in the component's coordinate system at the time the event occurred.For example, clicking in the top-left corner of the client area will always result in that the
x
field of the result equals 0, regardless of whether the page is scrolled horizontally.- Since:
- 7.8
-
pageLocation
Returns the location of the mouse cursor in thedocument
coordinate system at the time the event occurred.- Since:
- 7.12
-
button
Returns a button pressed during events caused by pressing or releasing one or multiple buttons. As such, it is not reliable for events such asmouseenter
,mouseleave
,mouseover
,mouseout
ormousemove
.Users may change the configuration of buttons on their pointing device so that if an event's button property is
MouseEvent.Button.MAIN
(left), it may not have been caused by the button that is physically left–most on the pointing device; however, it should behave as if the left button was clicked in the standard button layout. -
clickCount
default int clickCount()Returns the count of consecutive clicks that happened in a short amount of time for mouse events, such as "click", "mouseDown, "mouseUp".For all other UI events returns 0.
-
keyModifiers
Returns the key modifiers that are applied to the event.- Specified by:
keyModifiers
in interfaceUiEventModifierParams
-