Package tripleplay.ui
Class Behavior.Select<T extends Element<T>>
java.lang.Object
react.Slot<Object>
playn.scene.Pointer.Listener
tripleplay.ui.Behavior<T>
tripleplay.ui.Behavior.Select<T>
- All Implemented Interfaces:
react.Reactor.RListener
,react.SignalView.Listener<Object>
,react.ValueView.Listener<Object>
- Direct Known Subclasses:
Behavior.Click
Implements button-like behavior: selects the element when the pointer is in bounds, and
deselects on release. This is a pretty common case and inherited by
Behavior.Click
.-
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>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onCancel
(Pointer.Interaction iact) void
onClick
(Pointer.Interaction iact) Called when the pointer is released and the subclass decides that it is a click, i.e.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.boolean
onRelease
(Pointer.Interaction iact) Called when the pointer is released after having been pressed on this widget.Methods inherited from class playn.scene.Pointer.Listener
onEmit
Methods inherited from class react.Slot
andThen, compose, filtered, onChange
-
Constructor Details
-
Select
-
-
Method Details
-
onPress
Description copied from class:Behavior
Called when the pointer is pressed down on our element. -
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. -
onRelease
Description copied from class:Behavior
Called when the pointer is released after having been pressed on this widget. This should return true if the gesture is considered a click, in which caseBehavior.onClick(playn.scene.Pointer.Interaction)
will be called automatically. -
onCancel
- Overrides:
onCancel
in classPointer.Listener
-
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)
.
-