@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="MouseEvent")
public class MouseEvent
extends UIEvent
AT_TARGET, BUBBLING_PHASE, cancelBubble, CAPTURING_PHASE, NONE, returnValue| Constructor and Description |
|---|
MouseEvent(java.lang.String type)
The MouseEvent() constructor creates a new MouseEvent.
|
MouseEvent(java.lang.String type,
MouseEventInit eventInitDict)
The MouseEvent() constructor creates a new MouseEvent.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
altKey()
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.
|
short |
button()
The MouseEvent.button read-only property indicates which button was pressed on the mouse to trigger the event.
|
int |
buttons()
The MouseEvent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.
|
double |
clientX()
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).
|
double |
clientY()
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).
|
boolean |
ctrlKey()
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.
|
boolean |
getModifierState(java.lang.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.
|
void |
initMouseEvent(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
boolean ctrlKeyArg,
boolean altKeyArg,
boolean shiftKeyArg,
boolean metaKeyArg,
short 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(java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
boolean ctrlKeyArg,
boolean altKeyArg,
boolean shiftKeyArg,
boolean metaKeyArg,
short 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).
|
boolean |
metaKey()
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.
|
double |
movementX()
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.
|
double |
movementY()
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.
|
double |
offsetX()
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.
|
double |
offsetY()
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.
|
double |
pageX()
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.
|
double |
pageY()
The pageY read-only property of the MouseEvent interface returns the Y (vertical) coordinate in pixels of the event relative to the whole document.
|
EventTarget |
relatedTarget()
The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one.
|
double |
screenX()
The screenX read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates.
|
double |
screenY()
The screenY read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.
|
boolean |
shiftKey()
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.
|
double |
x()
The MouseEvent.x property is an alias for the MouseEvent.clientX property.
|
double |
y()
The MouseEvent.y property is an alias for the MouseEvent.clientY property.
|
detail, initUIEvent, initUIEvent, initUIEvent, initUIEvent, initUIEvent, view, whichbubbles, cancelable, composed, composedPath, currentTarget, defaultPrevented, eventPhase, initEvent, initEvent, initEvent, isTrusted, preventDefault, srcElement, stopImmediatePropagation, stopPropagation, target, timeStamp, typeassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic MouseEvent(@Nonnull
java.lang.String type,
@Nonnull
MouseEventInit eventInitDict)
public MouseEvent(@Nonnull
java.lang.String type)
@JsProperty(name="altKey") public boolean altKey()
@JsProperty(name="button") public short button()
@JsProperty(name="buttons") public int buttons()
@JsProperty(name="clientX") public double clientX()
@JsProperty(name="clientY") public double clientY()
@JsProperty(name="ctrlKey") public boolean ctrlKey()
@JsProperty(name="metaKey") public boolean metaKey()
@JsProperty(name="movementX") public double movementX()
@JsProperty(name="movementY") public double movementY()
@JsProperty(name="offsetX") public double offsetX()
@JsProperty(name="offsetY") public double offsetY()
@JsProperty(name="pageX") public double pageX()
@JsProperty(name="pageY") public double pageY()
@JsProperty(name="relatedTarget") @Nullable public EventTarget relatedTarget()
@JsProperty(name="screenX") public double screenX()
@JsProperty(name="screenY") public double screenY()
@JsProperty(name="shiftKey") public boolean shiftKey()
@JsProperty(name="x") public double x()
@JsProperty(name="y") public double y()
public boolean getModifierState(@Nonnull
java.lang.String keyArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
boolean ctrlKeyArg,
boolean altKeyArg,
boolean shiftKeyArg,
boolean metaKeyArg,
short buttonArg,
@Nullable
EventTarget relatedTargetArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
boolean ctrlKeyArg,
boolean altKeyArg,
boolean shiftKeyArg,
boolean metaKeyArg,
short buttonArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
boolean ctrlKeyArg,
boolean altKeyArg,
boolean shiftKeyArg,
boolean metaKeyArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
boolean ctrlKeyArg,
boolean altKeyArg,
boolean shiftKeyArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
boolean ctrlKeyArg,
boolean altKeyArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
boolean ctrlKeyArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg,
int screenYArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg,
int screenXArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg,
int detailArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg,
@Nullable
Window viewArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg,
boolean cancelableArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg,
boolean bubblesArg)
public void initMouseEvent(@Nonnull
java.lang.String typeArg)