Module org.htmlunit

Class PointerEvent

java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class PointerEvent extends MouseEvent
JavaScript object representing a PointerEvent.
Author:
Frank Danek, Ahmed Ashour, Ronald Brill
See Also:
  • Constructor Details

    • PointerEvent

      public PointerEvent()
      Default constructor.
    • PointerEvent

      public PointerEvent(DomNode domNode, String type, boolean shiftKey, boolean ctrlKey, boolean altKey, int button, int detail)
      Creates a new event instance.
      Parameters:
      domNode - the DOM node that triggered the event
      type - the event type
      shiftKey - true if SHIFT is pressed
      ctrlKey - true if CTRL is pressed
      altKey - true if ALT is pressed
      detail - the detail value
      button - the button code, must be MouseEvent.BUTTON_LEFT, MouseEvent.BUTTON_MIDDLE or MouseEvent.BUTTON_RIGHT
  • Method Details

    • jsConstructor

      public static org.htmlunit.corejs.javascript.Scriptable jsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr)
      JavaScript constructor.
      Parameters:
      cx - the current context
      scope - the scope
      args - the arguments to the WebSocket constructor
      ctorObj - the function object
      inNewExpr - Is new or not
      Returns:
      the java object to allow JavaScript to access
    • getPointerId

      public long getPointerId()
      Returns the pointer identifier.
      Returns:
      the pointer identifier
    • getWidth

      public long getWidth()
      Returns the pointer contact width.
      Returns:
      the pointer contact width
    • getHeight

      public long getHeight()
      Returns the pointer contact height.
      Returns:
      the pointer contact height
    • getPressure

      public double getPressure()
      Returns the normalized pointer pressure.
      Returns:
      the normalized pointer pressure
    • getTiltX

      public long getTiltX()
      Returns the pointer tilt along the X axis.
      Returns:
      the pointer tilt along the X axis
    • getTiltY

      public long getTiltY()
      Returns the pointer tilt along the Y axis.
      Returns:
      the pointer tilt along the Y axis
    • getPointerType

      public String getPointerType()
      Returns the pointer type.
      Returns:
      the pointer type
    • isPrimary_js

      public boolean isPrimary_js()
      Returns whether this is the primary pointer.
      Returns:
      whether this is the primary pointer
    • getAltitudeAngle

      public double getAltitudeAngle()
      Returns the pointer altitude angle.
      Returns:
      the pointer altitude angle
    • getAzimuthAngle

      public double getAzimuthAngle()
      Returns the pointer azimuth angle.
      Returns:
      the pointer azimuth angle
    • getPersistentDeviceId

      public double getPersistentDeviceId()
      Returns the persistent device identifier.
      Returns:
      the persistent device identifier