|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList
org.eclipse.core.databinding.observable.list.AbstractObservableList
public abstract class AbstractObservableList
Subclasses should override at least get(int index) and size().
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 | |
|---|---|
AbstractObservableList()
|
|
AbstractObservableList(Realm realm)
|
|
| Method Summary | |
|---|---|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
void |
addChangeListener(IChangeListener listener)
Adds the given change listener to the list of change listeners. |
void |
addDisposeListener(IDisposeListener listener)
Adds the given dispose listener to the list of dispose listeners. |
void |
addListChangeListener(IListChangeListener listener)
Adds the given list change listener to the list of list change listeners. |
void |
addStaleListener(IStaleListener listener)
Adds the given stale listener to the list of stale listeners. |
protected void |
checkRealm()
Asserts that the realm is the current realm. |
boolean |
contains(Object o)
|
boolean |
containsAll(Collection c)
|
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 abstract int |
doGetSize()
|
boolean |
equals(Object o)
|
protected void |
fireChange()
Fires change event. |
protected void |
fireListChange(ListDiff diff)
|
protected void |
fireStale()
Fires stale event. |
protected void |
firstListenerAdded()
|
Realm |
getRealm()
Returns the realm for this observable. |
int |
hashCode()
|
protected boolean |
hasListeners()
Returns whether this observable list has any registered listeners. |
int |
indexOf(Object o)
|
boolean |
isDisposed()
Returns whether the observable has been disposed |
boolean |
isEmpty()
|
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to change soon. |
Iterator |
iterator()
|
int |
lastIndexOf(Object o)
|
protected void |
lastListenerRemoved()
|
Object |
move(int oldIndex,
int newIndex)
Moves the element located at oldIndex to
newIndex. |
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
void |
removeChangeListener(IChangeListener listener)
Removes the given change listener from the list of change listeners. |
void |
removeDisposeListener(IDisposeListener listener)
Removes the given dispose listener from the list of dispose listeners. |
void |
removeListChangeListener(IListChangeListener listener)
Removes the given list change listener from the list of list change listeners. |
void |
removeStaleListener(IStaleListener listener)
Removes the given stale listener from the list of stale listeners. |
boolean |
retainAll(Collection c)
|
int |
size()
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] a)
|
| Methods inherited from class java.util.AbstractList |
|---|
add, clear, get, 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 |
|---|
get, getElementType, listIterator, listIterator, remove, set, subList |
| Methods inherited from interface java.util.List |
|---|
add, clear |
| Constructor Detail |
|---|
public AbstractObservableList(Realm realm)
realm - public AbstractObservableList()
| Method Detail |
|---|
protected boolean hasListeners()
public boolean isStale()
IObservable
isStale in interface IObservablepublic void addListChangeListener(IListChangeListener listener)
IObservableList
addListChangeListener in interface IObservableListpublic void removeListChangeListener(IListChangeListener listener)
IObservableList
removeListChangeListener in interface IObservableListprotected void fireListChange(ListDiff diff)
public void addChangeListener(IChangeListener listener)
IObservable
addChangeListener in interface IObservablepublic void removeChangeListener(IChangeListener listener)
IObservable
removeChangeListener in interface IObservablepublic void addStaleListener(IStaleListener listener)
IObservable
addStaleListener in interface IObservableIObservable.isStale()public void removeStaleListener(IStaleListener listener)
IObservable
removeStaleListener in interface IObservablepublic void addDisposeListener(IDisposeListener listener)
IObservable
addDisposeListener in interface IObservablelistener - the listener to addpublic void removeDisposeListener(IDisposeListener listener)
IObservable
removeDisposeListener in interface IObservablelistener - the listener to removeprotected void fireChange()
protected void fireStale()
protected void firstListenerAdded()
protected void lastListenerRemoved()
public boolean isDisposed()
IObservable
isDisposed in interface IObservablepublic void dispose()
IObservable
dispose in interface IObservablepublic final int size()
size in interface Collectionsize in interface Listsize in interface IObservableListsize in class AbstractCollectionprotected abstract int doGetSize()
public boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface ListisEmpty in interface IObservableListisEmpty in class AbstractCollectionpublic boolean contains(Object o)
contains in interface Collectioncontains in interface Listcontains in interface IObservableListcontains in class AbstractCollectionpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Listiterator in interface IObservableListiterator in class AbstractListpublic Object[] toArray()
toArray in interface CollectiontoArray in interface ListtoArray in interface IObservableListtoArray in class AbstractCollectionpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface ListtoArray in interface IObservableListtoArray in class AbstractCollectionpublic boolean add(Object o)
add in interface Collectionadd in interface Listadd in interface IObservableListadd in class AbstractList
public Object move(int oldIndex,
int newIndex)
oldIndex to
newIndex. This method is equivalent to calling
add(newIndex, remove(oldIndex)).
Subclasses should override this method to deliver list change
notification for the remove and add operations in the same
ListChangeEvent, as this allows ListDiff.accept(ListDiffVisitor)
to recognize the operation as a move.
move in interface IObservableListoldIndex - the element's position before the move. Must be within the
range 0 <= oldIndex < size().newIndex - the element's position after the move. Must be within the
range 0 <= newIndex < size().
IndexOutOfBoundsException - if either argument is out of range (0 <= index < size()).ListDiffVisitor.handleMove(int, int, Object),
ListDiff.accept(ListDiffVisitor)public boolean remove(Object o)
remove in interface Collectionremove in interface Listremove in interface IObservableListremove in class AbstractCollectionpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface ListcontainsAll in interface IObservableListcontainsAll in class AbstractCollectionpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface ListaddAll in interface IObservableListaddAll in class AbstractCollection
public boolean addAll(int index,
Collection c)
addAll in interface ListaddAll in interface IObservableListaddAll in class AbstractListpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface ListremoveAll in interface IObservableListremoveAll in class AbstractCollectionpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface ListretainAll in interface IObservableListretainAll in class AbstractCollectionpublic boolean equals(Object o)
equals in interface Collectionequals in interface Listequals in interface IObservableListequals in class AbstractListpublic int hashCode()
hashCode in interface CollectionhashCode in interface ListhashCode in interface IObservableListhashCode in class AbstractListpublic int indexOf(Object o)
indexOf in interface ListindexOf in interface IObservableListindexOf in class AbstractListpublic int lastIndexOf(Object o)
lastIndexOf in interface ListlastIndexOf in interface IObservableListlastIndexOf in class AbstractListpublic Realm getRealm()
IObservableBecause observables can only be accessed from within one realm, and they always fire events on that realm, their state can be observed in an incremental way. It is always safe to call getters of an observable from within a change listener attached to that observable.
getRealm in interface IObservableprotected void checkRealm()
AssertionFailedException - if the realm is not the current realmRealm.isCurrent()
|
Eclipse Platform Release 3.7 |
|||||||||
| 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, 2011. All rights reserved.