|
Eclipse Platform Release 3.3 |
|||||||||
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
org.eclipse.core.databinding.observable.list.WritableList
public class WritableList
Mutable observable list backed by an ArrayList.
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 org.eclipse.core.databinding.observable.list.ObservableList |
---|
wrappedList |
Constructor Summary | |
---|---|
WritableList()
Creates an empty writable list in the default realm with a null element type. |
|
WritableList(java.util.List toWrap,
java.lang.Object elementType)
Construts a new instance with the default realm. |
|
WritableList(Realm realm)
Creates an empty writable list with a null element type. |
|
WritableList(Realm realm,
java.util.List toWrap,
java.lang.Object elementType)
Creates a writable list containing elements of the given type, wrapping an existing client-supplied list. |
Method Summary | |
---|---|
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object element)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
protected void |
addListener(java.lang.Object listenerType,
IObservablesListener listener)
|
void |
clear()
|
protected void |
fireEvent(ObservableEvent event)
|
protected void |
firstListenerAdded()
|
Realm |
getRealm()
|
protected boolean |
hasListeners()
|
protected void |
lastListenerRemoved()
|
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
protected void |
removeListener(java.lang.Object listenerType,
IObservablesListener listener)
|
boolean |
retainAll(java.util.Collection c)
|
java.lang.Object |
set(int index,
java.lang.Object element)
|
static WritableList |
withElementType(java.lang.Object elementType)
|
Methods inherited from class org.eclipse.core.databinding.observable.list.ObservableList |
---|
addListChangeListener, contains, containsAll, dispose, equals, fireChange, fireListChange, get, getElementType, getterCalled, hashCode, indexOf, isEmpty, isStale, iterator, lastIndexOf, listIterator, listIterator, removeListChangeListener, setStale, size, subList, toArray, toArray, toString, updateWrappedList |
Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable |
---|
addChangeListener, addStaleListener, checkRealm, fireStale, removeChangeListener, removeStaleListener |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.databinding.observable.IObservable |
---|
addChangeListener, addStaleListener, getRealm, removeChangeListener, removeStaleListener |
Constructor Detail |
---|
public WritableList()
null
element type.
public WritableList(Realm realm)
null
element type.
realm
- public WritableList(java.util.List toWrap, java.lang.Object elementType)
toWrap
- elementType
- can be null
public WritableList(Realm realm, java.util.List toWrap, java.lang.Object elementType)
realm
- toWrap
- The java.utilList to wrapelementType
- can be null
Method Detail |
---|
public java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
set
in interface IObservableList
set
in class ObservableList
public java.lang.Object remove(int index)
remove
in interface java.util.List
remove
in interface IObservableList
remove
in class ObservableList
public boolean add(java.lang.Object element)
add
in interface java.util.Collection
add
in interface java.util.List
add
in interface IObservableList
add
in class ObservableList
public void add(int index, java.lang.Object element)
add
in interface java.util.List
add
in class ObservableList
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
addAll
in interface IObservableList
addAll
in class ObservableList
public boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
addAll
in interface IObservableList
addAll
in class ObservableList
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.List
remove
in interface IObservableList
remove
in class ObservableList
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
removeAll
in interface IObservableList
removeAll
in class ObservableList
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
retainAll
in interface IObservableList
retainAll
in class ObservableList
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
clear
in class ObservableList
public static WritableList withElementType(java.lang.Object elementType)
elementType
- can be null
protected void addListener(java.lang.Object listenerType, IObservablesListener listener)
listenerType
- listener
- protected void removeListener(java.lang.Object listenerType, IObservablesListener listener)
listenerType
- listener
- protected boolean hasListeners()
protected void fireEvent(ObservableEvent event)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public Realm getRealm()
|
Eclipse Platform Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.