Dali Provisional API
Release 3.2

org.eclipse.jpt.common.utility.model.listener
Class AbstractChangeListener

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

public abstract class AbstractChangeListener
extends 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
AbstractChangeListener()
           
 
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.
protected  void modelChanged()
          The model has notified the listener of a change.
protected  void modelChanged(ChangeEvent event)
          The model has notified the listener of the change described by the specified change event.
 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractChangeListener

public AbstractChangeListener()
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.

modelChanged

protected void modelChanged(ChangeEvent event)
The model has notified the listener of the change described by the specified change event. By default the listener executes modelChanged().


modelChanged

protected void modelChanged()
The model has notified the listener of a change. By default the listener throws an exception.


toString

public String toString()
Overrides:
toString in class Object

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.