public class PointerEvent extends 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
ABORT, ALT_MASK, AT_TARGET, BACK, BLUR, BUBBLING_PHASE, CAPTURING_PHASE, CHANGE, CLICK, CONTROL_MASK, DBLCLICK, DRAGDROP, ERROR, FOCUS, FORWARD, HELP, KEY_CURRENT_EVENT, 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
Constructor and Description |
---|
PointerEvent()
Creates a new event instance.
|
PointerEvent(DomNode domNode,
String type,
boolean shiftKey,
boolean ctrlKey,
boolean altKey,
int button)
Creates a new event instance.
|
Modifier and Type | Method and Description |
---|---|
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() |
getAltKey, getButton, getClientX, getClientY, getCtrlKey, getCurrentMouseEvent, getKeyCode, getPageX, getPageY, getScreenX, getScreenY, getShiftKey, getWhich, initMouseEvent, isMouseEvent, setButton, setClientX, setClientY
getCancelBubble, getDetail, getMetaKey, getView, initUIEvent, setCancelBubble, setDetail, setMetaKey
applies, createPropertyChangeEvent, endFire, 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, startFire, stopPropagation, toString
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setClassName, setDomNode, setDomNode, setHtmlElement, setParentScope
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, getExternalArrayData, getExternalArrayLength, 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, setExternalArrayData, setGetterOrSetter, setPrototype, size
public PointerEvent()
public PointerEvent(DomNode domNode, String type, boolean shiftKey, boolean ctrlKey, boolean altKey, int button)
domNode
- the DOM node that triggered the eventtype
- the event typeshiftKey
- true if SHIFT is pressedctrlKey
- true if CTRL is pressedaltKey
- true if ALT is pressedbutton
- the button code, must be MouseEvent.BUTTON_LEFT
, MouseEvent.BUTTON_MIDDLE
or MouseEvent.BUTTON_RIGHT
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)
type
- the event typebubbles
- can the event bubblecancelable
- can the event be canceledview
- the view to use for this eventdetail
- the detail to set for the eventscreenX
- the initial value of screenXscreenY
- the initial value of screenYclientX
- the initial value of clientXclientY
- the initial value of clientYctrlKey
- is the control key pressedaltKey
- is the alt key pressedshiftKey
- is the shift key pressedmetaKey
- is the meta key pressedbutton
- what mouse button is pressedrelatedTarget
- is there a related target for the eventoffsetX
- the initial value of offsetXoffsetY
- the initial value of offsetYwidth
- the initial value of widthheight
- the initial value of heightpressure
- the initial value of pressurerotation
- the initial value of rotationtiltX
- the initial value of tiltXtiltY
- the initial value of tiltYpointerId
- the pointerIdpointerType
- the pointer typehwTimestamp
- the initial value of hwTimestampisPrimary
- the initial value of isPrimarypublic long getPointerId()
public long getWidth()
public long getHeight()
public double getPressure()
public long getTiltX()
public long getTiltY()
public String getPointerType()
public boolean isPrimary()
Copyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.