Class UIEvent
java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.event.Event
org.htmlunit.javascript.host.event.UIEvent
- All Implemented Interfaces:
Serializable
,Cloneable
,org.htmlunit.corejs.javascript.ConstProperties
,org.htmlunit.corejs.javascript.debug.DebuggableObject
,org.htmlunit.corejs.javascript.Scriptable
,org.htmlunit.corejs.javascript.SymbolScriptable
- Direct Known Subclasses:
CompositionEvent
,FocusEvent
,InputEvent
,KeyboardEvent
,MouseEvent
,TextEvent
,TouchEvent
JavaScript object representing a UI event. For general information on which properties and functions should be
supported, see DOM Level 3 Events.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
Specifies some detail information about the event.private static final Object
static final int
Constant.static final int
Constant.private Object
Specifies some view information about the event.Fields inherited from class org.htmlunit.javascript.host.event.Event
ALT_MASK, AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE, CONTROL_MASK, KEY_CURRENT_EVENT, META_MASK, NONE, SHIFT_MASK, TYPE_ABORT, TYPE_AFTERPRINT, TYPE_AFTERSCRIPTEXECUTE, TYPE_ANIMATIONCANCEL, TYPE_ANIMATIONEND, TYPE_ANIMATIONITERATION, TYPE_ANIMATIONSTART, TYPE_AUXCLICK, TYPE_BEFORE_UNLOAD, TYPE_BEFORECOPY, TYPE_BEFORECUT, TYPE_BEFOREPASTE, TYPE_BEFOREPRINT, TYPE_BEFORESCRIPTEXECUTE, TYPE_BLUR, TYPE_CANCEL, TYPE_CANPLAY, TYPE_CANPLAYTHROUGH, TYPE_CHANGE, TYPE_CLOSE, TYPE_COPY, TYPE_CUECHANGE, TYPE_CUT, TYPE_DEVICEMOTION, TYPE_DEVICEORIENTATION, TYPE_DEVICEORIENTATIONABSOLUTE, TYPE_DOM_DOCUMENT_LOADED, TYPE_DRAG, TYPE_DRAGEND, TYPE_DRAGENTER, TYPE_DRAGLEAVE, TYPE_DRAGOVER, TYPE_DRAGSTART, TYPE_DROP, TYPE_DURATIONCHANGE, TYPE_EMPTIED, TYPE_ENDED, TYPE_ERROR, TYPE_FOCUS, TYPE_FOCUS_IN, TYPE_FOCUS_OUT, TYPE_GAMEPAD_CONNECTED, TYPE_GAMEPAD_DISCONNECTED, TYPE_GOTPOINTERCAPTURE, TYPE_HASH_CHANGE, TYPE_INPUT, TYPE_INVALID, TYPE_KEY_DOWN, TYPE_KEY_PRESS, TYPE_KEY_UP, TYPE_LANGUAGECHANGE, TYPE_LOAD, TYPE_LOAD_END, TYPE_LOAD_START, TYPE_LOADEDDATA, TYPE_LOADEDMETADATA, TYPE_LOSTPOINTERCAPTURE, TYPE_MESSAGE, TYPE_MOUDEENTER, TYPE_MOUSELEAVE, TYPE_MOUSEWHEEL, TYPE_MOZFULLSCREENCHANGE, TYPE_MOZFULLSCREENERROR, TYPE_MSSITEMODEJUMPLISTITEMREMOVED, TYPE_OFFLINE, TYPE_ONLINE, TYPE_ONMESSAGEERROR, TYPE_ONTRANSITIONCANCEL, TYPE_ONTRANSITIONEND, TYPE_ONTRANSITIONRUN, TYPE_ONTRANSITIONSTART, TYPE_OPEN, TYPE_PAGEHIDE, TYPE_PAGESHOW, TYPE_PASTE, TYPE_PAUSE, TYPE_PLAY, TYPE_PLAYING, TYPE_POINTERCANCEL, TYPE_POINTERDOWN, TYPE_POINTERENTER, TYPE_POINTERLEAVE, TYPE_POINTERLOCKCHANGE, TYPE_POINTERLOCKERROR, TYPE_POINTERMOVE, TYPE_POINTEROUT, TYPE_POINTEROVER, TYPE_POINTERUP, TYPE_POPSTATE, TYPE_PROGRESS, TYPE_PROPERTY_CHANGE, TYPE_RATECHANGE, TYPE_READY_STATE_CHANGE, TYPE_REJECTIONHANDLED, TYPE_RESET, TYPE_RESIZE, TYPE_SCROLL, TYPE_SCROLLEND, TYPE_SEARCH, TYPE_SEEKED, TYPE_SEEKING, TYPE_SELECT, TYPE_SELECTIONCHANGE, TYPE_SELECTSTART, TYPE_STALLED, TYPE_STORAGE, TYPE_SUBMIT, TYPE_SUSPEND, TYPE_TIMEOUT, TYPE_TIMEUPDATE, TYPE_TOGGLE, TYPE_TRANSITIONEND, TYPE_UNHANDLEDREJECTION, TYPE_UNLOAD, TYPE_VOLUMECHANGE, TYPE_WAITING, TYPE_WEBANIMATIONSTART, TYPE_WEBKITANIMATIONEND, TYPE_WEBKITANIMATIONITERATION, TYPE_WEBKITFULLSCREENCHANGE, TYPE_WEBKITFULLSCREENERROR, TYPE_WEBKITTRANSITIONEND, TYPE_WHEEL
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns some detail information about the event, depending on the event type.getView()
Returns the view from which the event was generated.int
getWhich()
void
initUIEvent
(String type, boolean bubbles, boolean cancelable, Object view, int detail) Implementation of the DOM Level 3 Event method for initializing the UI event.void
jsConstructor
(String type, org.htmlunit.corejs.javascript.ScriptableObject details) JavaScript constructor.protected void
setDetail
(long detail) Sets the detail information for this event.Methods inherited from class org.htmlunit.javascript.host.event.Event
createPropertyChangeEvent, endFire, eventCreated, getComposed, getCurrentTarget, getEventPhase, getKeyCode, getPropertyName, getReturnValue, getSrcElement, getTarget, getTimeStamp, getType, handlePropertyHandlerReturnValue, initEvent, isAborted, isAltKey, isBubbles, isCancelable, isCancelBubble, isCtrlKey, isDefaultPrevented, isImmediatePropagationStopped, isMissingOrUndefined, isPropagationStopped, isShiftKey, preventDefault, processLabelAfterBubbling, setAltKey, setBubbles, setCancelable, setCancelBubble, setCtrlKey, setCurrentTarget, setEventPhase, setEventType, setKeyCode, setReturnValue, setShiftKey, setSrcElement, setTarget, setType, startFire, stopImmediatePropagation, stopPropagation, toString
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
Field Details
-
SCROLL_PAGE_DOWN
public static final int SCROLL_PAGE_DOWNConstant.- See Also:
-
SCROLL_PAGE_UP
public static final int SCROLL_PAGE_UPConstant.- See Also:
-
detail_
private long detail_Specifies some detail information about the event. -
view_
Specifies some view information about the event. -
NO_VIEW
-
-
Constructor Details
-
UIEvent
public UIEvent()Creates a new UI event instance. -
UIEvent
Creates a new UI event instance.- Parameters:
domNode
- the DOM node that triggered the eventtype
- the event type
-
UIEvent
Creates a new event instance.- Parameters:
target
- the event targettype
- the event type
-
-
Method Details
-
jsConstructor
JavaScript constructor.- Overrides:
jsConstructor
in classEvent
- Parameters:
type
- the event typedetails
- the event details (optional)
-
getDetail
public long getDetail()Returns some detail information about the event, depending on the event type. For mouse events, the detail property indicates how many times the mouse has been clicked in the same location for this event.- Returns:
- some detail information about the event, depending on the event type
-
setDetail
protected void setDetail(long detail) Sets the detail information for this event.- Parameters:
detail
- the detail information for this event
-
getView
Returns the view from which the event was generated. In browsers, this is the originating window.- Returns:
- the view from which the event was generated
-
initUIEvent
Implementation of the DOM Level 3 Event method for initializing the UI event.- Parameters:
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 event
-
getWhich
public int getWhich()- Returns:
- a number that indicates which button was pressed on the mouse, or the numeric keyCode or the character code (charCode) of the key pressed on the keyboard
-