Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.databinding.observable.list
Class DecoratingObservableList

java.lang.Object
  extended by 

org.eclipse.core.databinding.observable.AbstractObservable
      extended by 

org.eclipse.core.databinding.observable.DecoratingObservable
          extended by 

org.eclipse.core.databinding.observable.DecoratingObservableCollection
              extended by 
org.eclipse.core.databinding.observable.list.DecoratingObservableList
All Implemented Interfaces:
Iterable, Collection, List, IDecoratingObservable, IObservable, IObservableCollection, IObservableList

public class DecoratingObservableList
extends DecoratingObservableCollection
implements IObservableList

An observable list which decorates another observable list.

Since:
1.2

Constructor Summary
DecoratingObservableList ( IObservableList decorated, boolean disposeDecoratedOnDispose)
          Constructs a DecoratingObservableList which decorates the given observable.
 
Method Summary
 void add (int index, Object o)
           
 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)
           
protected   Object clone ()
           
 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  void fireChange ()
           
protected  void fireEvent ( ObservableEvent event)
           
protected  void fireListChange ( ListDiff diff)
           
protected  void firstListenerAdded ()
           
  Object get (int index)
           
  Realm getRealm ()
           
protected  void handleListChange ( ListChangeEvent event)
          Called whenever a ListChangeEvent is received from the decorated observable.
protected  boolean hasListeners ()
           
 int indexOf ( Object o)
           
 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)
           
 void removeListChangeListener ( IListChangeListener listener)
          Removes the given list change listener from the list of list change listeners.
protected  void removeListener ( Object listenerType, IObservablesListener listener)
           
  Object set (int index, Object element)
           
  List subList (int fromIndex, int toIndex)
           
 
Methods inherited from class org.eclipse.core.databinding.observable. DecoratingObservableCollection
add, addAll, clear, contains, containsAll, equals, getElementType, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class org.eclipse.core.databinding.observable. DecoratingObservable
getDecorated, getterCalled, handleStaleEvent, isStale
 
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.list. IObservableList
add, addAll, contains, containsAll, equals, getElementType, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util. List
clear
 
Methods inherited from interface org.eclipse.core.databinding.observable. IObservable
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListener
 

Constructor Detail

DecoratingObservableList

public DecoratingObservableList(
IObservableList decorated,
                                boolean disposeDecoratedOnDispose)
Constructs a DecoratingObservableList which decorates the given observable.

Parameters:
decorated - the observable list being decorated
disposeDecoratedOnDispose -
Method Detail

addListChangeListener

public void addListChangeListener(
IListChangeListener listener)
Description copied from interface: IObservableList
Adds the given list change listener to the list of list change listeners.

Specified by:
addListChangeListener in interface IObservableList

removeListChangeListener

public void removeListChangeListener(
IListChangeListener listener)
Description copied from interface: IObservableList
Removes the given list change listener from the list of list change listeners. Has no effect if the given listener is not registered as a list change listener.

Specified by:
removeListChangeListener in interface IObservableList

fireListChange

protected void fireListChange(
ListDiff diff)

fireChange

protected void fireChange()
Overrides:
fireChange in class AbstractObservable

firstListenerAdded

protected void firstListenerAdded()
Overrides:
firstListenerAdded in class DecoratingObservable

lastListenerRemoved

protected void lastListenerRemoved()
Overrides:
lastListenerRemoved in class DecoratingObservable

handleListChange

protected void handleListChange(
ListChangeEvent event)
Called whenever a ListChangeEvent is received from the decorated observable. By default, this method fires the list change event again, with the decorating observable as the event source. Subclasses may override to provide different behavior.

Parameters:
event - the change event received from the decorated observable

add

public void add(int index,
                
Object o)
Specified by:
add in interface List

addAll

public boolean addAll(int index,
                      
Collection c)
Specified by:
addAll in interface List
Specified by:
addAll in interface IObservableList

get

public 
Object get(int index)
Specified by:
get in interface List
Specified by:
get in interface IObservableList

indexOf

public int indexOf(
Object o)
Specified by:
indexOf in interface List
Specified by:
indexOf in interface IObservableList

lastIndexOf

public int lastIndexOf(
Object o)
Specified by:
lastIndexOf in interface List
Specified by:
lastIndexOf in interface IObservableList

listIterator

public 
ListIterator listIterator()
Specified by:
listIterator in interface List
Specified by:
listIterator in interface IObservableList

listIterator

public 
ListIterator listIterator(int index)
Specified by:
listIterator in interface List
Specified by:
listIterator in interface IObservableList

move

public 
Object move(int oldIndex,
                   int newIndex)
Description copied from interface: IObservableList
Moves the element located at oldIndex to newIndex. This method is equivalent to calling add(newIndex, remove(oldIndex)).

Implementors should 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.

Specified by:
move in interface IObservableList
Parameters:
oldIndex - 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().
Returns:
the element that was moved.
See Also:
ListDiffVisitor.handleMove(int, int, Object), ListDiff.accept(ListDiffVisitor)

remove

public 
Object remove(int index)
Specified by:
remove in interface List
Specified by:
remove in interface IObservableList

set

public 
Object set(int index,
                  
Object element)
Specified by:
set in interface List
Specified by:
set in interface IObservableList

subList

public 
List subList(int fromIndex,
                    int toIndex)
Specified by:
subList in interface List
Specified by:
subList in interface IObservableList

dispose

public void dispose()
Description copied from interface: IObservable
Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects.

Specified by:
dispose in interface IObservable
Overrides:
dispose in class DecoratingObservableCollection

addListener

protected void addListener(
Object listenerType,
                           
IObservablesListener listener)
Parameters:
listenerType -
listener -

removeListener

protected void removeListener(
Object listenerType,
                              
IObservablesListener listener)
Parameters:
listenerType -
listener -

hasListeners

protected boolean hasListeners()

fireEvent

protected void fireEvent(
ObservableEvent event)

getRealm

public 
Realm getRealm()
Returns:
Returns the realm.

clone

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

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire