edu.luc.cs.trull.demo
Class Clock
java.lang.Object
edu.luc.cs.trull.EmptyComponent
edu.luc.cs.trull.TerminatingComponent
edu.luc.cs.trull.AbstractComponent
edu.luc.cs.trull.EmitComponent
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Clock
public Clock()
Clock
public Clock(int delay)
Clock
public Clock(java.lang.String tick)
Clock
public Clock(java.lang.String tick,
int delay)
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
http://www.cs.luc.edu/trull/