Class NativeAbstractMouseEvent
- java.lang.Object
-
- org.pepstock.charba.client.dom.events.NativeBaseEvent
-
- org.pepstock.charba.client.dom.events.NativeUIEvent
-
- org.pepstock.charba.client.dom.events.NativeAbstractMouseEvent
-
- All Implemented Interfaces:
IsJSType
,IsCastable
- Direct Known Subclasses:
NativeMouseEvent
,NativePointerEvent
@JsType(isNative=true, name="MouseEvent", namespace="<global>") public abstract class NativeAbstractMouseEvent extends NativeUIEvent
Contains all common properties and methods of a DOM mouse event.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventButton
getButton()
Returns the button that was pressed (if applicable) when the mouse event was fired.List<EventButton>
getButtons()
Returns the buttons being depressed (if any) when the mouse event was fired.double
getClientX()
Returns the X coordinate of the mouse pointer in local (DOM content) coordinates.double
getClientY()
Returns the Y coordinate of the mouse pointer in local (DOM content) coordinates.double
getLayerX()
Returns the horizontal coordinate of the event relative to the current layer.double
getLayerY()
Returns the vertical coordinate of the event relative to the current layer.double
getOffsetX()
Returns the X coordinate of the mouse pointer relative to the position of the padding edge of the target node.double
getOffsetY()
Returns the Y coordinate of the mouse pointer relative to the position of the padding edge of the target node.double
getPageX()
Returns the X coordinate of the mouse pointer relative to the whole document.double
getPageY()
Returns the Y coordinate of the mouse pointer relative to the whole document.BaseEventTarget
getRelatedTarget()
Returns the secondary target for the event, if there is one.double
getScreenX()
Returns the X coordinate of the mouse pointer in global (screen) coordinates.double
getScreenY()
Returns the Y coordinate of the mouse pointer in global (screen) coordinates.double
getX()
Returns the X coordinate of the mouse pointer in local (DOM content) coordinates.double
getY()
Returns the Y coordinate of the mouse pointer in local (DOM content) coordinates.boolean
isAltKey()
Returns true if the alt key was down when the mouse event was fired.boolean
isCtrlKey()
Returns true if the control key was down when the mouse event was fired.boolean
isMetaKey()
Returns true if the meta key was down when the mouse event was fired.boolean
isShiftKey()
Returns true if the shift key was down when the mouse event was fired.-
Methods inherited from class org.pepstock.charba.client.dom.events.NativeUIEvent
getDetail, getModifierState
-
Methods inherited from class org.pepstock.charba.client.dom.events.NativeBaseEvent
createEvent, createEvent, createEvent, createEvent, getCurrentTarget, getEventPhase, getTarget, getType, isBubbles, isCancelable, isDefaultPrevented, preventDefault, stopImmediatePropagation, stopPropagation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.dom.IsCastable
as
-
-
-
-
Method Detail
-
isAltKey
@JsProperty public final boolean isAltKey()
Returns true if the alt key was down when the mouse event was fired.- Returns:
- true if the alt key was down when the mouse event was fired
-
getClientX
@JsProperty public final double getClientX()
Returns the X coordinate of the mouse pointer in local (DOM content) coordinates.- Returns:
- the X coordinate of the mouse pointer in local (DOM content) coordinates
-
getClientY
@JsProperty public final double getClientY()
Returns the Y coordinate of the mouse pointer in local (DOM content) coordinates.- Returns:
- the Y coordinate of the mouse pointer in local (DOM content) coordinates
-
isCtrlKey
@JsProperty public final boolean isCtrlKey()
Returns true if the control key was down when the mouse event was fired.- Returns:
- true if the control key was down when the mouse event was fired
-
isMetaKey
@JsProperty public final boolean isMetaKey()
Returns true if the meta key was down when the mouse event was fired.- Returns:
- true if the meta key was down when the mouse event was fired
-
getOffsetX
@JsProperty public final double getOffsetX()
Returns the X coordinate of the mouse pointer relative to the position of the padding edge of the target node.- Returns:
- the X coordinate of the mouse pointer relative to the position of the padding edge of the target node
-
getOffsetY
@JsProperty public final double getOffsetY()
Returns the Y coordinate of the mouse pointer relative to the position of the padding edge of the target node.- Returns:
- the Y coordinate of the mouse pointer relative to the position of the padding edge of the target node
-
getPageX
@JsProperty public final double getPageX()
Returns the X coordinate of the mouse pointer relative to the whole document.- Returns:
- the X coordinate of the mouse pointer relative to the whole document
-
getPageY
@JsProperty public final double getPageY()
Returns the Y coordinate of the mouse pointer relative to the whole document.- Returns:
- the Y coordinate of the mouse pointer relative to the whole document
-
getScreenX
@JsProperty public final double getScreenX()
Returns the X coordinate of the mouse pointer in global (screen) coordinates.- Returns:
- the X coordinate of the mouse pointer in global (screen) coordinates
-
getScreenY
@JsProperty public final double getScreenY()
Returns the Y coordinate of the mouse pointer in global (screen) coordinates.- Returns:
- the Y coordinate of the mouse pointer in global (screen) coordinates
-
isShiftKey
@JsProperty public final boolean isShiftKey()
Returns true if the shift key was down when the mouse event was fired.- Returns:
- true if the shift key was down when the mouse event was fired
-
getRelatedTarget
@JsProperty public final BaseEventTarget getRelatedTarget()
Returns the secondary target for the event, if there is one.- Returns:
- the secondary target for the event, if there is one
-
getX
@JsProperty public final double getX()
Returns the X coordinate of the mouse pointer in local (DOM content) coordinates.- Returns:
- the X coordinate of the mouse pointer in local (DOM content) coordinates
-
getY
@JsProperty public final double getY()
Returns the Y coordinate of the mouse pointer in local (DOM content) coordinates.- Returns:
- the Y coordinate of the mouse pointer in local (DOM content) coordinates
-
getLayerX
@JsOverlay public final double getLayerX()
Returns the horizontal coordinate of the event relative to the current layer.- Returns:
- the horizontal coordinate of the event relative to the current layer
-
getLayerY
@JsOverlay public final double getLayerY()
Returns the vertical coordinate of the event relative to the current layer.- Returns:
- the vertical coordinate of the event relative to the current layer
-
getButton
@JsOverlay public final EventButton getButton()
Returns the button that was pressed (if applicable) when the mouse event was fired.- Returns:
- the button that was pressed (if applicable) when the mouse event was fired
-
getButtons
@JsOverlay public final List<EventButton> getButtons()
Returns the buttons being depressed (if any) when the mouse event was fired.- Returns:
- the buttons being depressed (if any) when the mouse event was fired
-
-