Class VarFromVal<T>

  • All Implemented Interfaces:
    javafx.beans.Observable, javafx.beans.property.Property<T>, javafx.beans.property.ReadOnlyProperty<T>, javafx.beans.value.ObservableValue<T>, javafx.beans.value.WritableValue<T>, Observable<java.util.function.Consumer<? super T>>, Val<T>, Var<T>

    class VarFromVal<T>
    extends ProxyVal<T,​T>
    implements Var<T>
    • Field Detail

      • setter

        private final java.util.function.Consumer<T> setter
    • Constructor Detail

      • VarFromVal

        VarFromVal​(Val<T> underlying,
                   java.util.function.Consumer<T> setter)
    • Method Detail

      • getValue

        public T getValue()
        Specified by:
        getValue in interface javafx.beans.value.ObservableValue<T>
        Specified by:
        getValue in interface javafx.beans.value.WritableValue<T>
      • adaptObserver

        protected java.util.function.Consumer<? super T> adaptObserver​(java.util.function.Consumer<? super T> observer)
        Description copied from class: ProxyObservable
        Adapts the given observer to observer of the underlying Observable.

        Important: 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))`.

        Specified by:
        adaptObserver in class ProxyObservable<java.util.function.Consumer<? super T>,​java.util.function.Consumer<? super T>,​Val<T>>
        Parameters:
        observer - observer to be adapted for the underlying Observable
        Returns:
        observer adapted for the underlying Observable
      • bind

        public void bind​(javafx.beans.value.ObservableValue<? extends T> observable)
        Specified by:
        bind in interface javafx.beans.property.Property<T>
      • unbind

        public void unbind()
        Specified by:
        unbind in interface javafx.beans.property.Property<T>
      • isBound

        public boolean isBound()
        Specified by:
        isBound in interface javafx.beans.property.Property<T>
      • setValue

        public void setValue​(T value)
        Specified by:
        setValue in interface javafx.beans.value.WritableValue<T>