Package org.apache.pivot.collections
Class List.ListListenerList<T>
- java.lang.Object
-
- org.apache.pivot.util.ListenerList<ListListener<T>>
-
- org.apache.pivot.collections.List.ListListenerList<T>
-
- All Implemented Interfaces:
java.lang.Iterable<ListListener<T>>
,ListListener<T>
public static class List.ListListenerList<T> extends ListenerList<ListListener<T>> implements ListListener<T>
List listener list.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pivot.collections.ListListener
ListListener.Adapter<T>
-
-
Constructor Summary
Constructors Constructor Description ListListenerList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
comparatorChanged(List<T> list, java.util.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 org.apache.pivot.util.ListenerList
add, add, contains, get, getLength, isEmpty, iterator, remove, toString
-
-
-
-
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 interfaceListListener<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 interfaceListListener<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 interfaceListListener<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 atindex
.
-
listCleared
public void listCleared(List<T> list)
Description copied from interface:ListListener
Called when list data has been reset.- Specified by:
listCleared
in interfaceListListener<T>
- Parameters:
list
- The source of the list event.
-
comparatorChanged
public void comparatorChanged(List<T> list, java.util.Comparator<T> previousComparator)
Description copied from interface:ListListener
Called when a list's comparator has changed.- Specified by:
comparatorChanged
in interfaceListListener<T>
- Parameters:
list
- The source of the event.previousComparator
- The previous comparator value.
-
-