package data.events; import java.util.*; /** * An <i>abstract</i> adapter class for receiving data basket change events. The methods in this class are * empty. This class exists as convenience for creating listener objects. * * <p>Extend this class to create a DataBasketEvent listener and override the methods for the events of * interest. (If you implement the DataBasketListener interface, you have to define all of the methods in * it. This abstract class defines empty method bodies for them all, so you can concentrate on defining * methods only for events you care about.)</p> * * <p>Create a listener object using the extended class and then register it with a ListenableDataBasket using * the DataBasket's {@link data.ListenableDataBasket#addDataBasketListener} method. When the DataBasket's * contents change, the relevant method in the listener object is invoked, and a {@link DataBasketEvent} is * passed to it.</p> * * @author Steffen Zschaler * @version 2.0 19/08/1999 * @since v2.0 */ public abstract class DataBasketAdapter extends Object implements DataBasketListener { /** * Called when a DataBasketEntry was added to the DataBasket. * * @param e an event object that describes the event. * * @override Sometimes */ public void addedDBE (DataBasketEvent e) {} /** * Called when a DataBasketEntry was removed from the DataBasket. * * @param e an event object that describes the event. * * @override Sometimes */ public void removedDBE (DataBasketEvent e) {} /** * Called when the DataBasket changed in a manner too complex for the two other types of events. * * @param e an event object that describes the event. (<code>e.getAffectedEntry() == null</code>!) * * @override Sometimes */ public void dataBasketChanged (DataBasketEvent e) {} }