|
Eclipse Platform Release 3.4 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
org.eclipse.core.databinding.observable.list.AbstractObservableList
org.eclipse.core.databinding.observable.list.ComputedList
A Lazily calculated list that automatically computes and registers listeners on its dependencies as long as all of its dependencies are IObservable objects
This class is thread safe. All state accessing methods must be invoked from
the current realm. Methods for adding and removing
listeners may be invoked from any thread.
| Field Summary |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
ComputedList()
Creates a computed list in the default realm and with an unknown (null) element type. |
|
ComputedList(Object elementType)
Creates a computed list in the default realm and with the given element type. |
|
ComputedList(Realm realm)
Creates a computed list in given realm and with an unknown (null) element type. |
|
ComputedList(Realm realm,
Object elementType)
Creates a computed list in the given realm and with the given element type. |
|
| Method Summary | |
void |
addChangeListener(IChangeListener listener)
Adds the given change listener to the list of change listeners. |
void |
addListChangeListener(IListChangeListener listener)
Adds the given list change listener to the list of list change listeners. |
protected abstract List |
calculate()
Subclasses must override this method to calculate the list contents. |
void |
dispose()
Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects. |
protected int |
doGetSize()
|
Object |
get(int index)
|
Object |
getElementType()
|
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to change soon. |
| Methods inherited from class org.eclipse.core.databinding.observable.list.AbstractObservableList |
add, addAll, addAll, addStaleListener, checkRealm, contains, containsAll, equals, fireChange, fireListChange, fireStale, firstListenerAdded, getRealm, hashCode, indexOf, isEmpty, iterator, lastIndexOf, lastListenerRemoved, move, remove, removeAll, removeChangeListener, removeListChangeListener, removeStaleListener, retainAll, size, toArray, toArray |
| Methods inherited from class java.util.AbstractList |
add, clear, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.databinding.observable.list.IObservableList |
listIterator, listIterator, remove, set, subList |
| Methods inherited from interface java.util.List |
add, clear |
| Constructor Detail |
public ComputedList()
public ComputedList(Object elementType)
elementType - the element type, may be null to indicate
unknown element typepublic ComputedList(Realm realm)
realm - the realm
public ComputedList(Realm realm,
Object elementType)
realm - the realmelementType - the element type, may be null to indicate
unknown element type| Method Detail |
protected int doGetSize()
doGetSize in class AbstractObservableListpublic Object get(int index)
protected abstract List calculate()
public boolean isStale()
IObservable
isStale in interface IObservableisStale in class AbstractObservableListpublic Object getElementType()
null if untypedpublic void addChangeListener(IChangeListener listener)
IObservable
addChangeListener in interface IObservableaddChangeListener in class AbstractObservableListpublic void addListChangeListener(IListChangeListener listener)
IObservableList
addListChangeListener in interface IObservableListaddListChangeListener in class AbstractObservableListpublic void dispose()
IObservable
dispose in interface IObservabledispose in class AbstractObservableList
|
Eclipse Platform Release 3.4 |
||||||||||
| 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.