RealTimeHandler (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.time
Interface RealTimeHandler

All Known Implementing Classes:
  Clock

    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

### TIMER_STATUS

    static final 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.

  See Also:
    Constant Field Values

Method Detail

### setUpdateInterval

    void setUpdateInterval(int interval)

  Set the timer interval, or how often the timer updates.

  Parameters:
    `interval` - number of milliseconds between updates.

### getUpdateInterval

    int getUpdateInterval()

  Get the timer interval, or how often the timer updates.

  Returns:
    interval number of milliseconds between updates.

### setPace

    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

    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

    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

    long getTime()

  Get the current time value for the timer. The meaning of the time value depends on the RealTimeHandler.

  Returns:
    time

### startClock

    void startClock()

  Start the timer.

### stopClock

    void stopClock()

  Stop the timer.

### setClockDirection

    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

    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

    void stepForward()

  Move the clock forward one clock interval.

### stepBackward

    void stepBackward()

  Move the clock back one clock interval.

### addTimeEventListener

    void addTimeEventListener(TimeEventListener listener)

  Add a listener for TimeEvents describing what the handler is up to.

  Parameters:
    `listener` -

### removeTimeEventListener

    void removeTimeEventListener(TimeEventListener listener)

  Remove a listener so it stops receiving TimeEvents.

  Parameters:
    `listener` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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