Package tripleplay.ui
Class Behavior.Toggle<T extends Element<T>>
java.lang.Object
react.Slot<Object>
playn.scene.Pointer.Listener
tripleplay.ui.Behavior<T>
tripleplay.ui.Behavior.Toggle<T>
- All Implemented Interfaces:
react.Reactor.RListener
,react.SignalView.Listener<Object>
,react.ValueView.Listener<Object>
Implements toggling 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
click()
Triggers a click.void
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
-
Field Details
-
clicked
A signal emitted with our owner when clicked. -
selected
Indicates whether our owner is selected. It may be listened to, and updated.
-
-
Constructor Details
-
Toggle
-
-
Method Details
-
click
public void click()Triggers a click. -
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)
.
-