T
- the type of value being observedpublic class DecoratingObservableValue<T> extends DecoratingObservable implements IObservableValue<T>
Constructor and Description |
---|
DecoratingObservableValue(IObservableValue<T> decorated,
boolean disposeDecoratedOnDispose)
Constructs a DecoratingObservableValue which decorates the given
observable.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addListener(Object listenerType,
IObservablesListener listener) |
void |
addValueChangeListener(IValueChangeListener<? super T> listener) |
protected Object |
clone() |
void |
dispose()
Disposes of this observable object, removing all listeners registered
with this object, and all listeners this object might have registered on
other objects.
|
protected void |
fireChange() |
protected void |
fireEvent(ObservableEvent event) |
protected void |
fireValueChange(ValueDiff<T> diff) |
protected void |
firstListenerAdded() |
Realm |
getRealm() |
T |
getValue()
Returns the value.
|
Object |
getValueType()
The value type of this observable value, or
null if this
observable value is untyped. |
protected void |
handleValueChange(ValueChangeEvent<? extends T> event)
Called whenever a ValueChangeEvent is received from the decorated
observable.
|
protected boolean |
hasListeners() |
protected void |
lastListenerRemoved() |
protected void |
removeListener(Object listenerType,
IObservablesListener listener) |
void |
removeValueChangeListener(IValueChangeListener<? super T> listener) |
void |
setValue(T value)
Sets the value.
|
equals, getDecorated, getterCalled, handleStaleEvent, hashCode, isStale
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListener
public DecoratingObservableValue(IObservableValue<T> decorated, boolean disposeDecoratedOnDispose)
decorated
- the observable value being decorateddisposeDecoratedOnDispose
- public void addValueChangeListener(IValueChangeListener<? super T> listener)
addValueChangeListener
in interface IObservableValue<T>
public void removeValueChangeListener(IValueChangeListener<? super T> listener)
removeValueChangeListener
in interface IObservableValue<T>
protected void fireChange()
fireChange
in class AbstractObservable
protected void firstListenerAdded()
firstListenerAdded
in class DecoratingObservable
protected void lastListenerRemoved()
lastListenerRemoved
in class DecoratingObservable
protected void handleValueChange(ValueChangeEvent<? extends T> event)
event
- the change event received from the decorated observablepublic T getValue()
IObservableValue
Realm
of the
observable.getValue
in interface IObservableValue<T>
public void setValue(T value)
IObservableValue
Realm
of the observable.setValue
in interface IObservableValue<T>
value
- the value to setpublic Object getValueType()
IObservableValue
null
if this
observable value is untyped.getValueType
in interface IObservableValue<T>
null
public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class DecoratingObservable
protected void addListener(Object listenerType, IObservablesListener listener)
listenerType
- listener
- protected void removeListener(Object listenerType, IObservablesListener listener)
listenerType
- listener
- protected boolean hasListeners()
protected void fireEvent(ObservableEvent event)
public Realm getRealm()
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.