Package org.reactfx
Interface Toggle
-
- All Superinterfaces:
javafx.beans.Observable
,Observable<java.util.function.Consumer<? super java.lang.Boolean>>
,javafx.beans.value.ObservableValue<java.lang.Boolean>
,Suspendable
,Val<java.lang.Boolean>
- All Known Implementing Classes:
SuspendableBoolean
,SuspendableNo
,SuspendableYes
,ToggleFromVal
public interface Toggle extends Val<java.lang.Boolean>, Suspendable
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 Methods Modifier and Type Method Description static Toggle
from(javafx.beans.value.ObservableValue<java.lang.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 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 Detail
-
from
static Toggle from(javafx.beans.value.ObservableValue<java.lang.Boolean> obs, Suspendable suspender)
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.
-
-