Interface GestureRecognizer

    • Method Summary

      All Methods Instance Methods Abstract 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 events
      void start​(List<TouchData> touches)
      Artificially starts a gesture
    • Method Detail

      • cancel

        void cancel()
        Ends recognition of the gesture, and fires any cancel events that apply. Any touch events being recognized by this object will now be ignored.
      • getTouches

        List<TouchData> getTouches()
        Gets all actively recognized touches that are being recognized by this gesture.
        Returns:
        the touches
      • handle

        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.

        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.

        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.
      • setDelegate

        void setDelegate​(com.google.gwt.event.shared.HasHandlers eventDelegate)
        Sets delegate to receive Gesture events
        Parameters:
        eventDelegate - the event handler delegate
      • start

        void start​(List<TouchData> touches)
        Artificially starts a gesture
        Parameters:
        touches - the touches to be started