Interface Observable

All Superinterfaces:
Guardian, javafx.beans.Observable
All Known Subinterfaces:
Binding<T>, ObservableList<E>, ObservableValue<T>, Property<T>, SuspendableList<E>
All Known Implementing Classes:
BooleanBinding, BooleanPropertyBase, DoubleBinding, DoublePropertyBase, FloatBinding, FloatPropertyBase, IntegerBinding, IntegerPropertyBase, LongBinding, LongPropertyBase, ObjectBinding, ObjectPropertyBase, ObservableValueBase, ReadOnlyBooleanPropertyBase, ReadOnlyBooleanWrapper, ReadOnlyDoublePropertyBase, ReadOnlyDoubleWrapper, ReadOnlyFloatPropertyBase, ReadOnlyFloatWrapper, ReadOnlyIntegerPropertyBase, ReadOnlyIntegerWrapper, ReadOnlyLongPropertyBase, ReadOnlyLongWrapper, ReadOnlyObjectPropertyBase, ReadOnlyObjectWrapper, ReadOnlyStringPropertyBase, ReadOnlyStringWrapper, SimpleBooleanProperty, SimpleDoubleProperty, SimpleFloatProperty, SimpleIntegerProperty, SimpleLongProperty, SimpleObjectProperty, SimpleStringProperty, StringBinding, StringPropertyBase, SuspendableListWrapper

@Deprecated public interface Observable extends javafx.beans.Observable, Guardian
Deprecated.
Superseded by Suspendable.
  • Field Summary

    Fields inherited from interface org.reactfx.Guardian

    EMPTY
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Prevents invalidation and change events from being emitted, until the returned guard is released.
    default void
    Deprecated.
    Runs the given computation, making sure the invalidation and change events are blocked.
    default <T> T
    Deprecated.
    Runs the given computation, making sure the invalidation and change events are blocked.
    default Guard
    Deprecated.
    Equivalent to block().

    Methods inherited from interface org.reactfx.Guardian

    guardWhile, guardWhile

    Methods inherited from interface javafx.beans.Observable

    addListener, removeListener
  • Method Details

    • block

      Guard block()
      Deprecated.
      Prevents invalidation and change events from being emitted, until the returned guard is released.
      Returns:
      a Guard instance that can be released to resume the delivery of invalidation and change events. If this observable has been invalidated one or more times before the guard is released, a single notification is passed to invalidation and change listeners of this observable. The returned Guard is AutoCloseable, which makes it convenient to use in try-with-resources.
    • guard

      default Guard guard()
      Deprecated.
      Equivalent to block().
      Specified by:
      guard in interface Guardian
    • blockWhile

      default void blockWhile(Runnable r)
      Deprecated.
      Runs the given computation, making sure the invalidation and change events are blocked. When done, previous blocked state is restored.

      Equivalent to

       try(Guard g = block()) {
           r.run();
       }
       
    • blockWhile

      default <T> T blockWhile(Supplier<T> f)
      Deprecated.
      Runs the given computation, making sure the invalidation and change events are blocked. When done, previous blocked state is restored.
       T t = this.blockWhile(f);
       
      is equivalent to
       T t;
       try(Guard g = block()) {
           t = f.get();
       }