Top Description Methods
org.reactfx

public Interface Toggle

Additional top-level class in compilation unit: ToggleFromVal.

extends Val<Boolean>, Suspendable
Known Direct Implementers
org.reactfx.ToggleFromVal, org.reactfx.SuspendableBoolean
Imports
java.util.function.Consumer, javafx.beans.value.ObservableValue, org.reactfx.value.ProxyVal, .Val

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

Modifier and TypeMethod and Description
public static Toggle
from(ObservableValue<Boolean>
boolean value that indicates suspension of suspender.
obs
,
Suspendable
Assumed to switch the value of obs when suspended and switch back when resumed, unless there are other suspenders keeping it in the value corresponding to the suspended state.
suspender
)

Creates a Toggle view of an observable boolean and a Suspendable whose suspension causes the boolean value to switch.

Inherited from org.reactfx.Suspendable:
combinesuspendsuspendWhensuspendWhilesuspendWhile
Inherited from org.reactfx.value.Val:
addInvalidationObserveraddListeneraddListeneranimateanimateanimateanimateanimateanimateasListasVarchangescombinecombinecombinecombinecombineconditionOnconditionOnconditionOnShowingconditionOnShowingconstantcreatecreatefilterfilterflatMapflatMapgetOptgetOrElsegetOrSupplygetOrThrowifPresentinvalidationsisEmptyisPresentmapmapmapDynamicmapDynamicobserveChangesobserveChangesobserveInvalidationsobserveInvalidationsorElseorElseorElseConstorElseConstpinremoveInvalidationObserverremoveListenerremoveListenerselectVarselectVarselectVarselectVarshowingPropertysuspendablesuspendablevalueswrap

Method Detail

fromback to summary
public static Toggle from(ObservableValue<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:ObservableValue<Boolean>

boolean value that indicates suspension of suspender.

suspender:Suspendable

Assumed to switch the value of obs when suspended and switch back when resumed, unless there are other suspenders keeping it in the value corresponding to the suspended state.