|
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.set.SetProperty
org.eclipse.core.databinding.property.set.SimpleSetProperty
public abstract class SimpleSetProperty
Simplified abstract implementation of ISetProperty. This class takes care of most of the functional requirements for an ISetProperty implementation, leaving only the property-specific details to subclasses.
Subclasses must implement these methods:
ISetProperty.getElementType()
doGetSet(Object)
doSetSet(Object, Set, SetDiff)
adaptListener(ISimplePropertyListener)
In addition, we recommended overriding Object.toString()
to return a
description suitable for debugging purposes.
Constructor Summary | |
---|---|
SimpleSetProperty()
|
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 Set |
doGetSet(Object source)
Returns a Set with the current contents of the source's set property |
protected void |
doSetSet(Object source,
Set set)
Updates the property on the source with the specified change. |
protected abstract void |
doSetSet(Object source,
Set set,
SetDiff diff)
Updates the property on the source with the specified change. |
protected void |
doUpdateSet(Object source,
SetDiff diff)
Updates the property on the source with the specified change. |
IObservableSet |
observe(Realm realm,
Object source)
Returns an observable set observing this set property on the given property source |
void |
setSet(Object source,
Set set,
SetDiff diff)
Updates the property on the source with the specified change. |
Methods inherited from class org.eclipse.core.databinding.property.set.SetProperty |
---|
getSet, observe, observeDetail, setFactory, setFactory, setSet, updateSet, 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.set.ISetProperty |
---|
getElementType |
Constructor Detail |
---|
public SimpleSetProperty()
Method Detail |
---|
public IObservableSet observe(Realm realm, Object source)
ISetProperty
realm
- the observable's realmsource
- the property source
protected abstract Set doGetSet(Object source)
SetProperty
doGetSet
in class SetProperty
source
- the property source
public final void setSet(Object source, Set set, SetDiff diff)
source
- the property sourceset
- the new setdiff
- a diff describing the changeprotected abstract void doSetSet(Object source, Set set, SetDiff diff)
source
- the property sourceset
- the new setdiff
- a diff describing the changeprotected void doSetSet(Object source, Set set)
SetProperty
doSetSet
in class SetProperty
source
- the property sourceset
- the new setprotected void doUpdateSet(Object source, SetDiff diff)
SetProperty
doUpdateSet
in class SetProperty
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.