org.objectweb.jac.aspects.gui
Interface CollectionUpdate

All Known Implementing Classes:
CompactList, DiagramView, LessAbstractListModel, ObjectNode, RelationNode, TableModel

public interface CollectionUpdate

This interface defines callback methods used to notify that a collection was updated (that is, an object was added to it or removed from it).


Method Summary
 void onAdd(Object substance, CollectionItem collection, Object value, Object added, Object param)
          Upcalled when an item is added in a collection.
 void onChange(Object substance, CollectionItem collection, Object value, Object param)
          Upcalled when the collection is changed (with a set or other methods such as clear, removeAll, addAll, ...).
 void onRemove(Object substance, CollectionItem collection, Object value, Object removed, Object param)
          Upcalled when an item is removed from a collection.
 

Method Detail

onChange

public void onChange(Object substance,
                     CollectionItem collection,
                     Object value,
                     Object param)
Upcalled when the collection is changed (with a set or other methods such as clear, removeAll, addAll, ...).

Parameters:
substance - the object of which a field was updated
collection - the updated collection
value - the new collection
param - extra data
See Also:
ViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)

onAdd

public void onAdd(Object substance,
                  CollectionItem collection,
                  Object value,
                  Object added,
                  Object param)
Upcalled when an item is added in a collection.

Parameters:
substance - the object of which a collection was updated
collection - the updated collection
value - the collection's value
added - the value added to the collection
param - extra data (e.g. index)
See Also:
ViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)

onRemove

public void onRemove(Object substance,
                     CollectionItem collection,
                     Object value,
                     Object removed,
                     Object param)
Upcalled when an item is removed from a collection.

Parameters:
substance - the object of which a collection was updated
collection - the updated collection
value - the collection's value
removed - the removed item
param - extra data (e.g. index)
See Also:
ViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)