public class

MouseWheelEvent

extends MouseEvent<H extends EventHandler>
java.lang.Object
   ↳ com.google.gwt.event.shared.GwtEvent<H extends com.google.gwt.event.shared.EventHandler>
     ↳ com.google.gwt.event.dom.client.DomEvent<H extends com.google.gwt.event.shared.EventHandler>
       ↳ com.google.gwt.event.dom.client.HumanInputEvent<H extends com.google.gwt.event.shared.EventHandler>
         ↳ com.google.gwt.event.dom.client.MouseEvent<H extends com.google.gwt.event.shared.EventHandler>
           ↳ com.google.gwt.event.dom.client.MouseWheelEvent

Class Overview

Represents a native mouse wheel event.

Summary

Protected Constructors
MouseWheelEvent()
Public Methods
final Type<MouseWheelHandler> getAssociatedType()
Returns the type used to register this event.
int getDeltaY()
Get the change in the mouse wheel position along the Y-axis; positive if the mouse wheel is moving north (toward the top of the screen) or negative if the mouse wheel is moving south (toward the bottom of the screen).
static Type<MouseWheelHandler> getType()
Gets the event type associated with mouse wheel events.
boolean isNorth()
Convenience method that returns true if getDeltaY() is a negative value (ie, the velocity is directed toward the top of the screen).
boolean isSouth()
Convenience method that returns true if getDeltaY() is a positive value (ie, the velocity is directed toward the bottom of the screen).
Protected Methods
void dispatch(MouseWheelHandler handler)
Should only be called by HandlerManager.
[Expand]
Inherited Methods
From class com.google.gwt.event.dom.client.MouseEvent
From class com.google.gwt.event.dom.client.HumanInputEvent
From class com.google.gwt.event.dom.client.DomEvent
From class com.google.gwt.event.shared.GwtEvent
From class java.lang.Object
From interface com.google.gwt.event.dom.client.HasNativeEvent

Protected Constructors

protected MouseWheelEvent ()

Public Methods

public final Type<MouseWheelHandler> getAssociatedType ()

Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

Returns
  • the type

public int getDeltaY ()

Get the change in the mouse wheel position along the Y-axis; positive if the mouse wheel is moving north (toward the top of the screen) or negative if the mouse wheel is moving south (toward the bottom of the screen). Note that delta values are not normalized across browsers or OSes.

Returns
  • the delta of the mouse wheel along the y axis

public static Type<MouseWheelHandler> getType ()

Gets the event type associated with mouse wheel events.

Returns
  • the handler type

public boolean isNorth ()

Convenience method that returns true if getDeltaY() is a negative value (ie, the velocity is directed toward the top of the screen).

Returns
  • true if the velocity is directed toward the top of the screen

public boolean isSouth ()

Convenience method that returns true if getDeltaY() is a positive value (ie, the velocity is directed toward the bottom of the screen).

Returns
  • true if the velocity is directed toward the bottom of the screen

Protected Methods

protected void dispatch (MouseWheelHandler handler)

Should only be called by HandlerManager. In other words, do not use or call.

Parameters
handler handler