Trull

edu.luc.cs.trull.demo
Class Clock

java.lang.Object
  extended by edu.luc.cs.trull.EmptyComponent
      extended by edu.luc.cs.trull.TerminatingComponent
          extended by edu.luc.cs.trull.AbstractComponent
              extended by edu.luc.cs.trull.EmitComponent
                  extended by edu.luc.cs.trull.demo.Clock
All Implemented Interfaces:
Component, PropertyChangeSource, Startable, Suspendable, Terminating, java.beans.PropertyChangeListener, java.util.EventListener

public class Clock
extends EmitComponent

A continuous one-tick-per-second activity.


Field Summary
static int DELAY
           
static java.lang.String TICK
           
protected  javax.swing.Timer timer
           
 
Constructor Summary
Clock()
           
Clock(int delay)
           
Clock(java.lang.String tick)
           
Clock(java.lang.String tick, int delay)
           
 
Method Summary
 void resume()
          Resumes this suspendable component.
 void start(java.beans.PropertyChangeEvent event)
          Starts this startable component.
 void stop()
          Stops this startable component.
 void suspend()
          Suspends this suspendable component.
 
Methods inherited from class edu.luc.cs.trull.EmitComponent
eventEmitter, eventEmitterCached, eventEmitterUncached, scheduleEvent, scheduleEvent, scheduleEvent
 
Methods inherited from class edu.luc.cs.trull.AbstractComponent
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getExternalListeners, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from class edu.luc.cs.trull.TerminatingComponent
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener
 
Methods inherited from class edu.luc.cs.trull.EmptyComponent
getTerminationListener, propertyChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELAY

public static final int DELAY
See Also:
Constant Field Values

TICK

public static final java.lang.String TICK
See Also:
Constant Field Values

timer

protected javax.swing.Timer timer
Constructor Detail

Clock

public Clock()

Clock

public Clock(int delay)

Clock

public Clock(java.lang.String tick)

Clock

public Clock(java.lang.String tick,
             int delay)
Method Detail

resume

public void resume()
Description copied from interface: Suspendable
Resumes this suspendable component.

Specified by:
resume in interface Suspendable
Overrides:
resume in class EmitComponent

start

public void start(java.beans.PropertyChangeEvent event)
Description copied from interface: Startable
Starts this startable component.

Specified by:
start in interface Startable
Overrides:
start in class EmitComponent
Parameters:
event - the event that triggered the invocation of this method. May be null.

stop

public void stop()
Description copied from interface: Startable
Stops this startable component.

Specified by:
stop in interface Startable
Overrides:
stop in class EmitComponent

suspend

public void suspend()
Description copied from interface: Suspendable
Suspends this suspendable component.

Specified by:
suspend in interface Suspendable
Overrides:
suspend in class EmitComponent

Trull

http://www.cs.luc.edu/trull/