Package tripleplay.ui
Class Behavior.RapidFire<T extends Element<T>>
java.lang.Object
react.Slot<Object>
playn.scene.Pointer.Listener
tripleplay.ui.Behavior<T>
tripleplay.ui.Behavior.Select<T>
tripleplay.ui.Behavior.Click<T>
tripleplay.ui.Behavior.Capturing<T>
tripleplay.ui.Behavior.RapidFire<T>
- All Implemented Interfaces:
react.Reactor.RListener
,react.SignalView.Listener<Object>
,react.ValueView.Listener<Object>
Captures the pointer and dispatches one click on press, a second after an initial delay
and at regular intervals after that.
-
Nested Class Summary
Nested classes/interfaces inherited from class tripleplay.ui.Behavior
Behavior.Capturing<T extends Element<T>>, Behavior.Click<T extends Element<T>>, Behavior.Ignore<T extends Element<T>>, Behavior.RapidFire<T extends Element<T>>, Behavior.Select<T extends Element<T>>, Behavior.Toggle<T extends Element<T>>, Behavior.Track<T extends Element<T>>
-
Field Summary
Modifier and TypeFieldDescriptionMilliseconds after the first click that the second click is dispatched.Milliseconds between repeated click dispatches.Fields inherited from class tripleplay.ui.Behavior.Click
clicked, DEBOUNCE_DELAY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
layout()
Called when our owner is laid out.void
onHover
(Pointer.Interaction iact, boolean inBounds) Called as the user drags the pointer around after pressing.void
onPress
(Pointer.Interaction iact) Called when the pointer is pressed down on our element.Methods inherited from class tripleplay.ui.Behavior.Capturing
onCancel, onRelease
Methods inherited from class tripleplay.ui.Behavior.Click
click, onClick
Methods inherited from class tripleplay.ui.Behavior
onDrag, onEnd, onStart, soundAction
Methods inherited from class playn.scene.Pointer.Listener
onEmit
Methods inherited from class react.Slot
andThen, compose, filtered, onChange
-
Field Details
-
INITIAL_DELAY
Milliseconds after the first click that the second click is dispatched. -
REPEAT_DELAY
Milliseconds between repeated click dispatches.
-
-
Constructor Details
-
RapidFire
Creates a new rapid fire behavior for the given owner.
-
-
Method Details
-
onPress
Description copied from class:Behavior
Called when the pointer is pressed down on our element.- Overrides:
onPress
in classBehavior.Capturing<T extends Element<T>>
-
onHover
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 classBehavior.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 classBehavior.Click<T extends Element<T>>
-