Class DelegatingValueProperty<S,T>
- java.lang.Object
-
- org.eclipse.core.databinding.property.value.ValueProperty<S,T>
-
- org.eclipse.core.databinding.property.value.DelegatingValueProperty<S,T>
-
- Type Parameters:
S
- type of the source objectT
- type of the value of the property
- All Implemented Interfaces:
IProperty
,IValueProperty<S,T>
public abstract class DelegatingValueProperty<S,T> extends ValueProperty<S,T>
- Since:
- 1.2
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelegatingValueProperty()
protected
DelegatingValueProperty(Object valueType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract IValueProperty<S,T>
doGetDelegate(S source)
Returns the property to delegate to for the specified source object.protected T
doGetValue(S source)
Returns the value of the property on the specified source objectprotected void
doSetValue(S source, T value)
Sets the source's value property to the specified vlaueIValueProperty<S,T>
getDelegate(S source)
Returns the property to delegate to for the specified source object.Object
getValueType()
Returns the value type of the property, ornull
if untyped.IObservableValue<T>
observe(Realm realm, S source)
Returns an observable value observing this value property on the given property sourceIObservableValue<T>
observe(S source)
Returns an observable value observing this value property on the given property source.<U extends S>
IObservableList<T>observeDetail(IObservableList<U> master)
Returns an observable list on the master observable's realm which tracks this property on each element ofmaster
.<K,V extends S>
IObservableMap<K,T>observeDetail(IObservableMap<K,V> 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.<U extends S>
IObservableMap<U,T>observeDetail(IObservableSet<U> 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.-
Methods inherited from class org.eclipse.core.databinding.property.value.ValueProperty
getValue, list, map, observeDetail, set, setValue, value, valueFactory, valueFactory
-
-
-
-
Constructor Detail
-
DelegatingValueProperty
protected DelegatingValueProperty()
-
DelegatingValueProperty
protected DelegatingValueProperty(Object valueType)
-
-
Method Detail
-
getDelegate
public final IValueProperty<S,T> getDelegate(S source)
Returns the property to delegate to for the specified source object. Repeated calls to this method with the same source object returns the same delegate instance.- Parameters:
source
- the property source (may be null)- Returns:
- the property to delegate to for the specified source object.
-
doGetDelegate
protected abstract IValueProperty<S,T> doGetDelegate(S source)
Returns the property to delegate to for the specified source object. Implementers must ensure that repeated calls to this method with the same source object returns the same delegate instance.- Parameters:
source
- the property source- Returns:
- the property to delegate to for the specified source object.
-
doGetValue
protected T doGetValue(S source)
Description copied from class:ValueProperty
Returns the value of the property on the specified source object- Overrides:
doGetValue
in classValueProperty<S,T>
- Parameters:
source
- the property source- Returns:
- the current value of the source's value property
-
doSetValue
protected void doSetValue(S source, T value)
Description copied from class:ValueProperty
Sets the source's value property to the specified vlaue- Overrides:
doSetValue
in classValueProperty<S,T>
- Parameters:
source
- the property sourcevalue
- the new value
-
getValueType
public Object getValueType()
Description copied from interface:IValueProperty
Returns the value type of the property, ornull
if untyped.- Returns:
- the value type of the property, or
null
if untyped.
-
observe
public IObservableValue<T> observe(S source)
Description copied from interface:IValueProperty
Returns an observable value observing this value property on the given property source.- Specified by:
observe
in interfaceIValueProperty<S,T>
- Overrides:
observe
in classValueProperty<S,T>
- Parameters:
source
- the property source- Returns:
- an observable value observing this value property on the given property source
-
observe
public IObservableValue<T> observe(Realm realm, S source)
Description copied from interface:IValueProperty
Returns an observable value observing this value property on the given property source- Parameters:
realm
- the observable's realmsource
- the property source- Returns:
- an observable value observing this value property on the given property source
-
observeDetail
public <U extends S> IObservableList<T> observeDetail(IObservableList<U> master)
Description copied from interface:IValueProperty
Returns an observable list on the master observable's realm which tracks this property on each element ofmaster
.- Specified by:
observeDetail
in interfaceIValueProperty<S,T>
- Overrides:
observeDetail
in classValueProperty<S,T>
- Parameters:
master
- the master observable- Returns:
- an observable list which tracks this property on each element of the master observable.
-
observeDetail
public <U extends S> IObservableMap<U,T> observeDetail(IObservableSet<U> master)
Description copied from interface:IValueProperty
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.- Specified by:
observeDetail
in interfaceIValueProperty<S,T>
- Overrides:
observeDetail
in classValueProperty<S,T>
- Parameters:
master
- the master observable- Returns:
- an observable map that tracks the current value of this property for the elements in the given set.
-
observeDetail
public <K,V extends S> IObservableMap<K,T> observeDetail(IObservableMap<K,V> master)
Description copied from interface:IValueProperty
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.- Specified by:
observeDetail
in interfaceIValueProperty<S,T>
- Overrides:
observeDetail
in classValueProperty<S,T>
- Parameters:
master
- the master observable- Returns:
- an observable map on the master observable's realm which tracks the current value of this property for the elements in the given map's values collection
-
-