com.maryanovsky.gwtutils.client.ui.mouse.gestures.drag
Class DragEndEvent

java.lang.Object
  extended by com.google.web.bindery.event.shared.Event<H>
      extended by com.google.gwt.event.shared.GwtEvent<H>
          extended by com.maryanovsky.gwtutils.client.event.SyntheticEvent<H,E>
              extended by com.maryanovsky.gwtutils.client.ui.mouse.gestures.SyntheticMouseGestureEvent<DragEndHandler,MouseUpEvent>
                  extended by com.maryanovsky.gwtutils.client.ui.mouse.gestures.drag.DragEndEvent

public class DragEndEvent
extends SyntheticMouseGestureEvent<DragEndHandler,MouseUpEvent>

Represents a drag end event.

Author:
Maryanovsky Alexander

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
GwtEvent.Type<H>
 
Constructor Summary
DragEndEvent(MouseUpEvent evt, int button, PointView location, PointView offset)
          Creates a new DragEndEvent from the specified source MouseUpEvent, mouse location and offset from the initial touch point.
 
Method Summary
protected  void dispatch(DragEndHandler handler)
          Dispatches the event to the handler.
 GwtEvent.Type<DragEndHandler> getAssociatedType()
          Returns the event type associated with drag end events.
 int getButton()
          Returns the button that was clicked.
 PointView getLocation()
          Returns the location of the lifted finger, in the target element's coordinate system.
 PointView getOffset()
          Returns the offset of the lifted finger from the initial touching location.
static GwtEvent.Type<DragEndHandler> getType()
          Returns the event type associated with drag end events.
 
Methods inherited from class com.maryanovsky.gwtutils.client.event.SyntheticEvent
getSourceEvent
 
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, getSource, isLive, kill, revive
 
Methods inherited from class com.google.web.bindery.event.shared.Event
setSource, toDebugString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DragEndEvent

public DragEndEvent(MouseUpEvent evt,
                    int button,
                    PointView location,
                    PointView offset)
Creates a new DragEndEvent from the specified source MouseUpEvent, mouse location and offset from the initial touch point.

Parameters:
evt - The touch end event that triggered this event.
button - The pressed mouse button.
location - The location of the mouse in the target element's coordinate system.
offset - The offset of the mouse from the location where it was pressed.
Method Detail

getButton

public int getButton()
Returns the button that was clicked. Possible values are NativeEvent.BUTTON_LEFT, NativeEvent.BUTTON_MIDDLE and NativeEvent.BUTTON_RIGHT.


getLocation

public PointView getLocation()
Returns the location of the lifted finger, in the target element's coordinate system.


getOffset

public PointView getOffset()
Returns the offset of the lifted finger from the initial touching location.


getType

public static GwtEvent.Type<DragEndHandler> getType()
Returns the event type associated with drag end events.


getAssociatedType

public GwtEvent.Type<DragEndHandler> getAssociatedType()
Returns the event type associated with drag end events.

Overrides:
getAssociatedType in class GwtEvent<DragEndHandler>

dispatch

protected void dispatch(DragEndHandler handler)
Dispatches the event to the handler.

Specified by:
dispatch in class GwtEvent<DragEndHandler>