Package com.teamdev.jxbrowser.dom.event
Interface MouseEvent
- All Superinterfaces:
Event
,Event
,UiEventModifier
- All Known Subinterfaces:
WheelEvent
A mouse event that provides access to the mouse event data.
This event occurs when a user performs an action with a pointing device (such as a mouse), for example moves the mouse or clicks a mouse button.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbutton()
Returns a button pressed during events caused by pressing or releasing one or multiple buttons.int
Returns the count of consecutive clicks that happened in a short amount of time for mouse events, such as "click", "mouseDown, "mouseUp".Returns the location of the mouse cursor in the local (DOM content) coordinate system at the time the event occurred.Returns the location of the mouse cursor in the component's coordinate system at the time the event occurred.Returns the location of the mouse cursor in thedocument
coordinate system at the time the event occurred.Returns the location of the mouse cursor in the screen's coordinate system at the time the event occurred.Methods inherited from interface com.teamdev.jxbrowser.dom.event.Event
currentTarget, isBubbles, isCancelable, isTrusted, phase, preventDefault, stopPropagation, target, type
Methods inherited from interface com.teamdev.jxbrowser.dom.event.UiEventModifier
keyModifiers
-
Method Details
-
clientLocation
Point clientLocation()Returns the location of the mouse cursor in the local (DOM content) coordinate system at the time the event occurred. -
screenLocation
Point screenLocation()Returns the location of the mouse cursor in the screen's coordinate system at the time the event occurred. -
offsetLocation
Point 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
Point pageLocation()Returns the location of the mouse cursor in thedocument
coordinate system at the time the event occurred.- Since:
- 7.12
-
button
MouseEvent.Button 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
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.
-