org.eclipse.emf.databinding
Class EObjectObservableList

java.lang.Object
  extended by org.eclipse.core.databinding.observable.AbstractObservable
      extended by org.eclipse.core.databinding.observable.list.ObservableList
          extended by org.eclipse.emf.databinding.EObjectObservableList
All Implemented Interfaces:
java.lang.Iterable, java.util.Collection, java.util.List, IObservable, IObservableCollection, IObserving, IObservableList
Direct Known Subclasses:
EditingDomainEObjectObservableList

public class EObjectObservableList
extends ObservableList
implements IObserving

PROVISIONAL: This API is subject to arbitrary change, including renaming or removal.


Field Summary
protected  EObject eObject
          The object owning the feature
protected  EStructuralFeature eStructuralFeature
          The structural feature
protected  Adapter listener
          The listener attached
 
Fields inherited from class org.eclipse.core.databinding.observable.list.ObservableList
wrappedList
 
Constructor Summary
EObjectObservableList(EObject eObject, EStructuralFeature eStructuralFeature)
          Observe a list feature using a default realm
EObjectObservableList(Realm realm, EObject eObject, EStructuralFeature eStructuralFeature)
          Observe a list feature using a custom realm
 
Method Summary
 void add(int index, java.lang.Object object)
           
 boolean add(java.lang.Object object)
           
 boolean addAll(java.util.Collection collection)
           
 boolean addAll(int index, java.util.Collection collection)
           
protected  void addListener(java.lang.Object arg0, IObservablesListener arg1)
           
 void clear()
           
protected  java.lang.Object clone()
           
 void dispose()
           
protected  void fireEvent(ObservableEvent arg0)
           
protected  void firstListenerAdded()
           
 java.lang.Object getObserved()
           
 Realm getRealm()
           
protected  boolean hasListeners()
           
protected  void lastListenerRemoved()
           
 java.lang.Object move(int newPosition, int oldPosition)
          Moves the object from the old position to the new position.
 void move(int newPosition, java.lang.Object object)
          Moves the object to the new position, if is in the list.
 java.lang.Object remove(int index)
           
 boolean remove(java.lang.Object element)
           
 boolean removeAll(java.util.Collection collection)
           
protected  void removeListener(java.lang.Object arg0, IObservablesListener arg1)
           
 boolean retainAll(java.util.Collection collection)
           
 java.lang.Object set(int index, java.lang.Object element)
           
 java.lang.String toString()
           
protected  java.util.List<java.lang.Object> wrappedList()
           
 
Methods inherited from class org.eclipse.core.databinding.observable.list.ObservableList
addListChangeListener, contains, containsAll, equals, fireChange, fireListChange, get, getElementType, getterCalled, hashCode, indexOf, isEmpty, isStale, iterator, lastIndexOf, listIterator, listIterator, removeListChangeListener, setStale, size, subList, toArray, toArray, updateWrappedList
 
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 java.util.List
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size, subList, toArray, toArray
 
Methods inherited from interface org.eclipse.core.databinding.observable.IObservable
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
 

Field Detail

eObject

protected EObject eObject
The object owning the feature


eStructuralFeature

protected EStructuralFeature eStructuralFeature
The structural feature


listener

protected Adapter listener
The listener attached

Constructor Detail

EObjectObservableList

public EObjectObservableList(EObject eObject,
                             EStructuralFeature eStructuralFeature)
Observe a list feature using a default realm

Parameters:
eObject - the object instance
eStructuralFeature - the feature

EObjectObservableList

public EObjectObservableList(Realm realm,
                             EObject eObject,
                             EStructuralFeature eStructuralFeature)
Observe a list feature using a custom realm

Parameters:
realm - the realm
eObject - the object instance
eStructuralFeature - the feature
Method Detail

firstListenerAdded

protected void firstListenerAdded()

lastListenerRemoved

protected void lastListenerRemoved()

dispose

public void dispose()
Specified by:
dispose in interface IObservable
Overrides:
dispose in class ObservableList

wrappedList

protected final java.util.List<java.lang.Object> wrappedList()
Returns:
the wrapped list

getObserved

public java.lang.Object getObserved()
Specified by:
getObserved in interface IObserving

add

public boolean add(java.lang.Object object)
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Specified by:
add in interface IObservableList
Overrides:
add in class ObservableList

add

public void add(int index,
                java.lang.Object object)
Specified by:
add in interface java.util.List
Overrides:
add in class ObservableList

addAll

public boolean addAll(java.util.Collection collection)
Specified by:
addAll in interface java.util.Collection
Specified by:
addAll in interface java.util.List
Specified by:
addAll in interface IObservableList
Overrides:
addAll in class ObservableList

addAll

public boolean addAll(int index,
                      java.util.Collection collection)
Specified by:
addAll in interface java.util.List
Specified by:
addAll in interface IObservableList
Overrides:
addAll in class ObservableList

set

public java.lang.Object set(int index,
                            java.lang.Object element)
Specified by:
set in interface java.util.List
Specified by:
set in interface IObservableList
Overrides:
set in class ObservableList

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List
Specified by:
remove in interface IObservableList
Overrides:
remove in class ObservableList

remove

public boolean remove(java.lang.Object element)
Specified by:
remove in interface java.util.Collection
Specified by:
remove in interface java.util.List
Specified by:
remove in interface IObservableList
Overrides:
remove in class ObservableList

removeAll

public boolean removeAll(java.util.Collection collection)
Specified by:
removeAll in interface java.util.Collection
Specified by:
removeAll in interface java.util.List
Specified by:
removeAll in interface IObservableList
Overrides:
removeAll in class ObservableList

retainAll

public boolean retainAll(java.util.Collection collection)
Specified by:
retainAll in interface java.util.Collection
Specified by:
retainAll in interface java.util.List
Specified by:
retainAll in interface IObservableList
Overrides:
retainAll in class ObservableList

clear

public void clear()
Specified by:
clear in interface java.util.Collection
Specified by:
clear in interface java.util.List
Overrides:
clear in class ObservableList

move

public java.lang.Object move(int newPosition,
                             int oldPosition)
Description copied from interface: EList
Moves the object from the old position to the new position.

Specified by:
move in interface IObservableList
Overrides:
move in class ObservableList
Parameters:
newPosition - the position of the object after the move.
oldPosition - the position of the object before the move.
Returns:
the moved object.

move

public void move(int newPosition,
                 java.lang.Object object)
Description copied from interface: EList
Moves the object to the new position, if is in the list.

Parameters:
newPosition - the position of the object after the move.
object - the object to move.

toString

public java.lang.String toString()
Overrides:
toString in class ObservableList

addListener

protected void addListener(java.lang.Object arg0,
                           IObservablesListener arg1)

removeListener

protected void removeListener(java.lang.Object arg0,
                              IObservablesListener arg1)

hasListeners

protected boolean hasListeners()

fireEvent

protected void fireEvent(ObservableEvent arg0)

getRealm

public Realm getRealm()

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.