Package tripleplay.ui

Class Behavior.RapidFire<T extends Element<T>>

All Implemented Interfaces:
react.Reactor.RListener, react.SignalView.Listener<Object>, react.ValueView.Listener<Object>
Enclosing class:
Behavior<T extends Element<T>>

public static class Behavior.RapidFire<T extends Element<T>> extends Behavior.Capturing<T>
Captures the pointer and dispatches one click on press, a second after an initial delay and at regular intervals after that.
  • Field Details

    • INITIAL_DELAY

      public static final Style<Integer> INITIAL_DELAY
      Milliseconds after the first click that the second click is dispatched.
    • REPEAT_DELAY

      public static final Style<Integer> REPEAT_DELAY
      Milliseconds between repeated click dispatches.
  • Constructor Details

    • RapidFire

      public RapidFire(T owner)
      Creates a new rapid fire behavior for the given owner.
  • Method Details

    • onPress

      public void onPress(Pointer.Interaction iact)
      Description copied from class: Behavior
      Called when the pointer is pressed down on our element.
      Overrides:
      onPress in class Behavior.Capturing<T extends Element<T>>
    • onHover

      public void onHover(Pointer.Interaction iact, boolean inBounds)
      Description copied from class: Behavior
      Called as the user drags the pointer around after pressing. Derived classes map this onto the widget state, such as updating selectedness.
      Overrides:
      onHover in class Behavior.Select<T extends Element<T>>
    • layout

      public void layout()
      Description copied from class: Behavior
      Called when our owner is laid out. If the behavior needs to resolve configuration via styles, this is where it should do it.
      Overrides:
      layout in class Behavior.Click<T extends Element<T>>