public class JsMouseEvent extends JsUIEvent implements MouseEvent
MouseEvent.Button
AT_TARGET, BEFORECOPY, BEFORECUT, BEFOREPASTE, BLUR, BUBBLING_PHASE, CAPTURING_PHASE, CHANGE, CLICK, CONTEXTMENU, COPY, CUT, DBLCLICK, DRAG, DRAGEND, DRAGENTER, DRAGLEAVE, DRAGOVER, DRAGSTART, DROP, ERROR, FOCUS, FOCUSIN, FOCUSOUT, INPUT, INVALID, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN, MOUSEMOVE, MOUSEOUT, MOUSEOVER, MOUSEUP, MOUSEWHEEL, NONE, PASTE, RESIZE, SCROLL, SELECTSTART, SUBMIT, TOUCHCANCEL, TOUCHEND, TOUCHMOVE, TOUCHSTART, WEBKITANIMATIONEND, WEBKITANIMATIONITERATION, WEBKITANIMATIONSTART, WEBKITTRANSITIONEND
SVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
JsMouseEvent() |
Modifier and Type | Method and Description |
---|---|
int |
getButton()
The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2.
|
int |
getClientX()
The X coordinate of the mouse pointer in local (DOM content) coordinates.
|
int |
getClientY()
The Y coordinate of the mouse pointer in local (DOM content) coordinates.
|
JsClipboard |
getDataTransfer() |
JsNode |
getFromElement() |
int |
getOffsetX() |
int |
getOffsetY() |
EventTarget |
getRelatedTarget()
The target to which the event applies.
|
int |
getScreenX()
The X coordinate of the mouse pointer in global (screen) coordinates.
|
int |
getScreenY()
The Y coordinate of the mouse pointer in global (screen) coordinates.
|
JsNode |
getToElement() |
int |
getWebkitMovementX() |
int |
getWebkitMovementY() |
int |
getX() |
int |
getY() |
void |
initMouseEvent(String type,
boolean canBubble,
boolean cancelable,
Window view,
int detail,
int screenX,
int screenY,
int clientX,
int clientY,
boolean ctrlKey,
boolean altKey,
boolean shiftKey,
boolean metaKey,
int button,
EventTarget relatedTarget) |
boolean |
isAltKey()
true if the alt key was down when the mouse event was fired. |
boolean |
isCtrlKey()
true if the control key was down when the mouse event was fired. |
boolean |
isMetaKey()
true if the meta key was down when the mouse event was fired. |
boolean |
isShiftKey()
true if the shift key was down when the mouse event was fired. |
getCharCode, getDetail, getKeyCode, getLayerX, getLayerY, getPageX, getPageY, getView, getWhich, initUIEvent
getClipboardData, getCurrentTarget, getEventPhase, getSrcElement, getTarget, getTimeStamp, getType, initEvent, isBubbles, isCancelable, isCancelBubble, isDefaultPrevented, isReturnValue, preventDefault, setCancelBubble, setReturnValue, stopImmediatePropagation, stopPropagation
addEventListener, addEventListener, beginElement, beginElementAt, dispatchEvent, endElement, endElementAt, getAnimatedClassName, getAnimatedHeight, getAnimatedHref, getAnimatedResult, getAnimatedTransform, getAnimatedWidth, getAnimatedX, getAnimatedY, getBBox, getChildElementCount, getCTM, getExternalResourcesRequired, getFarthestViewportElement, getFirstElementChild, getLastElementChild, getNearestViewportElement, getNextElementSibling, getPresentationAttribute, getPreserveAspectRatio, getPreviousElementSibling, getRequiredExtensions, getRequiredFeatures, getScreenCTM, getSvgStyle, getSystemLanguage, getTransformToElement, getViewBox, getXmllang, getXmlspace, getZoomAndPan, hasExtension, querySelector, querySelectorAll, removeEventListener, removeEventListener, setXmllang, setXmlspace, setZoomAndPan
at, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAt
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCharCode, getDetail, getKeyCode, getLayerX, getLayerY, getPageX, getPageY, getView, getWhich, initUIEvent
getClipboardData, getCurrentTarget, getEventPhase, getSrcElement, getTarget, getTimeStamp, getType, initEvent, isBubbles, isCancelable, isCancelBubble, isDefaultPrevented, isReturnValue, preventDefault, setCancelBubble, setReturnValue, stopImmediatePropagation, stopPropagation
intAt, length
numberAt
public final boolean isAltKey()
MouseEvent
true
if the alt key was down when the mouse event was fired. Read only.isAltKey
in interface MouseEvent
public final int getButton()
MouseEvent
getButton
in interface MouseEvent
public final int getClientX()
MouseEvent
getClientX
in interface MouseEvent
public final int getClientY()
MouseEvent
getClientY
in interface MouseEvent
public final boolean isCtrlKey()
MouseEvent
true
if the control key was down when the mouse event was fired. Read only.isCtrlKey
in interface MouseEvent
public final JsClipboard getDataTransfer()
getDataTransfer
in interface MouseEvent
public final JsNode getFromElement()
getFromElement
in interface MouseEvent
public final boolean isMetaKey()
MouseEvent
true
if the meta key was down when the mouse event was fired. Read only.isMetaKey
in interface MouseEvent
public final int getOffsetX()
getOffsetX
in interface MouseEvent
public final int getOffsetY()
getOffsetY
in interface MouseEvent
public final EventTarget getRelatedTarget()
MouseEvent
getRelatedTarget
in interface MouseEvent
public final int getScreenX()
MouseEvent
getScreenX
in interface MouseEvent
public final int getScreenY()
MouseEvent
getScreenY
in interface MouseEvent
public final boolean isShiftKey()
MouseEvent
true
if the shift key was down when the mouse event was fired. Read only.isShiftKey
in interface MouseEvent
public final JsNode getToElement()
getToElement
in interface MouseEvent
public final int getWebkitMovementX()
getWebkitMovementX
in interface MouseEvent
public final int getWebkitMovementY()
getWebkitMovementY
in interface MouseEvent
public final int getX()
getX
in interface MouseEvent
public final int getY()
getY
in interface MouseEvent
public final void initMouseEvent(String type, boolean canBubble, boolean cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey, int button, EventTarget relatedTarget)
initMouseEvent
in interface MouseEvent
Copyright © 2016. All rights reserved.