public class MouseWheelEvent extends MouseEvent<MouseWheelHandler>
DomEvent.Type<H extends EventHandler>
Modifier | Constructor and Description |
---|---|
protected |
MouseWheelEvent()
Protected constructor, use
DomEvent.fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)
to fire mouse wheel events. |
Modifier and Type | Method and Description |
---|---|
protected void |
dispatch(MouseWheelHandler handler)
Should only be called by
HandlerManager . |
DomEvent.Type<MouseWheelHandler> |
getAssociatedType()
Returns the
Event.Type used to register this event, allowing an
EventBus to find handlers of the appropriate class. |
int |
getDeltaY()
Get the change in the mouse wheel position along the Y-axis; negative if
the mouse wheel is moving north (toward the top of the screen) or positive
if the mouse wheel is moving south (toward the bottom of the screen).
|
static DomEvent.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). |
getClientX, getClientY, getNativeButton, getRelativeX, getRelativeY, getScreenX, getScreenY, getX, getY
isAltKeyDown, isControlKeyDown, isMetaKeyDown, isShiftKeyDown
fireNativeEvent, fireNativeEvent, getNativeEvent, getRelativeElement, init, preventDefault, setNativeEvent, setRelativeElement, stopPropagation
assertLive, getSource, isLive, kill, revive
setSource, toDebugString, toString
protected MouseWheelEvent()
DomEvent.fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)
to fire mouse wheel events.public static DomEvent.Type<MouseWheelHandler> getType()
public final DomEvent.Type<MouseWheelHandler> getAssociatedType()
Event
Event.Type
used to register this event, allowing an
EventBus
to find handlers of the appropriate class.getAssociatedType
in class DomEvent<MouseWheelHandler>
public int getDeltaY()
public boolean isNorth()
true
if getDeltaY()
is a negative value (ie, the velocity is directed toward the top of the
screen).public boolean isSouth()
true
if getDeltaY()
is a positive value (ie, the velocity is directed toward the bottom of the
screen).protected void dispatch(MouseWheelHandler handler)
GwtEvent
HandlerManager
. In other words, do not use
or call.dispatch
in class GwtEvent<MouseWheelHandler>
handler
- handlerEventBus.dispatchEvent(Event, Object)