public interface MouseWheelEvent extends MouseEvent
MouseWheelEvent
interface provides specific contextual
information associated with mouse wheel events.
Note: This interface has not yet been accepted for inclusion in the W3C DOM 3 Event specification. It may be removed from the JSR 280 specification or added to a different namespace in a subsequent version of the specification.
AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE
Modifier and Type | Method and Description |
---|---|
int |
getWheelDelta()
Indicates the number of "clicks" the wheel has been rotated.
|
void |
initMouseWheelEventNS(java.lang.String namespaceURIArg,
java.lang.String typeArg,
boolean canBubbleArg,
boolean cancelableArg,
AbstractView viewArg,
int detailArg,
int screenXArg,
int screenYArg,
int clientXArg,
int clientYArg,
short buttonArg,
EventTarget relatedTargetArg,
java.lang.String modifiersListArg,
int wheelDeltaArg)
The
initMouseWheelEventNS method is used to initialize the
value of a MouseWheelEvent object and has the same
behavior as Event.initEventNS() . |
getAltKey, getButton, getClientX, getClientY, getCtrlKey, getMetaKey, getRelatedTarget, getScreenX, getScreenY, getShiftKey, initMouseEvent, initMouseEventNS
getDetail, getView, initUIEvent, initUIEventNS
getBubbles, getCancelable, getCurrentTarget, getDefaultPrevented, getEventPhase, getNamespaceURI, getTarget, getTimeStamp, getType, initEvent, initEventNS, preventDefault, stopPropagation
int getWheelDelta()
A "click" is defined to be a unit of rotation. On some devices this is a finite physical step. On devices with smooth rotation, a "click" becomes the smallest measurable amount of rotation.
void initMouseWheelEventNS(java.lang.String namespaceURIArg, java.lang.String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, short buttonArg, EventTarget relatedTargetArg, java.lang.String modifiersListArg, int wheelDeltaArg)
initMouseWheelEventNS
method is used to initialize the
value of a MouseWheelEvent
object and has the same
behavior as Event.initEventNS()
.
For mousewheel
, MouseEvent.getRelatedTarget
must indicate the element over which the pointer is located, or
null
if there is no such element (in the case where the
device does not have a pointer, but does have a wheel).namespaceURIArg
- Refer to the Event.initEventNS()
method for a description of this parameter.typeArg
- Refer to the Event.initEventNS()
method
for a description of this parameter.canBubbleArg
- Refer to the Event.initEventNS()
method for a description of this parameter.cancelableArg
- Refer to the Event.initEventNS()
method for a description of this parameter.viewArg
- Refer to the UIEvent.initUIEvent()
method
for a description of this parameter.detailArg
- Refer to the UIEvent.initUIEvent()
method for a description of this parameter.screenXArg
- Refer to the MouseEvent.initMouseEventNS()
method for a description of this parameter.screenYArg
- Refer to the MouseEvent.initMouseEventNS()
method for a description of this parameter.clientXArg
- Refer to the MouseEvent.initMouseEventNS()
method for a description of this parameter.clientYArg
- Refer to the MouseEvent.initMouseEventNS()
method for a description of this parameter.buttonArg
- Refer to the MouseEvent.initMouseEventNS()
method for a description of this parameter.relatedTargetArg
- Refer to the MouseEvent.initMouseEventNS()
method for a description of this parameter.modifiersListArg
- Refer to the MouseEvent.initMouseEventNS()
method for a description of this parameter.wheelDeltaArg
- A number indicating the distance in "clicks"
(positive means rotated away from the user, negative means rotated
towards the user). The default value of the wheelDelta attribute is 0.Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Use is subject to License Terms. Your use of this web site or any of its contents or software indicates your agreement to be bound by these License Terms.