public interface TouchEvent extends UIEvent
A TouchEvent
represents an event sent when the state of contacts with a touch-sensitive surface changes. This surface can be a touch screen or trackpad, for example. The event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth.
Touches are represented by the Touch
object; each touch is described by a position, size and shape, amount of pressure, and target element. Lists of touches are represented by TouchList
objects.
AT_TARGET, BEFORECOPY, BEFORECUT, BEFOREPASTE, BLUR, BUBBLING_PHASE, CAPTURING_PHASE, CHANGE, CLICK, CONTEXTMENU, COPY, CUT, DBLCLICK, DRAG, DRAGEND, DRAGENTER, DRAGLEAVE, DRAGOVER, DRAGSTART, DROP, ERROR, FOCUS, FOCUSIN, FOCUSOUT, INPUT, INVALID, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN, MOUSEMOVE, MOUSEOUT, MOUSEOVER, MOUSEUP, MOUSEWHEEL, NONE, PASTE, RESIZE, SCROLL, SELECTSTART, SUBMIT, TOUCHCANCEL, TOUCHEND, TOUCHMOVE, TOUCHSTART, WEBKITANIMATIONEND, WEBKITANIMATIONITERATION, WEBKITANIMATIONSTART, WEBKITTRANSITIONEND
Modifier and Type | Method and Description |
---|---|
TouchList |
getChangedTouches()
|
TouchList |
getTargetTouches()
|
TouchList |
getTouches()
|
void |
initTouchEvent(TouchList touches,
TouchList targetTouches,
TouchList changedTouches,
String type,
Window view,
int screenX,
int screenY,
int clientX,
int clientY,
boolean ctrlKey,
boolean altKey,
boolean shiftKey,
boolean metaKey) |
boolean |
isAltKey()
A Boolean value indicating whether or not the alt key was down when the touch event was fired.
|
boolean |
isCtrlKey()
A Boolean value indicating whether or not the control key was down when the touch event was fired.
|
boolean |
isMetaKey()
A Boolean value indicating whether or not the meta key was down when the touch event was fired.
|
boolean |
isShiftKey()
A Boolean value indicating whether or not the shift key was down when the touch event was fired.
|
getCharCode, getDetail, getKeyCode, getLayerX, getLayerY, getPageX, getPageY, getView, getWhich, initUIEvent
getClipboardData, getCurrentTarget, getEventPhase, getSrcElement, getTarget, getTimeStamp, getType, initEvent, isBubbles, isCancelable, isCancelBubble, isDefaultPrevented, isReturnValue, preventDefault, setCancelBubble, setReturnValue, stopImmediatePropagation, stopPropagation
boolean isAltKey()
TouchList getChangedTouches()
boolean isCtrlKey()
boolean isMetaKey()
boolean isShiftKey()
TouchList getTargetTouches()
TouchList getTouches()
Copyright © 2016. All rights reserved.