Interface IObservableValue<T>
- Type Parameters:
T
- type of the value of the property
- All Superinterfaces:
IObservable
- All Known Subinterfaces:
ISWTObservableValue<T>
,IVetoableValue<T>
,IViewerObservableValue<T>
- All Known Implementing Classes:
AbstractObservableValue
,AbstractVetoableValue
,AggregateValidationStatus
,ComputedValue
,DateAndTimeObservableValue
,DecoratingObservableValue
,DecoratingVetoableValue
,DuplexingObservableValue
,LocalDateTimeObservableValue
,SelectObservableValue
,WritableValue
A value whose changes can be tracked by value change listeners.
- Since:
- 1.0
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
Clients should instead subclass one of the classes that
implement this interface.
Authors of extensions to the databinding framework may extend this interface and indirectly implement it, but if doing so must also extend one of the framework classes. (Use an API problem filter to suppress the resulting warning.)
Direct implementers of this interface outside of the framework will be broken in future releases when methods are added to this interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addValueChangeListener
(IValueChangeListener<? super T> listener) getValue()
Returns the value.The value type of this observable value, ornull
if this observable value is untyped.void
removeValueChangeListener
(IValueChangeListener<? super T> listener) void
Sets the value.Methods inherited from interface org.eclipse.core.databinding.observable.IObservable
addChangeListener, addDisposeListener, addStaleListener, dispose, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListener
-
Method Details
-
getValueType
Object getValueType()The value type of this observable value, ornull
if this observable value is untyped.- Returns:
- the value type, or
null
-
getValue
T getValue()Returns the value. Must be invoked in theRealm
of the observable.- Returns:
- the current value
- TrackedGetter
-
setValue
Sets the value. Must be invoked in theRealm
of the observable.- Parameters:
value
- the value to set- Throws:
UnsupportedOperationException
- if this observable value cannot be set.
-
addValueChangeListener
- Parameters:
listener
- the change listener to add; notnull
-
removeValueChangeListener
- Parameters:
listener
- the change listener to remove; notnull
-