com.gargoylesoftware.htmlunit.javascript.host
Class PointerEvent

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.Event
              extended by com.gargoylesoftware.htmlunit.javascript.host.UIEvent
                  extended by com.gargoylesoftware.htmlunit.javascript.host.MouseEvent
                      extended by com.gargoylesoftware.htmlunit.javascript.host.PointerEvent
All Implemented Interfaces:
Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class PointerEvent
extends MouseEvent

JavaScript object representing the PointerEvent.

Version:
$Revision: 8960 $
Author:
Frank Danek
See Also:
W3C Spec, MSDN, Serialized Form

Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.MouseEvent
BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT, TYPE_CLICK, TYPE_CONTEXT_MENU, TYPE_DBL_CLICK, TYPE_MOUSE_DOWN, TYPE_MOUSE_MOVE, TYPE_MOUSE_OUT, TYPE_MOUSE_OVER, TYPE_MOUSE_UP
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.Event
ABORT, ALT_MASK, AT_TARGET, BACK, BLUR, BUBBLING_PHASE, CAPTURING_PHASE, CHANGE, CLICK, CONTROL_MASK, DBLCLICK, DRAGDROP, ERROR, FOCUS, FORWARD, HELP, KEYDOWN, KEYPRESS, KEYUP, LOAD, LOCATE, META_MASK, MOUSEDOWN, MOUSEDRAG, MOUSEMOVE, MOUSEOUT, MOUSEOVER, MOUSEUP, MOVE, NONE, RESET, RESIZE, SCROLL, SELECT, SHIFT_MASK, SUBMIT, TEXT, TYPE_BEFORE_UNLOAD, TYPE_BLUR, TYPE_CHANGE, TYPE_DOM_DOCUMENT_LOADED, TYPE_ERROR, TYPE_FOCUS, TYPE_FOCUS_IN, TYPE_FOCUS_OUT, TYPE_HASH_CHANGE, TYPE_INPUT, TYPE_KEY_DOWN, TYPE_KEY_PRESS, TYPE_KEY_UP, TYPE_LOAD, TYPE_MESSAGE, TYPE_PROPERTY_CHANGE, TYPE_READY_STATE_CHANGE, TYPE_RESET, TYPE_SUBMIT, TYPE_UNLOAD, UNLOAD, XFER_DONE
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
PointerEvent()
          Creates a new event instance.
PointerEvent(DomNode domNode, String type, boolean shiftKey, boolean ctrlKey, boolean altKey, int button)
          Creates a new event instance.
 
Method Summary
 long getHeight()
           
 long getPointerId()
           
 String getPointerType()
           
 double getPressure()
           
 long getTiltX()
           
 long getTiltY()
           
 long getWidth()
           
 void initPointerEvent(String type, boolean bubbles, boolean cancelable, Object view, int detail, int screenX, int screenY, int clientX, int clientY, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey, int button, Object relatedTarget, int offsetX, int offsetY, int width, int height, Double pressure, int rotation, int tiltX, int tiltY, int pointerId, String pointerType, int hwTimestamp, boolean isPrimary)
          Used for initializing the pointer event.
 boolean isPrimary()
           
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.MouseEvent
getAltKey, getButton, getClientX, getClientY, getCtrlKey, getCurrentMouseEvent, getKeyCode, getPageX, getPageY, getScreenX, getScreenY, getShiftKey, getWhich, initMouseEvent, setButton, setClientX, setClientY
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.UIEvent
getCancelBubble, getDetail, getMetaKey, getView, initUIEvent, setCancelBubble, setDetail, setMetaKey
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Event
applies, createPropertyChangeEvent, eventCreated, getBubbles, getCancelable, getCurrentTarget, getDefaultPrevented, getEventPhase, getPropertyName, getReturnValue, getSrcElement, getTarget, getTimeStamp, getType, initEvent, isAborted, isPropagationStopped, jsConstructor, preventDefault, setAltKey, setBubbles, setCancelable, setCtrlKey, setCurrentTarget, setEventPhase, setEventType, setKeyCode, setReturnValue, setShiftKey, setSrcElement, setTarget, setType, stopPropagation, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement, setParentScope
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PointerEvent

public PointerEvent()
Creates a new event instance.


PointerEvent

public PointerEvent(DomNode domNode,
                    String type,
                    boolean shiftKey,
                    boolean ctrlKey,
                    boolean altKey,
                    int button)
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
button - the button code, must be MouseEvent.BUTTON_LEFT, MouseEvent.BUTTON_MIDDLE or MouseEvent.BUTTON_RIGHT
Method Detail

initPointerEvent

public void initPointerEvent(String type,
                             boolean bubbles,
                             boolean cancelable,
                             Object view,
                             int detail,
                             int screenX,
                             int screenY,
                             int clientX,
                             int clientY,
                             boolean ctrlKey,
                             boolean altKey,
                             boolean shiftKey,
                             boolean metaKey,
                             int button,
                             Object relatedTarget,
                             int offsetX,
                             int offsetY,
                             int width,
                             int height,
                             Double pressure,
                             int rotation,
                             int tiltX,
                             int tiltY,
                             int pointerId,
                             String pointerType,
                             int hwTimestamp,
                             boolean isPrimary)
Used for initializing the pointer event.

Parameters:
type - the event type
bubbles - can the event bubble
cancelable - can the event be canceled
view - the view to use for this event
detail - the detail to set for the event
screenX - the initial value of screenX
screenY - the initial value of screenY
clientX - the initial value of clientX
clientY - the initial value of clientY
ctrlKey - is the control key pressed
altKey - is the alt key pressed
shiftKey - is the shift key pressed
metaKey - is the meta key pressed
button - what mouse button is pressed
relatedTarget - is there a related target for the event
offsetX - the initial value of offsetX
offsetY - the initial value of offsetY
width - the initial value of width
height - the initial value of height
pressure - the initial value of pressure
rotation - the initial value of rotation
tiltX - the initial value of tiltX
tiltY - the initial value of tiltY
pointerId - the pointerId
pointerType - the pointer type
hwTimestamp - the initial value of hwTimestamp
isPrimary - the initial value of isPrimary

getPointerId

public long getPointerId()
Returns:
the pointerId

getWidth

public long getWidth()
Returns:
the width

getHeight

public long getHeight()
Returns:
the height

getPressure

public double getPressure()
Returns:
the pressure

getTiltX

public long getTiltX()
Returns:
the tiltX

getTiltY

public long getTiltY()
Returns:
the tiltY

getPointerType

public String getPointerType()
Returns:
the pointerType

isPrimary

public boolean isPrimary()
Returns:
the isPrimary


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.