* The main method call in the ScenarioGraphicLoader that actually
* modifies the OMGraphics and updates the map.
*/
public synchronized void manageGraphics() {
Projection p = getProjection();
OMGraphicHandler receiver = getReceiver();
boolean DEBUG = Debug.debugging("scenario");
if (receiver != null && p != null) {
if (scenarioGraphics == null) {
scenarioGraphics = createData();
// Update limits
if (timeSliderSupport != null) {
timeSliderSupport.setStartTime(startTime);
timeSliderSupport.setEndTime(endTime);
}
}
long currentTime = getTime();
if (DEBUG) {
Debug.output("ScenarioGraphicLoader (" + getName()
+ ") snapshot at " + currentTime);
}
scenarioGraphics.generate(p,
currentTime,
getMode() == TOTAL_SCENARIO_MODE);
if (DEBUG) {
Debug.output("ScenarioGraphicLoader (" + getName()
+ ") setting list of " + scenarioGraphics.size()
+ " scenario graphics");
}
receiver.setList(scenarioGraphics);
} else {
Debug.output("ScenarioGraphicLoader (" + getName()
+ ") doesn't have a connection to the map.");
}
}