|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RealTimeHandler
The RealTimeHandler interface describes an object that has to deal with a timer that controls time on a different scale. For instance, the timer may be controlling objects on a map that move over days, where days in the scenario time are represented by several seconds on the timer.
| Field Summary | |
|---|---|
static java.lang.String |
TIMER_STATUS
Property name fired for time PropertyChangeEvents dealing with general TimeEvents, when a clock is being started, stopped or jumped to a new location. |
| Method Summary | |
|---|---|
void |
addTimeEventListener(TimeEventListener listener)
Add a listener for TimeEvents describing what the handler is up to. |
int |
getClockDirection()
Get whether time increases or decreases when the clock is run. |
int |
getPace()
Get the number of scenario units that pass when the timer updates within its interval. |
long |
getTime()
Get the current time value for the timer. |
int |
getUpdateInterval()
Get the timer interval, or how often the timer updates. |
void |
removeTimeEventListener(TimeEventListener listener)
Remove a listener so it stops receiving TimeEvents. |
void |
setClockDirection(int direction)
Set whether time increases or decreases when the clock is run. |
void |
setPace(int pace)
Set the number of scenario units that pass when the timer updates within its interval. |
void |
setTime(long time)
Set the current time value for the timer. |
void |
setUpdateInterval(int interval)
Set the timer interval, or how often the timer updates. |
void |
startClock()
Start the timer. |
void |
stepBackward()
Move the clock back one clock interval. |
void |
stepForward()
Move the clock forward one clock interval. |
void |
stopClock()
Stop the timer. |
| Field Detail |
|---|
static final java.lang.String TIMER_STATUS
| Method Detail |
|---|
void setUpdateInterval(int interval)
interval - number of milliseconds between updates.int getUpdateInterval()
void setPace(int pace)
pace - a number that means something to the
RealTimeHandler.int getPace()
void setTime(long time)
time - long getTime()
void startClock()
void stopClock()
void setClockDirection(int direction)
int getClockDirection()
void stepForward()
void stepBackward()
void addTimeEventListener(TimeEventListener listener)
listener - void removeTimeEventListener(TimeEventListener listener)
listener -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||