Package tripleplay.ui
Class Behavior.Click<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>
- All Implemented Interfaces:
react.Reactor.RListener
,react.SignalView.Listener<Object>
,react.ValueView.Listener<Object>
- Direct Known Subclasses:
Behavior.Capturing
Implements clicking behavior.
-
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 TypeFieldDescriptionreact.Signal<T>
A signal emitted with our owner when clicked.A delay (in milliseconds) during which the owner will remain unclickable after it has been clicked. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
click()
Triggers a click.void
layout()
Called when our owner is laid out.void
onClick
(Pointer.Interaction iact) Called when the pointer is released and the subclass decides that it is a click, i.e.void
onPress
(Pointer.Interaction iact) Called when the pointer is pressed down on our element.Methods inherited from class tripleplay.ui.Behavior.Select
onCancel, onHover, onRelease
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
-
DEBOUNCE_DELAY
A delay (in milliseconds) during which the owner will remain unclickable after it has been clicked. This ensures that users don't hammer away at a widget, triggering multiple responses (which code rarely protects against). Inherited. -
clicked
A signal emitted with our owner when clicked.
-
-
Constructor Details
-
Click
-
-
Method Details
-
click
public void click()Triggers a click. -
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. -
onPress
Description copied from class:Behavior
Called when the pointer is pressed down on our element.- Overrides:
onPress
in classBehavior.Select<T extends Element<T>>
-
onClick
Description copied from class:Behavior
Called when the pointer is released and the subclass decides that it is a click, i.e. returns true fromBehavior.onRelease(playn.scene.Pointer.Interaction)
.- Overrides:
onClick
in classBehavior.Select<T extends Element<T>>
-