Class GestureChain
- java.lang.Object
-
- com.sencha.gxt.core.client.gestures.GestureChain
-
- All Implemented Interfaces:
GestureRecognizer
public class GestureChain extends Object implements GestureRecognizer
Groups gestures together, in order of which should have first crack an an incoming event. Does not supportstart(java.util.List)
orgetTouches()
.
-
-
Constructor Summary
Constructors Constructor Description GestureChain(GestureRecognizer... gestures)
GestureChain(List<GestureRecognizer> gestures)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Ends recognition of the gesture, and fires any cancel events that apply.List<TouchData>
getTouches()
Gets all actively recognized touches that are being recognized by this gesture.boolean
handle(com.google.gwt.dom.client.NativeEvent event)
Takes a browser event, and checks to see if it should decipher a gesture from it.void
setDelegate(com.google.gwt.event.shared.HasHandlers eventDelegate)
Sets delegate to receive Gesture eventsvoid
start(List<TouchData> touches)
Artificially starts a gesture
-
-
-
Constructor Detail
-
GestureChain
public GestureChain(GestureRecognizer... gestures)
-
GestureChain
public GestureChain(List<GestureRecognizer> gestures)
-
-
Method Detail
-
cancel
public void cancel()
Description copied from interface:GestureRecognizer
Ends recognition of the gesture, and fires any cancel events that apply. Any touch events being recognized by this object will now be ignored.- Specified by:
cancel
in interfaceGestureRecognizer
-
getTouches
public List<TouchData> getTouches()
Description copied from interface:GestureRecognizer
Gets all actively recognized touches that are being recognized by this gesture.- Specified by:
getTouches
in interfaceGestureRecognizer
- Returns:
- the touches
-
handle
public boolean handle(com.google.gwt.dom.client.NativeEvent event)
Description copied from interface:GestureRecognizer
Takes a browser event, and checks to see if it should decipher a gesture from it.
Callers of this are expected to do their own vetting to decide if the given event should be handled by this gesture - for example, if a cell accepts a tap on one part of it and a longpress on another, the cell should determine where the touch events occur and send to the right recognizer accordingly.
- Specified by:
handle
in interfaceGestureRecognizer
- Parameters:
event
- the browser event to read for a gesture.- Returns:
- true if the gesture is not handling the event and can allow it to be propagated, false to indicate that it has been handled and should not be given to other handlers. Should always return true for any start event.
-
start
public void start(List<TouchData> touches)
Description copied from interface:GestureRecognizer
Artificially starts a gesture- Specified by:
start
in interfaceGestureRecognizer
- Parameters:
touches
- the touches to be started
-
setDelegate
public void setDelegate(com.google.gwt.event.shared.HasHandlers eventDelegate)
Description copied from interface:GestureRecognizer
Sets delegate to receive Gesture events- Specified by:
setDelegate
in interfaceGestureRecognizer
- Parameters:
eventDelegate
- the event handler delegate
-
-