|
Eclipse Platform Release 3.5 |
|||||||||
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 an unmodifiable Set with the current contents of the source's set property |
protected abstract void |
doSetSet(Object source,
Set set,
SetDiff diff)
Updates the property on the source with the specified change. |
Set |
getSet(Object source)
Returns a Set with the current contents of the source's set property |
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 |
---|
observe, observeDetail, setFactory, setFactory, 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
public final Set getSet(Object source)
source
- the property source
protected abstract Set doGetSet(Object source)
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 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.5 |
|||||||||
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, 2008. All rights reserved.