Top Fields Constructors Methods
org.reactfx.value

pack-priv Class VarFromVal<T>

extends ProxyVal<T, T>
implements Var<T>
Class Inheritance
All Implemented Interfaces
org.reactfx.value.Var, javafx.beans.property.Property, javafx.beans.value.WritableValue, javafx.beans.property.ReadOnlyProperty, javafx.beans.value.ObservableValue, javafx.beans.Observable, org.reactfx.value.Val, org.reactfx.Observable
Imports
java.util.function.Consumer, javafx.beans.value.ObservableValue, org.reactfx.Subscription

Field Summary

Modifier and TypeField and Description
private Subscription
private final Consumer<T>

Constructor Summary

AccessConstructor and Description
pack-priv
VarFromVal(Val<T> underlying, Consumer<T> setter)

Method Summary

Modifier and TypeMethod and Description
protected Consumer<? super T>
adaptObserver(Consumer<? super T> observer)

Implements abstract org.reactfx.ProxyObservable.adaptObserver.

Adapts the given observer to observer of the underlying Observable.

public void
bind(ObservableValue<? extends T> observable)

Implements javafx.beans.property.Property.bind.

Create a unidirection binding for this Property.

public T
getValue()

Implements javafx.beans.value.ObservableValue.getValue, javafx.beans.value.WritableValue.getValue.

Returns the current value of this ObservableValue

public boolean
isBound()

Implements javafx.beans.property.Property.isBound.

Can be used to check, if a Property is bound.

public void
setValue(T value)

Implements javafx.beans.value.WritableValue.setValue.

Set the wrapped value.

public void
unbind()

Implements javafx.beans.property.Property.unbind.

Remove the unidirectional binding for this Property.

Field Detail

bindingback to summary
private Subscription binding
setterback to summary
private final Consumer<T> setter

Constructor Detail

VarFromValback to summary
pack-priv VarFromVal(Val<T> underlying, Consumer<T> setter)

Method Detail

adaptObserverback to summary
protected Consumer<? super T> adaptObserver(Consumer<? super T> observer)

Implements abstract org.reactfx.ProxyObservable.adaptObserver.

Doc from org.reactfx.ProxyObservable.adaptObserver.

Adapts the given observer to observer of the underlying Observable.

Important Note

It is required that the transformation applied to two observers that are _equal_ yields two adapted observers that are _equal_. In other words, if `o1.equals(o2)`, then it must be the case that `adaptObserver(o1).equals(adaptObserver(o2))`.

Annotations
@Override
bindback to summary
public void bind(ObservableValue<? extends T> observable)

Implements javafx.beans.property.Property.bind.

Doc from javafx.beans.property.Property.bind.

Create a unidirection binding for this Property.

Note that JavaFX has all the bind calls implemented through weak listeners. This means the bound property can be garbage collected and stopped from being updated.

Annotations
@Override
getValueback to summary
public T getValue()

Implements javafx.beans.value.ObservableValue.getValue, javafx.beans.value.WritableValue.getValue.

Doc from javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

Annotations
@Override
isBoundback to summary
public boolean isBound()

Implements javafx.beans.property.Property.isBound.

Doc from javafx.beans.property.Property.isBound.

Can be used to check, if a Property is bound.

Annotations
@Override
setValueback to summary
public void setValue(T value)

Implements javafx.beans.value.WritableValue.setValue.

Doc from javafx.beans.value.WritableValue.setValue.

Set the wrapped value.

Annotations
@Override
unbindback to summary
public void unbind()

Implements javafx.beans.property.Property.unbind.

Doc from javafx.beans.property.Property.unbind.

Remove the unidirectional binding for this Property. If the Property is not bound, calling this method has no effect.

Annotations
@Override