Interface IWidgetValueProperty<S extends Widget,T>

Type Parameters:
S - type of the source widget
T - type of the value of the property
All Superinterfaces:
IProperty, IValueProperty<S,T>
All Known Implementing Classes:
WidgetValueProperty

public interface IWidgetValueProperty<S extends Widget,T> extends IValueProperty<S,T>
IValueProperty for observing an SWT Widget
Since:
1.3
Restriction:
This interface is not intended to be implemented by clients.
  • Method Details

    • observe

      ISWTObservableValue<T> observe(S widget)
      Returns an ISWTObservableValue observing this value property on the given widget
      Specified by:
      observe in interface IValueProperty<S extends Widget,T>
      Parameters:
      widget - the source widget
      Returns:
      an observable value observing this value property on the given widget
    • observeDelayed

      ISWTObservableValue<T> observeDelayed(int delay, S widget)
      Returns an ISWTObservableValue observing this value property on the given widget, 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 widget (whichever happens first).

      This observable helps to boost performance in situations where an observable has computationally expensive listeners (e.g. changing filters in a viewer) or many dependencies (master fields with multiple detail fields). A common use of this observable is to delay validation of user input until the user stops typing in a UI field.

      To notify about pending changes, the returned observable fires a stale event when the wrapped observable value fires a change event, and remains stale until the delay has elapsed and the value change is fired. A call to IObservableValue.getValue() while a value change is pending will fire the value change immediately, short-circuiting the delay.

      Only updates resulting from the observed widget are delayed. Calls directly to IObservableValue.setValue(T) are not, and they cancel pending delayed values.

      Note that this observable will not forward ValueChangingEvent events from a wrapped IVetoableValue.

      This method is equivalent to SWTObservables.observeDelayedValue(delay, observe(widget)).

      Parameters:
      delay - the delay in milliseconds.
      widget - the source widget
      Returns:
      an observable value observing this value property on the given widget, and which delays change notifications for delay milliseconds.