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
public interface IObservableValue<T> extends IObservable
A value whose changes can be tracked by value change listeners.- Since:
- 1.0
- See Also:
AbstractObservableValue
- 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addValueChangeListener(IValueChangeListener<? super T> listener)
T
getValue()
Returns the value.Object
getValueType()
The value type of this observable value, ornull
if this observable value is untyped.void
removeValueChangeListener(IValueChangeListener<? super T> listener)
void
setValue(T value)
Sets the value.-
Methods inherited from interface org.eclipse.core.databinding.observable.IObservable
addChangeListener, addDisposeListener, addStaleListener, dispose, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListener
-
-
-
-
Method Detail
-
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
void setValue(T value)
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
void addValueChangeListener(IValueChangeListener<? super T> listener)
- Parameters:
listener
- the change listener to add; notnull
-
removeValueChangeListener
void removeValueChangeListener(IValueChangeListener<? super T> listener)
- Parameters:
listener
- the change listener to remove; notnull
-
-