com.bbn.openmap.gui.time
Interface RealTimeHandler

All Known Implementing Classes:
ScenarioGraphicLoader

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.


Method Summary
 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 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.
 

Method Detail

setUpdateInterval

public void setUpdateInterval(int interval)
Set the timer interval, or how often the timer updates.

Parameters:
interval - number of milliseconds between updates.

getUpdateInterval

public int getUpdateInterval()
Get the timer interval, or how often the timer updates.

Returns:
interval number of milliseconds between updates.

setPace

public void setPace(int pace)
Set the number of scenario units that pass when the timer updates within its interval.

Parameters:
pace - a number that means something to the RealTimeHandler.

getPace

public int getPace()
Get the number of scenario units that pass when the timer updates within its interval.

Returns:
a number that means something to the RealTimeHandler.

setTime

public void setTime(long time)
Set the current time value for the timer. The meaning of the time value depends on the RealTimeHandler.

Parameters:
time -

getTime

public long getTime()
Get the current time value for the timer. The meaning of the time value depends on the RealTimeHandler.

Returns:
time

startClock

public void startClock()
Start the timer.


stopClock

public void stopClock()
Stop the timer.


setClockDirection

public void setClockDirection(int direction)
Set whether time increases or decreases when the clock is run. If direction is zero or greater, clock runs forward. If direction is negative, clock runs backward.


getClockDirection

public int getClockDirection()
Get whether time increases or decreases when the clock is run. If direction is zero or greater, clock runs forward. If direction is negative, clock runs backward.


stepForward

public void stepForward()
Move the clock forward one clock interval.


stepBackward

public void stepBackward()
Move the clock back one clock interval.



Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details