Package com.teamdev.jxbrowser.dom.event
Interface MouseEventParams
- All Superinterfaces:
EventParams,UiEventModifierParams
- All Known Subinterfaces:
WheelEventParams
The DOM mouse event parameters.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault MouseEvent.Buttonbutton()Returns a button pressed during events caused by pressing or releasing one or multiple buttons.default intReturns the count of consecutive clicks that happened in a short amount of time for mouse events, such as "click", "mouseDown, "mouseUp".default PointReturns the location of the mouse cursor in the local (DOM content) coordinate system at the time the event occurred.default booleanReturnstrueif the event bubbles up through the DOM.default booleanReturnstrueif the event can be canceled, and therefore prevented as if the event never happened.default booleanReturnstrueif the event is trusted, and therefore was generated by a user action.default KeyModifiersReturns the key modifiers that are applied to the event.static MouseEventParams.BuilderCreates a newMouseEventParamsbuilder.default PointReturns the location of the mouse cursor in the component's coordinate system at the time the event occurred.default PointReturns the location of the mouse cursor in thedocumentcoordinate system at the time the event occurred.default PointReturns the location of the mouse cursor in the screen's coordinate system at the time the event occurred.
-
Method Details
-
newBuilder
Creates a newMouseEventParamsbuilder.- Returns:
- a new
MouseEventParams.Builderinstance
-
isBubbles
default boolean isBubbles()Returnstrueif the event bubbles up through the DOM.- Specified by:
isBubblesin interfaceEventParams- Specified by:
isBubblesin interfaceUiEventModifierParams
-
isCancelable
default boolean isCancelable()Returnstrueif the event can be canceled, and therefore prevented as if the event never happened.- Specified by:
isCancelablein interfaceEventParams- Specified by:
isCancelablein interfaceUiEventModifierParams
-
isTrusted
default boolean isTrusted()Returnstrueif the event is trusted, and therefore was generated by a user action.- Specified by:
isTrustedin interfaceEventParams- Specified by:
isTrustedin 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
xfield 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 thedocumentcoordinate 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,mouseoutormousemove.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:
keyModifiersin interfaceUiEventModifierParams
-