Class 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 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