org.w3c.dom.events
Interface MouseWheelEvent

All Superinterfaces:
Event, MouseEvent, UIEvent

public interface MouseWheelEvent
extends MouseEvent

The 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.


Field Summary
 
Fields inherited from interface org.w3c.dom.events.Event
AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE
 
Method Summary
 int getWheelDelta()
          Indicates the number of "clicks" the wheel has been rotated.
 void initMouseWheelEventNS(String namespaceURIArg, String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, short buttonArg, EventTarget relatedTargetArg, 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().
 
Methods inherited from interface org.w3c.dom.events.MouseEvent
getAltKey, getButton, getClientX, getClientY, getCtrlKey, getMetaKey, getRelatedTarget, getScreenX, getScreenY, getShiftKey, initMouseEvent, initMouseEventNS
 
Methods inherited from interface org.w3c.dom.events.UIEvent
getDetail, getView, initUIEvent, initUIEventNS
 
Methods inherited from interface org.w3c.dom.events.Event
getBubbles, getCancelable, getCurrentTarget, getDefaultPrevented, getEventPhase, getNamespaceURI, getTarget, getTimeStamp, getType, initEvent, initEventNS, preventDefault, stopPropagation
 

Method Detail

getWheelDelta

public int getWheelDelta()
Indicates the number of "clicks" the wheel has been rotated. A positive value indicates that the wheel has been rotated away from the user (or in a right-hand manner on horizontally aligned devices) and a negative value indicates that the wheel has been rotated towards the user (or in a left-hand manner on horizontally aligned devices).

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.


initMouseWheelEventNS

public void initMouseWheelEventNS(String namespaceURIArg,
                                  String typeArg,
                                  boolean canBubbleArg,
                                  boolean cancelableArg,
                                  AbstractView viewArg,
                                  int detailArg,
                                  int screenXArg,
                                  int screenYArg,
                                  int clientXArg,
                                  int clientYArg,
                                  short buttonArg,
                                  EventTarget relatedTargetArg,
                                  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(). 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).

Parameters:
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.
Since:
DOM Level 3


Copyright © 2000,2004 World Wide Web Consortium (W3C). See the Copyright Notice for details.