public abstract class DuplexingObservableValue extends AbstractObservableValue
| Constructor and Description |
|---|
DuplexingObservableValue(IObservableList target) |
DuplexingObservableValue(IObservableList target,
Object valueType) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(IChangeListener listener)
Adds the given change listener to the list of change listeners.
|
protected void |
addListener(Object listenerType,
IObservablesListener listener) |
void |
addValueChangeListener(IValueChangeListener listener) |
protected Object |
clone() |
protected abstract Object |
coalesceElements(Collection elements) |
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 Object |
doGetValue() |
protected void |
doSetValue(Object value)
Template method for setting the value of the observable.
|
protected void |
fireEvent(ObservableEvent event) |
protected void |
firstListenerAdded() |
Realm |
getRealm() |
Object |
getValueType()
The value type of this observable value, or
null if this
observable value is untyped. |
protected boolean |
hasListeners() |
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to
change soon.
|
protected void |
lastListenerRemoved() |
protected void |
makeDirty() |
protected void |
removeListener(Object listenerType,
IObservablesListener listener) |
static DuplexingObservableValue |
withDefaults(IObservableList target,
Object emptyValue,
Object multiValue)
Returns a DuplexingObservableValue implementation with predefined values
to use if the list is empty or contains multiple different values.
|
fireChange, fireValueChange, getValue, removeValueChangeListener, setValueaddDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListenerequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListenerpublic DuplexingObservableValue(IObservableList target)
target - public DuplexingObservableValue(IObservableList target, Object valueType)
target - valueType - public static DuplexingObservableValue withDefaults(IObservableList target, Object emptyValue, Object multiValue)
target - the observable listemptyValue - the value to use when the target list is emptymultiValue - the value to use when the target list contains multiple values
that are not equivalent to eachother.protected void firstListenerAdded()
protected void lastListenerRemoved()
protected final void makeDirty()
public boolean isStale()
IObservableisStale in interface IObservableisStale in class AbstractObservableValueprotected Object doGetValue()
doGetValue in class AbstractObservableValueprotected abstract Object coalesceElements(Collection elements)
protected void doSetValue(Object value)
AbstractObservableValueUnsupportedOperationException.doSetValue in class AbstractObservableValuepublic Object getValueType()
IObservableValuenull if this
observable value is untyped.nullpublic void addChangeListener(IChangeListener listener)
IObservableaddChangeListener in interface IObservableaddChangeListener in class AbstractObservablepublic void addValueChangeListener(IValueChangeListener listener)
addValueChangeListener in interface IObservableValueaddValueChangeListener in class AbstractObservableValuepublic void dispose()
IObservabledispose in interface IObservabledispose in class AbstractObservableprotected 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 ObjectCloneNotSupportedException
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.