public abstract class SimpleValueProperty extends ValueProperty
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 |
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)
Sets the source's value property to the specified vlaue
|
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.
|
getValue, list, map, observe, observeDetail, set, setValue, value, valueFactory, valueFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValueType
protected abstract Object doGetValue(Object source)
ValueProperty
doGetValue
in class ValueProperty
source
- the property sourceprotected abstract void doSetValue(Object source, Object value)
ValueProperty
doSetValue
in class ValueProperty
source
- the property sourcevalue
- the new valuepublic 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 eventspublic IObservableValue observe(Realm realm, Object source)
IValueProperty
realm
- the observable's realmsource
- the property sourcepublic IObservableList observeDetail(IObservableList master)
IValueProperty
master
.observeDetail
in interface IValueProperty
observeDetail
in class ValueProperty
master
- the master observablepublic IObservableMap observeDetail(IObservableSet master)
IValueProperty
observeDetail
in interface IValueProperty
observeDetail
in class ValueProperty
master
- the master observablepublic IObservableMap observeDetail(IObservableMap master)
IValueProperty
observeDetail
in interface IValueProperty
observeDetail
in class ValueProperty
master
- the master observable
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.