|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.value.AbstractObservableValue
org.eclipse.core.databinding.observable.value.WritableValue
public class WritableValue
Mutable (writable) implementation of IObservableValue that will maintain a value and fire
change events when the value changes.
This class is thread safe. All state accessing methods must be invoked from
the current realm. Methods for adding and removing
listeners may be invoked from any thread.
| Constructor Summary | |
|---|---|
WritableValue()
Constructs a new instance with the default realm, a null
value type, and a null value. |
|
WritableValue(java.lang.Object initialValue,
java.lang.Object valueType)
Constructs a new instance with the default realm. |
|
WritableValue(Realm realm)
Constructs a new instance with the provided realm, a
null value type, and a null initial value. |
|
WritableValue(Realm realm,
java.lang.Object initialValue,
java.lang.Object valueType)
Constructs a new instance. |
|
| Method Summary | |
|---|---|
protected void |
addListener(java.lang.Object listenerType,
IObservablesListener listener)
|
protected java.lang.Object |
clone()
|
java.lang.Object |
doGetValue()
|
void |
doSetValue(java.lang.Object value)
Template method for setting the value of the observable. |
protected void |
fireEvent(ObservableEvent event)
|
protected void |
firstListenerAdded()
|
Realm |
getRealm()
|
java.lang.Object |
getValueType()
The value type of this observable value, or null if this
observable value is untyped. |
protected boolean |
hasListeners()
|
protected void |
lastListenerRemoved()
|
protected void |
removeListener(java.lang.Object listenerType,
IObservablesListener listener)
|
static WritableValue |
withValueType(java.lang.Object elementType)
|
| Methods inherited from class org.eclipse.core.databinding.observable.value.AbstractObservableValue |
|---|
addValueChangeListener, fireChange, fireValueChange, getValue, isStale, removeValueChangeListener, setValue |
| Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable |
|---|
addChangeListener, addDisposeListener, addStaleListener, checkRealm, dispose, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.databinding.observable.IObservable |
|---|
addChangeListener, addDisposeListener, addStaleListener, dispose, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
| Constructor Detail |
|---|
public WritableValue()
null
value type, and a null value.
public WritableValue(java.lang.Object initialValue,
java.lang.Object valueType)
initialValue - can be nullvalueType - can be nullpublic WritableValue(Realm realm)
realm, a
null value type, and a null initial value.
realm -
public WritableValue(Realm realm,
java.lang.Object initialValue,
java.lang.Object valueType)
realm - initialValue - can be nullvalueType - can be null| Method Detail |
|---|
public java.lang.Object doGetValue()
doGetValue in class AbstractObservableValuepublic void doSetValue(java.lang.Object value)
AbstractObservableValueUnsupportedOperationException.
doSetValue in class AbstractObservableValuevalue - The value to set.public java.lang.Object getValueType()
IObservableValuenull if this
observable value is untyped.
nullpublic static WritableValue withValueType(java.lang.Object elementType)
elementType - can be null
null
protected void addListener(java.lang.Object listenerType,
IObservablesListener listener)
listenerType - listener -
protected void removeListener(java.lang.Object listenerType,
IObservablesListener listener)
listenerType - listener - protected boolean hasListeners()
protected void fireEvent(ObservableEvent event)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public Realm getRealm()
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.