|
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.property.map.MapProperty
org.eclipse.core.databinding.property.map.SimpleMapProperty
public abstract class SimpleMapProperty
Simplified abstract implementation of IMapProperty. This class takes care of most of the functional requirements for an IMapProperty implementation, leaving only the property-specific details to subclasses.
Subclasses must implement these methods:
IMapProperty.getKeyType()
IMapProperty.getValueType()
doGetMap(Object)
doSetMap(Object, Map, MapDiff)
adaptListener(ISimplePropertyListener)
In addition, we recommended overriding Object.toString()
to return a
description suitable for debugging purposes.
Constructor Summary | |
---|---|
SimpleMapProperty()
|
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 Map |
doGetMap(Object source)
Returns a Map with the current contents of the source's map property |
protected void |
doSetMap(Object source,
Map map)
Updates the property on the source with the specified change. |
protected abstract void |
doSetMap(Object source,
Map map,
MapDiff diff)
Updates the property on the source with the specified change. |
protected void |
doUpdateMap(Object source,
MapDiff diff)
Updates the property on the source with the specified change. |
IObservableMap |
observe(Realm realm,
Object source)
Returns an observable map observing this map property on the given property source |
void |
setMap(Object source,
Map map,
MapDiff diff)
Updates the property on the source with the specified change. |
Methods inherited from class org.eclipse.core.databinding.property.map.MapProperty |
---|
getMap, mapFactory, mapFactory, observe, observeDetail, setMap, updateMap, values |
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.map.IMapProperty |
---|
getKeyType, getValueType |
Constructor Detail |
---|
public SimpleMapProperty()
Method Detail |
---|
public IObservableMap observe(Realm realm, Object source)
IMapProperty
realm
- the observable's realmsource
- the property source
protected abstract Map doGetMap(Object source)
MapProperty
doGetMap
in class MapProperty
source
- the property source
public final void setMap(Object source, Map map, MapDiff diff)
source
- the property sourcemap
- the new mapdiff
- a diff describing the changeprotected abstract void doSetMap(Object source, Map map, MapDiff diff)
source
- the property sourcemap
- the new mapdiff
- a diff describing the changeprotected void doSetMap(Object source, Map map)
MapProperty
doSetMap
in class MapProperty
source
- the property sourcemap
- the new mapprotected void doUpdateMap(Object source, MapDiff diff)
MapProperty
doUpdateMap
in class MapProperty
source
- the property sourcediff
- a diff describing the changepublic 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
|
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.