LimeWire collection component api

org.limewire.collection.glazedlists
Class AbstractListEventListener<E>

java.lang.Object
  extended by org.limewire.collection.glazedlists.AbstractListEventListener<E>

public abstract class AbstractListEventListener<E>
extends java.lang.Object

An abstract ListEventListener for use with glazed lists when you really need the deleted object. Use this class sparingly, as it will cache the contents of the list.

To use, subclass AbstractListEventListener and install(EventList) it on the list you want to listen to.


Constructor Summary
AbstractListEventListener()
           
 
Method Summary
 void install(ca.odell.glazedlists.EventList<E> source)
          Adds this AbstractListEventListener as a listener on the source EventList.
protected abstract  void itemAdded(E item, int idx, ca.odell.glazedlists.EventList<E> source)
          Notification that an item was added.
protected abstract  void itemRemoved(E item, int idx, ca.odell.glazedlists.EventList<E> source)
          Notification that an item was removed.
protected abstract  void itemUpdated(E item, E priorItem, int idx, ca.odell.glazedlists.EventList<E> source)
          Notification that an item was replaced.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractListEventListener

public AbstractListEventListener()
Method Detail

install

public void install(ca.odell.glazedlists.EventList<E> source)
Adds this AbstractListEventListener as a listener on the source EventList. Installation this way is required in order to guarantee that the ListEventListener has a cache of the current contents of the list so it can call itemRemoved(Object, int, EventList) with the correct items.


itemAdded

protected abstract void itemAdded(E item,
                                  int idx,
                                  ca.odell.glazedlists.EventList<E> source)
Notification that an item was added.


itemRemoved

protected abstract void itemRemoved(E item,
                                    int idx,
                                    ca.odell.glazedlists.EventList<E> source)
Notification that an item was removed.


itemUpdated

protected abstract void itemUpdated(E item,
                                    E priorItem,
                                    int idx,
                                    ca.odell.glazedlists.EventList<E> source)
Notification that an item was replaced.


LimeWire collection component api

Copyright © 2009 Lime Wire LLC. All Rights Reserved.