Package org.loboevolution.events
Interface MouseEvent
- All Known Subinterfaces:
DragEvent
,PointerEvent
,WheelEvent
- All Known Implementing Classes:
DragEventImpl
,MouseEventImpl
,PointerEventImpl
,WheelEventImpl
The MouseEvent interface represents events that occur due to the user interacting with a pointing device (such as a mouse). Common events using this interface include click, dblclick, mouseup, mousedown.
- See Also:
-
Field Summary
Fields inherited from interface org.loboevolution.events.Event
AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE, NONE
-
Method Summary
Modifier and TypeMethodDescriptionThe MouseEvent.altKey read-only property is a Boolean that indicates whether the alt key was pressed or not when a given mouse event occurs.The MouseEvent.button read-only property indicates which button was pressed on the mouse to trigger the event.The MouseEvent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.The clientX read-only property of the MouseEvent interface provides the horizontal coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).The clientY read-only property of the MouseEvent interface provides the vertical coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).The MouseEvent.ctrlKey read-only property is a Boolean that indicates whether the ctrl key was pressed or not when a given mouse event occurs.The MouseEvent.metaKey read-only property is a Boolean that indicates whether the meta key was pressed or not when a given mouse event occurs.getModifierState
(String keyArg) The MouseEvent.getModifierState() method returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.The movementX read-only property of the MouseEvent interface provides the difference in the X coordinate of the mouse pointer between the given event and the previous mousemove event.The movementY read-only property of the MouseEvent interface provides the difference in the Y coordinate of the mouse pointer between the given event and the previous mousemove event.The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.getPageX()
The pageX read-only property of the MouseEvent interface returns the X (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document.getPageY()
The pageY read-only property of the MouseEvent interface returns the Y (vertical) coordinate in pixels of the event relative to the whole document.The screenX read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates.The screenY read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.The MouseEvent.shiftKey read-only property is a Boolean that indicates whether the shift key was pressed or not when a given mouse event occurs.getX()
The MouseEvent.x property is an alias for the MouseEvent.clientX property.getY()
The MouseEvent.y property is an alias for the MouseEvent.clientY property.void
initMouseEvent
(String typeArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg, Boolean shiftKeyArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg, Boolean shiftKeyArg, Boolean metaKeyArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg, Boolean shiftKeyArg, Boolean metaKeyArg, Integer buttonArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).void
initMouseEvent
(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg, Boolean shiftKeyArg, Boolean metaKeyArg, Integer buttonArg, EventTarget relatedTargetArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one.Methods inherited from interface org.loboevolution.events.Event
getBubbles, getCancelable, getComposed, getComposedPath, getCurrentTarget, getDefaultPrevented, getEventPhase, getReturnValue, getSrcElement, getStopImmediatePropagation, getStopPropagation, getTarget, getTimeStamp, getTrusted, getType, initEvent, initEvent, initEvent, preventDefault
Methods inherited from interface org.loboevolution.events.UIEvent
getDetail, getView, getWhich, initUIEvent, initUIEvent, initUIEvent, initUIEvent, initUIEvent
-
Method Details
-
getAltKey
Boolean getAltKey()The MouseEvent.altKey read-only property is a Boolean that indicates whether the alt key was pressed or not when a given mouse event occurs.- See Also:
-
getButton
Long getButton()The MouseEvent.button read-only property indicates which button was pressed on the mouse to trigger the event.- See Also:
-
getButtons
Long getButtons()The MouseEvent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.- See Also:
-
getClientX
Long getClientX()The clientX read-only property of the MouseEvent interface provides the horizontal coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).- See Also:
-
getClientY
Long getClientY()The clientY read-only property of the MouseEvent interface provides the vertical coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).- See Also:
-
getCtrlKey
Boolean getCtrlKey()The MouseEvent.ctrlKey read-only property is a Boolean that indicates whether the ctrl key was pressed or not when a given mouse event occurs.- See Also:
-
getMetaKey
Boolean getMetaKey()The MouseEvent.metaKey read-only property is a Boolean that indicates whether the meta key was pressed or not when a given mouse event occurs.- See Also:
-
getMovementX
Long getMovementX()The movementX read-only property of the MouseEvent interface provides the difference in the X coordinate of the mouse pointer between the given event and the previous mousemove event. In other words, the value of the property is computed like this: currentEvent.movementX = currentEvent.screenX - previousEvent.screenX.- See Also:
-
getMovementY
Long getMovementY()The movementY read-only property of the MouseEvent interface provides the difference in the Y coordinate of the mouse pointer between the given event and the previous mousemove event. In other words, the value of the property is computed like this: currentEvent.movementY = currentEvent.screenY - previousEvent.screenY.- See Also:
-
getOffsetX
Long getOffsetX()The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.- See Also:
-
getOffsetY
Long getOffsetY()The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.- See Also:
-
getPageX
Long getPageX()The pageX read-only property of the MouseEvent interface returns the X (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document.- See Also:
-
getPageY
Long getPageY()The pageY read-only property of the MouseEvent interface returns the Y (vertical) coordinate in pixels of the event relative to the whole document. This property takes into account any vertical scrolling of the page.- See Also:
-
getScreenX
Long getScreenX()The screenX read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates.- See Also:
-
getScreenY
Long getScreenY()The screenY read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.- See Also:
-
getShiftKey
Boolean getShiftKey()The MouseEvent.shiftKey read-only property is a Boolean that indicates whether the shift key was pressed or not when a given mouse event occurs.- See Also:
-
getX
Long getX()The MouseEvent.x property is an alias for the MouseEvent.clientX property.- See Also:
-
getY
Long getY()The MouseEvent.y property is an alias for the MouseEvent.clientY property.- See Also:
-
getModifierState
The MouseEvent.getModifierState() method returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg, Boolean shiftKeyArg, Boolean metaKeyArg, Integer buttonArg, EventTarget relatedTargetArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg, Boolean shiftKeyArg, Boolean metaKeyArg, Integer buttonArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg, Boolean shiftKeyArg, Boolean metaKeyArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg, Boolean shiftKeyArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg, Boolean altKeyArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg, Boolean ctrlKeyArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg, Integer clientYArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg, Integer clientXArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg, Integer screenYArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg, Integer screenXArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
void initMouseEvent(String typeArg, Boolean bubblesArg, Boolean cancelableArg, Window viewArg, Integer detailArg) The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-
initMouseEvent
The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).- See Also:
-