Class ObservableValuesListBinding<T,U>

java.lang.Object
javafx.beans.binding.ObjectExpression<U>
javafx.beans.binding.ObjectBinding<U>
com.dlsc.gemsfx.binding.ObservableValuesListBinding<T,U>
Type Parameters:
T - the type held by the ObservableValues in the source list
U - the type of the output value after applying the transformation function
All Implemented Interfaces:
javafx.beans.binding.Binding<U>, javafx.beans.Observable, javafx.beans.value.ObservableObjectValue<U>, javafx.beans.value.ObservableValue<U>

public class ObservableValuesListBinding<T,U> extends javafx.beans.binding.ObjectBinding<U>
This class binds to an ObservableList of ObservableValue objects and updates its value based on the current values of these ObservableValues. It reevaluates its value whenever any of the ObservableValues change. The computed value is determined by applying a transformation function to the list of current values.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ObservableValuesListBinding(javafx.collections.ObservableList<javafx.beans.value.ObservableValue<T>> source, Function<Stream<T>, U> transformer)
    Constructs a new ObservableValuesListBinding.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected U
     
    void
     

    Methods inherited from class javafx.beans.binding.ObjectBinding

    addListener, addListener, allowValidation, bind, get, getDependencies, invalidate, isObserved, isValid, onInvalidating, removeListener, removeListener, toString, unbind

    Methods inherited from class javafx.beans.binding.ObjectExpression

    asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpression

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.beans.Observable

    subscribe

    Methods inherited from interface javafx.beans.value.ObservableValue

    flatMap, getValue, map, orElse, subscribe, subscribe, when
  • Constructor Details

    • ObservableValuesListBinding

      public ObservableValuesListBinding(javafx.collections.ObservableList<javafx.beans.value.ObservableValue<T>> source, Function<Stream<T>, U> transformer)
      Constructs a new ObservableValuesListBinding.
      Parameters:
      source - the observable list of ObservableValue objects that is the source of the binding
      transformer - a function that transforms the list of current values into a computed value of type U
  • Method Details

    • computeValue

      protected U computeValue()
      Specified by:
      computeValue in class javafx.beans.binding.ObjectBinding<U>
    • dispose

      public void dispose()
      Specified by:
      dispose in interface javafx.beans.binding.Binding<T>
      Overrides:
      dispose in class javafx.beans.binding.ObjectBinding<U>