|
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--vipratech.beans.standardbeans.Clock
The Clock.class provides the timer to that is visible at design time but invisible at run time. It can be wired up using action listeners at design time.
The clock sends a "tick" (an action event) every simualtion second to registered listeners. The interval between ticks is set using the setMillisecsPerSec(int millisecsPerSec) method. The default value is 1000ms, but other values of ms can be chosen to represent 1 simulation second.
HorizontalChartRecorder
Constructor Summary | |
Clock()
Constructor |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener listener)
Allows this component to be wired at design time with action listeners. |
java.lang.String |
calculateTime(int time)
Converts an int value to an hh:mm:ss time representation. |
void |
destroy()
Kills thread when shutting down. |
int |
getMillisecsPerSec()
Returns the interval to represent 1 simulation second. |
int |
getTime()
Returns the current time in simualtion seconds. |
java.lang.String |
getTimeAsString()
Returns the current time as a string. |
void |
removeActionListener(java.awt.event.ActionListener listener)
Allows this component to be un-wired at design time with action listeners. |
void |
run()
Sends a "tick" to registered listeners. |
void |
setMillisecsPerSec(int millisecsPerSec)
Sets the interval to represent 1 simulation second. |
void |
start()
Starts the clock. |
void |
stop()
Stops the clock. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Clock()
Method Detail |
public final void start()
public final void stop()
public final void run()
public java.lang.String calculateTime(int time)
public void addActionListener(java.awt.event.ActionListener listener)
public void removeActionListener(java.awt.event.ActionListener listener)
public final void destroy()
public final void setMillisecsPerSec(int millisecsPerSec)
public final int getMillisecsPerSec()
public final int getTime()
public final java.lang.String getTimeAsString()
|
dathe@chemie.uni-leipzig.de" | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |