Errai 3.0.1-SNAPSHOT

org.jboss.errai.ui.cordova.events.touch.swipe
Class SwipeEndEvent

java.lang.Object
  extended by com.google.web.bindery.event.shared.Event<H>
      extended by com.google.gwt.event.shared.GwtEvent<H>
          extended by org.jboss.errai.ui.cordova.events.touch.swipe.SwipeEvent<SwipeEndHandler>
              extended by org.jboss.errai.ui.cordova.events.touch.swipe.SwipeEndEvent

public class SwipeEndEvent
extends SwipeEvent<SwipeEndHandler>

A SwipeEndEvent occurs when the user lifts his finger of the display

Author:
Daniel Kurka

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.errai.ui.cordova.events.touch.swipe.SwipeEvent
SwipeEvent.Direction
 
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
com.google.gwt.event.shared.GwtEvent.Type<H>
 
Constructor Summary
SwipeEndEvent(boolean distanceReached, int distance, SwipeEvent.Direction direction)
          Construct a swipe end event
 
Method Summary
protected  void dispatch(SwipeEndHandler handler)
           
 com.google.gwt.event.shared.GwtEvent.Type<SwipeEndHandler> getAssociatedType()
           
 int getDistance()
          the distance the finger has covered in px
static com.google.gwt.event.shared.GwtEvent.Type<SwipeEndHandler> getType()
           
 boolean isDistanceReached()
          is the minimum distance reached by this swipe
 
Methods inherited from class org.jboss.errai.ui.cordova.events.touch.swipe.SwipeEvent
getDirection
 
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

SwipeEndEvent

public SwipeEndEvent(boolean distanceReached,
                     int distance,
                     SwipeEvent.Direction direction)
Construct a swipe end event

Parameters:
distanceReached - was the minumum distance reached
distance - the distance that was covered by the finger
direction - the direction of the swipe
Method Detail

getType

public static com.google.gwt.event.shared.GwtEvent.Type<SwipeEndHandler> getType()

getAssociatedType

public com.google.gwt.event.shared.GwtEvent.Type<SwipeEndHandler> getAssociatedType()
Overrides:
getAssociatedType in class com.google.gwt.event.shared.GwtEvent<SwipeEndHandler>

dispatch

protected void dispatch(SwipeEndHandler handler)
Specified by:
dispatch in class com.google.gwt.event.shared.GwtEvent<SwipeEndHandler>

getDistance

public int getDistance()
the distance the finger has covered in px

Returns:
the distance in px

isDistanceReached

public boolean isDistanceReached()
is the minimum distance reached by this swipe

Returns:
true if minimum distance was reached

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.