S
- type of the source objectT
- type of the value of the propertypublic abstract class SimpleValueProperty<S,T> extends ValueProperty<S,T>
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 and Description |
---|
SimpleValueProperty() |
Modifier and Type | Method and Description |
---|---|
abstract INativePropertyListener<S> |
adaptListener(ISimplePropertyListener<S,ValueDiff<? extends T>> 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 T |
doGetValue(S source)
Returns the value of the property on the specified source object
|
protected abstract void |
doSetValue(S source,
T value)
Sets the source's value property to the specified vlaue
|
IObservableValue<T> |
observe(Realm realm,
S source)
Returns an observable value observing this value property on the given
property source
|
<U extends S> |
observeDetail(IObservableList<U> master)
Returns an observable list on the master observable's realm which tracks
this property on each element of
master . |
<K,V extends S> |
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> |
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.
|
getValue, list, map, observe, observeDetail, set, setValue, value, valueFactory, valueFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValueType
protected abstract T doGetValue(S source)
ValueProperty
doGetValue
in class ValueProperty<S,T>
source
- the property sourceprotected abstract void doSetValue(S source, T value)
ValueProperty
doSetValue
in class ValueProperty<S,T>
source
- the property sourcevalue
- the new valuepublic abstract INativePropertyListener<S> adaptListener(ISimplePropertyListener<S,ValueDiff<? extends T>> listener)
This method returns null if the source object has no listener APIs for this property.
listener
- the property listener to receive eventspublic IObservableValue<T> observe(Realm realm, S source)
IValueProperty
realm
- the observable's realmsource
- the property sourcepublic <U extends S> IObservableList<T> observeDetail(IObservableList<U> master)
IValueProperty
master
.observeDetail
in interface IValueProperty<S,T>
observeDetail
in class ValueProperty<S,T>
master
- the master observablepublic <U extends S> IObservableMap<U,T> observeDetail(IObservableSet<U> master)
IValueProperty
observeDetail
in interface IValueProperty<S,T>
observeDetail
in class ValueProperty<S,T>
master
- the master observablepublic <K,V extends S> IObservableMap<K,T> observeDetail(IObservableMap<K,V> master)
IValueProperty
observeDetail
in interface IValueProperty<S,T>
observeDetail
in class ValueProperty<S,T>
master
- the master observable
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.