|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ks.client.gamefactory.timer.Timer
Manages a timer. Sets a timer to wait before an action event is posted to a component. The caller can specify the time delay and whether this repeats. The timer is implemented as a thread. The one of the start(...) methods should be called to start the thread. Creation date: (10/16/01 7:27:56 PM)
Field Summary | |
protected java.lang.String |
actionCommand
|
protected java.awt.event.ActionListener |
actionListener
|
protected int |
delay
|
protected boolean |
execute
|
protected boolean |
live
|
protected boolean |
repeat
|
protected java.lang.Thread |
thread
|
Constructor Summary | |
Timer()
Creates a timer with the default delay. |
|
Timer(boolean r)
Creates a timer with specified repeat setting and the default delay. |
|
Timer(int d)
Creates a timer with specified delay. |
|
Timer(int d,
boolean r)
Creates a timer with specified delay and repeat setting. |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener l)
Adds the specified action listener to receive action events from this button. |
java.lang.String |
getActionCommand()
Returns the command name of the action event fired by this button. |
int |
getDelay()
Obtains the delay time setting for this timer. |
boolean |
isEnabled()
Determine if we are enabled. |
boolean |
isRepeat()
Obtains the repeat setting of the timer. |
void |
pause()
Pauses the timer. |
void |
removeActionListener(java.awt.event.ActionListener l)
Removes the specified action listener so it no longer receives action events from this button. |
void |
restart()
Restarts the timer immediately with the current delay value. |
void |
resume()
Resumes the timer. |
void |
run()
The thread body. |
void |
setActionCommand(java.lang.String newActionCommand)
Sets the command name of the action event fired by this button. |
void |
setDelay(int newDelay)
Sets the delay time for this timer. |
void |
setRepeat(boolean newRepeat)
Changes the repeat setting of the timer. |
void |
start()
Starts the timer with existing settings. |
void |
start(boolean r)
Starts the timer using the specified repeat setting. |
void |
start(int d)
Starts the timer using the specified delay setting |
void |
start(int d,
boolean r)
Starts the timer using the specified delay and repeat settings. |
void |
stop()
Stops the timer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean repeat
protected boolean execute
protected boolean live
protected int delay
protected java.lang.String actionCommand
protected java.awt.event.ActionListener actionListener
protected transient java.lang.Thread thread
Constructor Detail |
public Timer()
public Timer(int d)
d
- the delay in millisecondspublic Timer(int d, boolean r)
d
- the delay in millisecondsr
- if true, reset and repeat after generating the eventpublic Timer(boolean r)
r
- if true, reset and repeat after generating the eventMethod Detail |
public void addActionListener(java.awt.event.ActionListener l)
l
- the action listenerpublic java.lang.String getActionCommand()
Creation date: (10/16/01 7:40:03 PM)
public int getDelay()
setDelay(int)
public boolean isEnabled()
public boolean isRepeat()
setRepeat(boolean)
public void pause()
start() and stop() overrule this function. Creation date: (10/16/01 7:32:48 PM)
resume()
,
start()
,
stop()
public void removeActionListener(java.awt.event.ActionListener l)
l
- the action listener
Creation date: (10/16/01 7:37:28 PM)public void restart()
start()
,
stop()
public void resume()
start() and stop() overrule this function Creation date: (10/16/01 7:33:46 PM)
pause()
,
start()
,
stop()
public void run()
run
in interface java.lang.Runnable
start()
,
start(int)
,
start(boolean)
,
start(int, boolean)
,
stop()
public void setActionCommand(java.lang.String newActionCommand)
newActionCommand
- java.lang.Stringif the specified property value is unacceptable
public void setDelay(int newDelay)
getDelay()
public void setRepeat(boolean newRepeat)
isRepeat()
public void start()
start(int)
,
start(boolean)
,
start(int, boolean)
,
stop()
,
run()
public void start(int d)
d
- the delay in millisecondsstart()
,
start(int)
,
start(boolean)
,
stop()
,
run()
public void start(int d, boolean r)
d
- the delay in millisecondsr
- reset and repeat after generating the event
if the specified property value is unacceptablestart()
,
start(int)
,
start(boolean)
,
stop()
,
run()
public void start(boolean r)
r
- reset and repeat after generating the event
if the specified property value is unacceptablestart()
,
start(int)
,
start(boolean)
,
stop()
,
run()
public void stop()
start()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |