org.apache.pivot.collections
Class ListListener.Adapter<T>

java.lang.Object
  extended by org.apache.pivot.collections.ListListener.Adapter<T>
All Implemented Interfaces:
ListListener<T>
Enclosing interface:
ListListener<T>

public static class ListListener.Adapter<T>
extends Object
implements ListListener<T>

List listener adapter.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.ListListener
ListListener.Adapter<T>
 
Constructor Summary
ListListener.Adapter()
           
 
Method Summary
 void comparatorChanged(List<T> list, Comparator<T> previousComparator)
          Called when a list's comparator has changed.
 void itemInserted(List<T> list, int index)
          Called when an item has been inserted into a list.
 void itemsRemoved(List<T> list, int index, Sequence<T> items)
          Called when items have been removed from a list.
 void itemUpdated(List<T> list, int index, T previousItem)
          Called when a list item has been updated.
 void listCleared(List<T> list)
          Called when list data has been reset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListListener.Adapter

public ListListener.Adapter()
Method Detail

itemInserted

public void itemInserted(List<T> list,
                         int index)
Description copied from interface: ListListener
Called when an item has been inserted into a list.

Specified by:
itemInserted in interface ListListener<T>
Parameters:
list - The source of the list event.
index - The index at which the item was added.

itemsRemoved

public void itemsRemoved(List<T> list,
                         int index,
                         Sequence<T> items)
Description copied from interface: ListListener
Called when items have been removed from a list.

Specified by:
itemsRemoved in interface ListListener<T>
Parameters:
list - The source of the list event.
index - The starting index from which items have been removed.
items - The items that were removed from the list.

itemUpdated

public void itemUpdated(List<T> list,
                        int index,
                        T previousItem)
Description copied from interface: ListListener
Called when a list item has been updated.

Specified by:
itemUpdated in interface ListListener<T>
Parameters:
list - The source of the list event.
index - The index of the item that was updated.
previousItem - The item that was previously stored at index.

listCleared

public void listCleared(List<T> list)
Description copied from interface: ListListener
Called when list data has been reset.

Specified by:
listCleared in interface ListListener<T>
Parameters:
list - The source of the list event.

comparatorChanged

public void comparatorChanged(List<T> list,
                              Comparator<T> previousComparator)
Description copied from interface: ListListener
Called when a list's comparator has changed.

Specified by:
comparatorChanged in interface ListListener<T>
Parameters:
list - The source of the event.
previousComparator - The previous comparator value.