Class DoubleTapper

All Implemented Interfaces:
react.Reactor.RListener, react.SignalView.Listener<Object>, react.ValueView.Listener<Object>

public class DoubleTapper extends Tapper
Detects double taps on a layer, using a threshold time between taps. Two taps that occur within a time span shorter than the threshold are considered a double tap.
  • Field Details

    • DOUBLE_TIME

      public static final double DOUBLE_TIME
      Maximum time between taps for the 2nd to be considered a double.
      See Also:
  • Constructor Details

    • DoubleTapper

      public DoubleTapper()
  • Method Details

    • onTap

      public void onTap(Event.XY where)
      Description copied from class: Tapper
      Called when a tap occurs. By default, this just calls Tapper.onTap(). Subclasses overriding needn't call super.
      Overrides:
      onTap in class Tapper
      Parameters:
      where - the pointer's end position
    • onDoubleTap

      public void onDoubleTap()
      Called when a double tap occurs. This is a simpler version of onDoubleTap(Event.XY), for subclasses that don't require the event position.
    • onDoubleTap

      public void onDoubleTap(Event.XY where)
      Called when a double tap occurs. By default, this just calls onDoubleTap(). Subclasses overriding this needn't call super.
      Parameters:
      where - the pointer's end position (for the 2nd tap)