Package org.reactfx
Interface Toggle
- All Superinterfaces:
javafx.beans.Observable
,Observable<Consumer<? super Boolean>>
,javafx.beans.value.ObservableValue<Boolean>
,Suspendable
,Val<Boolean>
- All Known Implementing Classes:
SuspendableBoolean
,SuspendableNo
,SuspendableYes
,ToggleFromVal
Observable boolean that changes value when suspended.
Which boolean value is the value of the base state and which is the value
of the suspended state depends on the implementation.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Toggle
from
(javafx.beans.value.ObservableValue<Boolean> obs, Suspendable suspender) Creates a Toggle view of an observable boolean and a Suspendable whose suspension causes the boolean value to switch.Methods inherited from interface org.reactfx.Observable
addObserver, observe, removeObserver
Methods inherited from interface javafx.beans.value.ObservableValue
getValue
Methods inherited from interface org.reactfx.Suspendable
suspend, suspendWhen, suspendWhile, suspendWhile
Methods inherited from interface org.reactfx.value.Val
addInvalidationObserver, addListener, addListener, animate, animate, asList, asVar, changes, conditionOn, conditionOnShowing, filter, flatMap, getOpt, getOrElse, getOrSupply, getOrThrow, ifPresent, invalidations, isEmpty, isPresent, map, mapDynamic, observeChanges, observeInvalidations, orElse, orElseConst, pin, removeInvalidationObserver, removeListener, removeListener, selectVar, selectVar, suspendable, values
-
Method Details
-
from
Creates a Toggle view of an observable boolean and a Suspendable whose suspension causes the boolean value to switch.- Parameters:
obs
- boolean value that indicates suspension ofsuspender
.suspender
- Assumed to switch the value ofobs
when suspended and switch back when resumed, unless there are other suspenders keeping it in the value corresponding to the suspended state.
-