Class BaseNativeMouseEvent

  • All Implemented Interfaces:
    IsCastable

    @JsType(isNative=true,
            name="MouseEvent",
            namespace="<global>")
    public final class BaseNativeMouseEvent
    extends BaseNativeEvent
    Represents a mouse events that occur due to the user interacting with a pointing device.
    This is used only internally.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • getCurrentTarget

        @JsProperty
        public final BaseEventTarget getCurrentTarget()
        Returns a reference to the currently registered target for the event.
        This is the object to which the event is currently slated to be sent.
        Returns:
        a reference to the currently registered target for the event
      • isDefaultPrevented

        @JsProperty
        public final boolean isDefaultPrevented()
        Indicates whether or not the call to BaseEvent.preventDefault() canceled the event.
        Returns:
        Indicates whether or not the call to BaseEvent.preventDefault() canceled the event
      • getTarget

        @JsProperty
        public final BaseEventTarget getTarget()
        Returns a reference to the target to which the event was originally dispatched.
        Returns:
        a reference to the target to which the event was originally dispatched
      • getType

        @JsProperty
        public final String getType()
        Returns the type of the event.
        Returns:
        the type of the event
      • initEvent

        @JsMethod
        public final void initEvent​(String eventTypeArg,
                                    boolean bubbles,
                                    boolean cancelable)
        Initialize the value of a created event.
        Parameters:
        eventTypeArg - a string which is defining the type of event
        bubbles - deciding whether the event should bubble up through the event chain or not
        cancelable - defining whether the event can be canceled
      • preventDefault

        @JsMethod
        public final void preventDefault()
        Cancels the event (if it is cancelable).
      • stopImmediatePropagation

        @JsMethod
        public final void stopImmediatePropagation()
        Prevents all other listeners from being called.
      • stopPropagation

        @JsMethod
        public final void stopPropagation()
        Stops the propagation of events further along in the DOM.