|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.globalse.arena.frag.util.Timer
The Timer class sends a TimerEvent, a subclass of ObjectActionEvent, in fixed time steps to a certain object. $Id: Timer.html,v 1.1 2003/02/12 18:06:20 schoecke Exp $
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
Timer()
|
Method Summary | |
void |
disable()
Disables (stops) the timer. |
void |
enable(int interval)
Starts the timer. |
EventDistributor |
eventDistributor()
Returns the EventDistributor instance. |
java.lang.String |
getGameName()
Returns the name of the game. |
int |
getInterval()
Returns the interval between the time steps. |
java.lang.String |
getObjectName()
Returns the name of the current object. |
java.lang.String |
getTimerName()
Returns the name of the timer. |
void |
run()
The run method for the thread, which startes the timer. |
void |
setGameName(java.lang.String gameName)
Sets the name of the game to the given parameter, if the timer is started. |
void |
setObjectName(java.lang.String objectName)
Sets the name of the current object to the given parameter, if the timer is started |
void |
setTimerName(java.lang.String timerName)
Sets the name of the timer to the given parameter, if the timer is started. |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Timer()
Method Detail |
public int getInterval()
public java.lang.String getGameName()
public void setGameName(java.lang.String gameName)
gameName
- the new name of the gamepublic java.lang.String getObjectName()
public void setObjectName(java.lang.String objectName)
objectName
- String sets the object namepublic java.lang.String getTimerName()
public void setTimerName(java.lang.String timerName)
timerName
- the new name of the timerpublic void enable(int interval)
interval
- int value for the timerpublic void disable()
public void run()
public EventDistributor eventDistributor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |