EventTimer
Class Diagram
Ancestor class specifications:
EventTimer
Class Specification
Invariant
An EventTimer object...
- is an alarm clock-like object that throws events at the specified interval.
- (enabled implies this object throws an event every time_interval milliseconds) and (not enabled implies this object is not throwing events)
Constructor Methods
public EventTimer( int t )
post: time_interval == t
milliseconds
and enabled == false
Update Methods
public void start( )
post: enabled == true
(i.e.,
this object starts to throw events)
public void stop( )
post: enabled == false
(i.e.,
this object quits throwing events)
Event Handler Method
public abstract void actionPerformed( java.awt.event.ActionEvent e )
note: This method is called whenever time_interval milliseconds have expired. The e parameter passes an associated event object. The class inheriting EventTimer must override this method.