Interface IWidgetValueProperty<S extends Widget,T>
- Type Parameters:
S
- type of the source widgetT
- type of the value of the property
- All Superinterfaces:
IProperty
,IValueProperty<S,
T>
- All Known Implementing Classes:
WidgetValueProperty
IValueProperty
for observing an SWT Widget- Since:
- 1.3
- Restriction:
- This interface is not intended to be implemented by clients.
-
Method Summary
Modifier and TypeMethodDescriptionReturns anISWTObservableValue
observing this value property on the given widgetobserveDelayed
(int delay, S widget) Returns anISWTObservableValue
observing this value property on the given widget, which delays notification of value changes until at leastdelay
milliseconds have elapsed since that last change event, or until a FocusOut event is received from the widget (whichever happens first).Methods inherited from interface org.eclipse.core.databinding.property.value.IValueProperty
getValue, getValueType, list, map, observe, observeDetail, observeDetail, observeDetail, observeDetail, set, setValue, value, valueFactory, valueFactory
-
Method Details
-
observe
Returns anISWTObservableValue
observing this value property on the given widget- Specified by:
observe
in interfaceIValueProperty<S extends Widget,
T> - Parameters:
widget
- the source widget- Returns:
- an observable value observing this value property on the given widget
-
observeDelayed
Returns anISWTObservableValue
observing this value property on the given widget, which delays notification of value changes until at leastdelay
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 wrappedIVetoableValue
.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.
-