Class ViewerValueProperty<S,T>

Type Parameters:
S - type of the source object
T - type of the value of the property
All Implemented Interfaces:
IProperty, IValueProperty<S,T>, IViewerValueProperty<S,T>

public abstract class ViewerValueProperty<S,T> extends SimpleValueProperty<S,T> implements IViewerValueProperty<S,T>
Abstract value property implementation for Viewer properties. This class implements some basic behavior that viewer properties are generally expected to have, namely:
  • Calling observe(Object) should create the observable on the display realm of the viewer's control, rather than the current default realm
  • All observe() methods should return an IViewerObservableValue
Since:
1.3
  • Constructor Details

    • ViewerValueProperty

      public ViewerValueProperty()
  • Method Details

    • observe

      public IObservableValue<T> observe(S source)
      Description copied from interface: IValueProperty
      Returns an observable value observing this value property on the given property source.
      Specified by:
      observe in interface IValueProperty<S,T>
      Specified by:
      observe in interface IViewerValueProperty<S,T>
      Overrides:
      observe in class ValueProperty<S,T>
      Parameters:
      source - the property source
      Returns:
      an observable value observing this value property on the given property source
    • observe

      public IObservableValue<T> observe(Realm realm, S source)
      Description copied from interface: IValueProperty
      Returns an observable value observing this value property on the given property source
      Specified by:
      observe in interface IValueProperty<S,T>
      Overrides:
      observe in class SimpleValueProperty<S,T>
      Parameters:
      realm - the observable's realm
      source - the property source
      Returns:
      an observable value observing this value property on the given property source
    • observe

      public IViewerObservableValue<T> observe(Viewer viewer)
      Description copied from interface: IViewerValueProperty
      Returns an IViewerObservableValue observing this value property on the given viewer
      Specified by:
      observe in interface IViewerValueProperty<S,T>
      Parameters:
      viewer - the source viewer
      Returns:
      an observable value observing this value property on the given viewer
    • observeDelayed

      public IViewerObservableValue<T> observeDelayed(int delay, Viewer viewer)
      Description copied from interface: IViewerValueProperty
      Returns an IViewerObservableValue observing this value property on the given viewer, which delays notification of value changes until at least delay milliseconds have elapsed since that last change event, or until a FocusOut event is received from the viewer's control (whichever happens first).

      This method is equivalent to ViewersObservables.observeDelayedValue(delay, observe(viewer)).

      Specified by:
      observeDelayed in interface IViewerValueProperty<S,T>
      Parameters:
      delay - the delay in milliseconds.
      viewer - the source viewer
      Returns:
      an observable value observing this value property on the given viewer, and which delays change notifications for delay milliseconds.