Esempio n. 1
0
    void recursivelyHandleMagnify(final MagnificationEvent e) {
      for (final MagnificationListener listener : handler.magnifiers) {
        listener.magnify(e);
        if (e.isConsumed()) return;
      }

      final PerComponentNotifier next = getNextNotifierForComponent(component.getParent());
      if (next != null) next.recursivelyHandleMagnify(e);
    }
Esempio n. 2
0
    void recursivelyHandlePressure(final PressureEvent e) {
      for (final PressureListener listener : handler.pressures) {
        listener.pressure(e);
        if (e.isConsumed()) return;
      }

      final PerComponentNotifier next = getNextNotifierForComponent(component.getParent());
      if (next != null) next.recursivelyHandlePressure(e);
    }
Esempio n. 3
0
    void recursivelyHandleSwipe(final double x, final double y, final SwipeEvent e) {
      for (final SwipeListener listener : handler.swipers) {
        if (x < 0) listener.swipedLeft(e);
        if (x > 0) listener.swipedRight(e);
        if (y < 0) listener.swipedDown(e);
        if (y > 0) listener.swipedUp(e);
        if (e.isConsumed()) return;
      }

      final PerComponentNotifier next = getNextNotifierForComponent(component.getParent());
      if (next != null) next.recursivelyHandleSwipe(x, y, e);
    }
Esempio n. 4
0
    void recursivelyHandlePhaseChange(final double phase, final GesturePhaseEvent e) {
      for (final GesturePhaseListener listener : handler.phasers) {
        if (phase < 0) {
          listener.gestureBegan(e);
        } else {
          listener.gestureEnded(e);
        }
        if (e.isConsumed()) return;
      }

      final PerComponentNotifier next = getNextNotifierForComponent(component.getParent());
      if (next != null) next.recursivelyHandlePhaseChange(phase, e);
    }