danger.util
Interface ActiveList.Delegate

All Known Subinterfaces:
ActiveFolder.Delegate
All Known Implementing Classes:
ActiveFolder.WeakDelegateList, ActiveList.WeakDelegateList, ActiveListView
Enclosing interface:
ActiveList


public static interface ActiveList.Delegate

Interface for delegates that get notified on changes to instances of ActiveList.


Method Summary
 void onItemAdded(ActiveList list, Object item, int index)
          This method is called whenever an item is added to an ActiveList instance.
 void onItemRemoved(ActiveList list, Object item, int index)
          This method is called whenever an individual item is removed from an ActiveList instance.
 void onItemsReordered(ActiveList list)
          This method is called whenever items get reordered in an ActiveList instance.
 void onItemUpdated(ActiveList list, Object item, int index)
          This method is called whenever an item is updated.
 void onRangeAdded(ActiveList list, Object[] items, int start)
          This method is called whenever a contiguous range of items is added to an ActiveList instance.
 void onRangeRemoved(ActiveList list, Object[] items, int start)
          This method is called whenever a range of items is removed from an ActiveList instance.
 

Method Detail

onItemUpdated

void onItemUpdated(ActiveList list,
                   Object item,
                   int index)
This method is called whenever an item is updated. That is, this is called when an item in an ActiveList instance notifies this instance that is was updated via its update mechanism.

Parameters:
list - non-null; the list which was notified
item - null-ok; the item that was updated
index - >= 0; the index that the item is at

onItemAdded

void onItemAdded(ActiveList list,
                 Object item,
                 int index)
This method is called whenever an item is added to an ActiveList instance.

Parameters:
list - non-null; the list which was modified
item - null-ok; the item that was added
index - >= 0; the index that the item was added (inserted) at

onRangeAdded

void onRangeAdded(ActiveList list,
                  Object[] items,
                  int start)
This method is called whenever a contiguous range of items is added to an ActiveList instance.

Parameters:
list - non-null; the list which was modified
items - non-null; array containing the items that were added
start - >= 0; the start index that the range was added (inserted) at

onItemRemoved

void onItemRemoved(ActiveList list,
                   Object item,
                   int index)
This method is called whenever an individual item is removed from an ActiveList instance. For example, StdActiveList.removeItem(java.lang.Object) or and StdActiveList.removeItemAt(int) are two concrete methods that remove individual items from an instance.

Parameters:
list - non-null; the list which was modified
item - null-ok; the item that was removed
index - >= 0; the index that the item was removed from

onRangeRemoved

void onRangeRemoved(ActiveList list,
                    Object[] items,
                    int start)
This method is called whenever a range of items is removed from an ActiveList instance. For example, StdActiveList.removeRange(int, int) and StdActiveList.removeAllItems() are two concrete methods that remove ranges of items from an instance.

Parameters:
list - non-null; the list which was modified
items - non-null; array containing the removed items
start - >= 0; the start index that the items were removed from

onItemsReordered

void onItemsReordered(ActiveList list)
This method is called whenever items get reordered in an ActiveList instance. For example, StdActiveList.sort(java.util.Comparator) is a concrete method that reorders the items of an instance.

Parameters:
list - non-null; the list which was modified