Module ilusr.core

Class ObservableListBinder<T>

  • Type Parameters:
    T - The type of the bound @see ObservableList Provides a one way binding from a source @see ObservableList to a target @see ObservableList of the same type.
    All Implemented Interfaces:
    javafx.collections.ListChangeListener<T>

    public class ObservableListBinder<T>
    extends Object
    implements javafx.collections.ListChangeListener<T>
    Author:
    Jeff Riggle
    • Constructor Detail

      • ObservableListBinder

        public ObservableListBinder​(javafx.collections.ObservableList<T> source,
                                    javafx.collections.ObservableList<T> target)
        Parameters:
        source - The source @see ObservableList
        target - The target @see ObservableList
    • Method Detail

      • unbind

        public void unbind()
        Unbinds the lists so that the target list will no longer receive updates from the source list.
      • bindSourceToTarget

        public void bindSourceToTarget()
      • onChanged

        public void onChanged​(javafx.collections.ListChangeListener.Change<? extends T> c)
        Specified by:
        onChanged in interface javafx.collections.ListChangeListener<T>