org.eclipse.jpt.utility.model.listener
Class SimpleChangeListener

java.lang.Object
  extended by org.eclipse.jpt.utility.model.listener.SimpleChangeListener
All Implemented Interfaces:
java.util.EventListener, ChangeListener, CollectionChangeListener, ListChangeListener, PropertyChangeListener, StateChangeListener, TreeChangeListener
Direct Known Subclasses:
CommandChangeListener

public abstract class SimpleChangeListener
extends java.lang.Object
implements ChangeListener

Convenience abstract implementation of ChangeListener. All change notifications are funneled through a single method. This class can be used by subclassing it and overriding either modelChanged(ChangeEvent) (if access to the event is required) or modelChanged() (if access to the event is not required).

Provisional API: This class is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Constructor Summary
SimpleChangeListener()
           
 
Method Summary
 void collectionChanged(CollectionChangeEvent event)
          This method gets called when a bound collection is changed in a manner that is not easily characterized by the other methods in this interface.
 void collectionCleared(CollectionClearEvent event)
          This method gets called when a bound collection is cleared.
 void itemsAdded(CollectionAddEvent event)
          This method gets called when items are added to a bound collection.
 void itemsAdded(ListAddEvent event)
          This method gets called when items are added to a bound list.
 void itemsMoved(ListMoveEvent event)
          This method gets called when items in a bound list are moved.
 void itemsRemoved(CollectionRemoveEvent event)
          This method gets called when items are removed from a bound collection.
 void itemsRemoved(ListRemoveEvent event)
          This method gets called when items are removed from a bound list.
 void itemsReplaced(ListReplaceEvent event)
          This method gets called when items in a bound list are replaced.
 void listChanged(ListChangeEvent event)
          This method gets called when a bound list is changed in a manner that is not easily characterized by the other methods in this interface.
 void listCleared(ListClearEvent event)
          This method gets called when a bound list is cleared.
 void nodeAdded(TreeAddEvent event)
          This method gets called when a node is added to a bound tree.
 void nodeRemoved(TreeRemoveEvent event)
          This method gets called when a node is removed from a bound tree.
 void propertyChanged(PropertyChangeEvent event)
          This method gets called when a model has changed a bound property.
 void stateChanged(StateChangeEvent event)
          This method gets called when a model has changed in some general fashion.
 void treeChanged(TreeChangeEvent event)
          This method gets called when a portion of a bound tree is changed in a manner that is not easily characterized by the other methods in this interface.
 void treeCleared(TreeClearEvent event)
          This method gets called when a bound tree is cleared.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleChangeListener

public SimpleChangeListener()
Method Detail

stateChanged

public void stateChanged(StateChangeEvent event)
Description copied from interface: StateChangeListener
This method gets called when a model has changed in some general fashion.

Specified by:
stateChanged in interface StateChangeListener
Parameters:
event - An event describing the event source.

propertyChanged

public void propertyChanged(PropertyChangeEvent event)
Description copied from interface: PropertyChangeListener
This method gets called when a model has changed a bound property.

Specified by:
propertyChanged in interface PropertyChangeListener
Parameters:
event - An event describing the event source and the property's old and new values.

collectionChanged

public void collectionChanged(CollectionChangeEvent event)
Description copied from interface: CollectionChangeListener
This method gets called when a bound collection is changed in a manner that is not easily characterized by the other methods in this interface.

Specified by:
collectionChanged in interface CollectionChangeListener
Parameters:
event - An event describing the event source and the collection that changed.

collectionCleared

public void collectionCleared(CollectionClearEvent event)
Description copied from interface: CollectionChangeListener
This method gets called when a bound collection is cleared.

Specified by:
collectionCleared in interface CollectionChangeListener
Parameters:
event - An event describing the event source and the collection that changed.

itemsAdded

public void itemsAdded(CollectionAddEvent event)
Description copied from interface: CollectionChangeListener
This method gets called when items are added to a bound collection.

Specified by:
itemsAdded in interface CollectionChangeListener
Parameters:
event - An event describing the event source, the collection that changed, and the items that were added.

itemsRemoved

public void itemsRemoved(CollectionRemoveEvent event)
Description copied from interface: CollectionChangeListener
This method gets called when items are removed from a bound collection.

Specified by:
itemsRemoved in interface CollectionChangeListener
Parameters:
event - An event describing the event source, the collection that changed, and the items that were removed.

itemsAdded

public void itemsAdded(ListAddEvent event)
Description copied from interface: ListChangeListener
This method gets called when items are added to a bound list.

Specified by:
itemsAdded in interface ListChangeListener
Parameters:
event - An event describing the event source, the list that changed, the items that were added, and the index at which the items were added.

itemsMoved

public void itemsMoved(ListMoveEvent event)
Description copied from interface: ListChangeListener
This method gets called when items in a bound list are moved.

Specified by:
itemsMoved in interface ListChangeListener
Parameters:
event - An event describing the event source, the list that changed, and the indices of where items were moved from and to.

itemsRemoved

public void itemsRemoved(ListRemoveEvent event)
Description copied from interface: ListChangeListener
This method gets called when items are removed from a bound list.

Specified by:
itemsRemoved in interface ListChangeListener
Parameters:
event - An event describing the event source, the list that changed, the items that were removed, and the index at which the items were removed.

itemsReplaced

public void itemsReplaced(ListReplaceEvent event)
Description copied from interface: ListChangeListener
This method gets called when items in a bound list are replaced.

Specified by:
itemsReplaced in interface ListChangeListener
Parameters:
event - An event describing the event source, the list that changed, the items that were added, the items that were replaced, and the index at which the items were replaced.

listChanged

public void listChanged(ListChangeEvent event)
Description copied from interface: ListChangeListener
This method gets called when a bound list is changed in a manner that is not easily characterized by the other methods in this interface.

Specified by:
listChanged in interface ListChangeListener
Parameters:
event - A ListChangeEvent object describing the event source and the list that changed.

listCleared

public void listCleared(ListClearEvent event)
Description copied from interface: ListChangeListener
This method gets called when a bound list is cleared.

Specified by:
listCleared in interface ListChangeListener
Parameters:
event - A ListClearEvent object describing the event source and the list that changed.

nodeAdded

public void nodeAdded(TreeAddEvent event)
Description copied from interface: TreeChangeListener
This method gets called when a node is added to a bound tree.

Specified by:
nodeAdded in interface TreeChangeListener
Parameters:
event - An event describing the event source, the tree that changed, and the path to the node that was added.

nodeRemoved

public void nodeRemoved(TreeRemoveEvent event)
Description copied from interface: TreeChangeListener
This method gets called when a node is removed from a bound tree.

Specified by:
nodeRemoved in interface TreeChangeListener
Parameters:
event - An event describing the event source, the tree that changed, and the path to the node that was removed.

treeChanged

public void treeChanged(TreeChangeEvent event)
Description copied from interface: TreeChangeListener
This method gets called when a portion of a bound tree is changed in a manner that is not easily characterized by the other methods in this interface.

Specified by:
treeChanged in interface TreeChangeListener
Parameters:
event - An event describing the event source, the tree that changed, and the current state of the tree that changed.

treeCleared

public void treeCleared(TreeClearEvent event)
Description copied from interface: TreeChangeListener
This method gets called when a bound tree is cleared.

Specified by:
treeCleared in interface TreeChangeListener
Parameters:
event - An event describing the event source, the tree that changed, and an empty path.