|
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.list.ListProperty
org.eclipse.core.databinding.property.list.SimpleListProperty
public abstract class SimpleListProperty
Simplified abstract implementation of IListProperty. This class takes care of most of the functional requirements for an IListProperty implementation, leaving only the property-specific details to subclasses.
Subclasses must implement these methods:
IListProperty.getElementType()
doGetList(Object)
doSetList(Object, List, ListDiff)
adaptListener(ISimplePropertyListener)
In addition, we recommended overriding Object.toString()
to return a
description suitable for debugging purposes.
Constructor Summary | |
---|---|
SimpleListProperty()
|
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 List |
doGetList(Object source)
Returns a List with the current contents of the source's list property |
protected void |
doSetList(Object source,
List list)
Updates the property on the source with the specified change. |
protected abstract void |
doSetList(Object source,
List list,
ListDiff diff)
Updates the property on the source with the specified change. |
protected void |
doUpdateList(Object source,
ListDiff diff)
Updates the property on the source with the specified change |
IObservableList |
observe(Realm realm,
Object source)
Returns an observable list observing this list property on the given property source |
void |
setList(Object source,
List list,
ListDiff diff)
Updates the property on the source with the specified change. |
Methods inherited from class org.eclipse.core.databinding.property.list.ListProperty |
---|
getList, listFactory, listFactory, observe, observeDetail, setList, updateList, 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.list.IListProperty |
---|
getElementType |
Constructor Detail |
---|
public SimpleListProperty()
Method Detail |
---|
public IObservableList observe(Realm realm, Object source)
IListProperty
realm
- the observable's realmsource
- the property source
protected abstract List doGetList(Object source)
ListProperty
doGetList
in class ListProperty
source
- the property source
public final void setList(Object source, List list, ListDiff diff)
source
- the property sourcelist
- the new listdiff
- a diff describing the changeprotected abstract void doSetList(Object source, List list, ListDiff diff)
source
- the property sourcelist
- the new listdiff
- a diff describing the changeprotected void doSetList(Object source, List list)
ListProperty
doSetList
in class ListProperty
source
- the property sourcelist
- the new listprotected void doUpdateList(Object source, ListDiff diff)
ListProperty
doUpdateList
in class ListProperty
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.