001    package sale.events;
002    
003    import util.*;
004    
005    /**
006     * An abstract adapter class for receiving timer events. The methods in this
007     * class are empty. This class exists as convenience for creating listener objects.
008     *
009     * <p>Extend this class to create a TimerEvent listener and override the methods
010     * for the events of interest. (If you implement the TimerListener interface, you
011     * have to define all of the methods in it. This abstract class defines empty method bodies for
012     * them all, so you can concentrate on defining methods only for events you care about.)</p>
013     *
014     * <p>Create a listener object using the extended class and then register it with a
015             * Timer using the Timer's {@link sale.Timer#addTimerListener} method. When a timer event occurs, the relevant
016     * method in the listener object is invoked, and a {@link TimerEvent} is passed to it.</p>
017     *
018     * @author Steffen Zschaler
019     * @version 2.0 18/08/1999
020     * @since v2.0
021     */
022    public abstract class TimerAdapter extends Object implements TimerListener, SerializableListener {
023    
024        /**
025         * Invoked when the time has been set.
026         *
027         * @param tevtEvent the TimerEvent to process
028         *
029         * @override Sometimes
030         */
031        public void onTimeSet(TimerEvent tevtEvent) {}
032    
033        /**
034         * Invoked when the interval has been set.
035         *
036         * @param tevtEvent the TimerEvent to process
037         *
038         * @override Sometimes
039         */
040        public void onIntervalSet(TimerEvent tevtEvent) {}
041    
042        /**
043         * Invoked when the time has been increased.
044         *
045         * @param tevtEvent the TimerEvent to process
046         *
047         * @override Sometimes
048         */
049        public void onGoneAhead(TimerEvent tevtEvent) {}
050    }