package sale.events; import util.*; /** * An abstract adapter class for receiving timer events. The methods in this * class are empty. This class exists as convenience for creating listener objects. * * <p>Extend this class to create a TimerEvent listener and override the methods * for the events of interest. (If you implement the TimerListener 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 * Timer using the Timer's {@link sale.Timer#addTimerListener} method. When a timer event occurs, the relevant * method in the listener object is invoked, and a {@link TimerEvent} is passed to it.</p> * * @author Steffen Zschaler * @version 2.0 18/08/1999 * @since v2.0 */ public abstract class TimerAdapter extends Object implements TimerListener, SerializableListener { /** * Invoked when the time has been set. * * @param tevtEvent the TimerEvent to process * * @override Sometimes */ public void onTimeSet (TimerEvent tevtEvent) {} /** * Invoked when the interval has been set. * * @param tevtEvent the TimerEvent to process * * @override Sometimes */ public void onIntervalSet (TimerEvent tevtEvent) {} /** * Invoked when the time has been increased. * * @param tevtEvent the TimerEvent to process * * @override Sometimes */ public void onGoneAhead (TimerEvent tevtEvent) {} }