|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.list.ObservableList
public abstract class ObservableList
Abstract implementation of IObservableList, based on an underlying
regular list.
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 | |
|---|---|
protected List |
wrappedList
|
| Constructor Summary | |
|---|---|
protected |
ObservableList(List wrappedList,
Object elementType)
|
protected |
ObservableList(Realm realm,
List wrappedList,
Object elementType)
|
| Method Summary | |
|---|---|
void |
add(int index,
Object element)
|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
void |
addListChangeListener(IListChangeListener listener)
Adds the given list change listener to the list of list change listeners. |
protected void |
addListener(Object listenerType,
IObservablesListener listener)
|
void |
clear()
|
protected Object |
clone()
|
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. |
boolean |
equals(Object o)
|
protected void |
fireChange()
|
protected void |
fireEvent(ObservableEvent event)
|
protected void |
fireListChange(ListDiff diff)
|
protected void |
firstListenerAdded()
|
Object |
get(int index)
|
Object |
getElementType()
Returns the element type of this observable collection, or null if this observable collection is untyped. |
Realm |
getRealm()
|
protected void |
getterCalled()
|
int |
hashCode()
|
protected boolean |
hasListeners()
|
int |
indexOf(Object o)
|
boolean |
isEmpty()
|
boolean |
isStale()
Returns the stale state. |
Iterator |
iterator()
|
int |
lastIndexOf(Object o)
|
protected void |
lastListenerRemoved()
|
ListIterator |
listIterator()
|
ListIterator |
listIterator(int index)
|
Object |
move(int oldIndex,
int newIndex)
Moves the element located at oldIndex to
newIndex. |
Object |
remove(int index)
|
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
void |
removeListChangeListener(IListChangeListener listener)
Removes the given list change listener from the list of list change listeners. |
protected void |
removeListener(Object listenerType,
IObservablesListener listener)
|
boolean |
retainAll(Collection c)
|
Object |
set(int index,
Object element)
|
void |
setStale(boolean stale)
Sets the stale state. |
int |
size()
|
List |
subList(int fromIndex,
int toIndex)
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] a)
|
String |
toString()
|
protected void |
updateWrappedList(List newList)
|
| Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable |
|---|
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.databinding.observable.IObservable |
|---|
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
| Field Detail |
|---|
protected List wrappedList
| Constructor Detail |
|---|
protected ObservableList(List wrappedList,
Object elementType)
protected ObservableList(Realm realm,
List wrappedList,
Object elementType)
| Method Detail |
|---|
public void addListChangeListener(IListChangeListener listener)
IObservableList
addListChangeListener in interface IObservableListpublic void removeListChangeListener(IListChangeListener listener)
IObservableList
removeListChangeListener in interface IObservableListprotected void fireListChange(ListDiff diff)
public boolean contains(Object o)
contains in interface Collectioncontains in interface Listcontains in interface IObservableListpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface ListcontainsAll in interface IObservableListpublic boolean equals(Object o)
equals in interface Collectionequals in interface Listequals in interface IObservableListequals in class Objectpublic int hashCode()
hashCode in interface CollectionhashCode in interface ListhashCode in interface IObservableListhashCode in class Objectpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface ListisEmpty in interface IObservableListpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Listiterator in interface IObservableListpublic int size()
size in interface Collectionsize in interface Listsize in interface IObservableListpublic Object[] toArray()
toArray in interface CollectiontoArray in interface ListtoArray in interface IObservableListpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface ListtoArray in interface IObservableListpublic String toString()
toString in class Objectpublic Object get(int index)
get in interface Listget in interface IObservableListpublic int indexOf(Object o)
indexOf in interface ListindexOf in interface IObservableListpublic int lastIndexOf(Object o)
lastIndexOf in interface ListlastIndexOf in interface IObservableListpublic ListIterator listIterator()
listIterator in interface ListlistIterator in interface IObservableListpublic ListIterator listIterator(int index)
listIterator in interface ListlistIterator in interface IObservableList
public List subList(int fromIndex,
int toIndex)
subList in interface ListsubList in interface IObservableListprotected void getterCalled()
public Object set(int index,
Object element)
set in interface Listset in interface IObservableList
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 Object remove(int index)
remove in interface Listremove in interface IObservableListpublic boolean add(Object o)
add in interface Collectionadd in interface Listadd in interface IObservableList
public void add(int index,
Object element)
add in interface Listpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface ListaddAll in interface IObservableList
public boolean addAll(int index,
Collection c)
addAll in interface ListaddAll in interface IObservableListpublic boolean remove(Object o)
remove in interface Collectionremove in interface Listremove in interface IObservableListpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface ListremoveAll in interface IObservableListpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface ListretainAll in interface IObservableListpublic void clear()
clear in interface Collectionclear in interface Listpublic boolean isStale()
isStale in interface IObservablepublic void setStale(boolean stale)
stale - The stale state to list. This will fire a stale event if the
given boolean is true and this observable list was not already
stale.protected void fireChange()
fireChange in class AbstractObservablepublic void dispose()
IObservable
dispose in interface IObservabledispose in class AbstractObservablepublic Object getElementType()
IObservableCollectionnull if this observable collection is untyped.
getElementType in interface IObservableCollectiongetElementType in interface IObservableListnull if this observable collection is untyped.protected void updateWrappedList(List newList)
protected void addListener(Object listenerType,
IObservablesListener listener)
listenerType - listener -
protected void removeListener(Object listenerType,
IObservablesListener listener)
listenerType - listener - protected boolean hasListeners()
protected void fireEvent(ObservableEvent event)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public Realm getRealm()
protected Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
|
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.