|
Eclipse Platform Release 3.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.databinding.property.value.ValueProperty
org.eclipse.core.databinding.property.value.SimpleValueProperty
public abstract class SimpleValueProperty
Simplified abstract implementation of IValueProperty. This class takes care of most of the functional requirements for an IValueProperty implementation, leaving only the property-specific details to subclasses.
Subclasses must implement these methods:
IValueProperty.getValueType()
doGetValue(Object)
doSetValue(Object, Object)
adaptListener(ISimplePropertyListener)
In addition, we recommended overriding Object.toString()
to return a
description suitable for debugging purposes.
Constructor Summary | |
---|---|
SimpleValueProperty()
|
Method Summary | |
---|---|
abstract INativePropertyListener |
adaptListener(ISimplePropertyListener listener)
Returns a listener capable of adding or removing itself as a listener on a source object using the the source's "native" listener API. |
protected abstract Object |
doGetValue(Object source)
Returns the value of the property on the specified source object |
protected abstract void |
doSetValue(Object source,
Object value)
|
Object |
getValue(Object source)
Returns the value of the property on the specified source object |
IObservableValue |
observe(Realm realm,
Object source)
Returns an observable value observing this value property on the given property source |
IObservableList |
observeDetail(IObservableList master)
Returns an observable list on the master observable's realm which tracks this property on each element of master . |
IObservableMap |
observeDetail(IObservableMap master)
Returns an observable map on the master observable's realm where the map's key set is the same as the master observable map, and where each value is the property value of the corresponding value in the master observable map. |
IObservableMap |
observeDetail(IObservableSet master)
Returns an observable map on the master observable's realm where the map's key set is the specified master set, and where each key maps to the current property value for each element. |
void |
setValue(Object source,
Object value)
Sets the source's value property to the specified value |
Methods inherited from class org.eclipse.core.databinding.property.value.ValueProperty |
---|
list, map, observe, observeDetail, set, value, valueFactory, valueFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.core.databinding.property.value.IValueProperty |
---|
getValueType |
Constructor Detail |
---|
public SimpleValueProperty()
Method Detail |
---|
public final Object getValue(Object source)
source
- the property source (may be null)
protected abstract Object doGetValue(Object source)
source
- the property source
public final void setValue(Object source, Object value)
source
- the property sourcevalue
- the new valueprotected abstract void doSetValue(Object source, Object value)
public abstract INativePropertyListener adaptListener(ISimplePropertyListener listener)
This method returns null if the source object has no listener APIs for this property.
listener
- the property listener to receive events
public IObservableValue observe(Realm realm, Object source)
IValueProperty
realm
- the observable's realmsource
- the property source
public IObservableList observeDetail(IObservableList master)
IValueProperty
master
.
master
- the master observable
public IObservableMap observeDetail(IObservableSet master)
IValueProperty
master
- the master observable
public IObservableMap observeDetail(IObservableMap master)
IValueProperty
master
- the master observable
|
Eclipse Platform Release 3.5 |
|||||||||
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, 2008. All rights reserved.