massim.gridsimulations
Class SimulationVisualizationObserver

java.lang.Object
  extended by massim.framework.DefaultObserver
      extended by massim.gridsimulations.SimulationVisualizationObserver
All Implemented Interfaces:
Component, Observer, ServerSimulationContextReceiver
Direct Known Subclasses:
GridSimulationVisualizationObserver, GridSimulationVisualizationObserver, GridSimulationVisualizationObserver, GridSimulationVisualizationObserver

public abstract class SimulationVisualizationObserver
extends DefaultObserver
implements ServerSimulationContextReceiver

This VisualizationObserver takes care about the visualization (svg-files).


Field Summary
protected  int htaccess
           
protected  int laststep
           
protected  GridPolicy output
           
protected  java.lang.String outputFolder
           
static java.lang.String simulationName
           
 java.lang.String tournamentName
           
 
Constructor Summary
SimulationVisualizationObserver()
           
 
Method Summary
protected abstract  void drawBackground(SimulationWorldState state)
           
protected abstract  void drawSimulation(int step, SimulationWorldState state, AgentState[] agentstates)
           
 void notifySimulationConfiguration(SimulationConfiguration simconf)
           
 void notifySimulationEnd()
           
 void notifySimulationStart()
           
 void notifySimulationState(SimulationState state)
           
 void setSimulationContext(ServerSimulationContext context)
           
 void start()
          Tell the component to start activity.
 void stop()
          Tell the component to cease activity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

simulationName

public static java.lang.String simulationName

tournamentName

public java.lang.String tournamentName

output

protected GridPolicy output

outputFolder

protected java.lang.String outputFolder

htaccess

protected int htaccess

laststep

protected int laststep
Constructor Detail

SimulationVisualizationObserver

public SimulationVisualizationObserver()
Method Detail

notifySimulationStart

public void notifySimulationStart()
Specified by:
notifySimulationStart in interface Observer
Overrides:
notifySimulationStart in class DefaultObserver

notifySimulationConfiguration

public void notifySimulationConfiguration(SimulationConfiguration simconf)
Specified by:
notifySimulationConfiguration in interface Observer
Overrides:
notifySimulationConfiguration in class DefaultObserver

notifySimulationEnd

public void notifySimulationEnd()
Specified by:
notifySimulationEnd in interface Observer
Overrides:
notifySimulationEnd in class DefaultObserver

notifySimulationState

public void notifySimulationState(SimulationState state)
Specified by:
notifySimulationState in interface Observer
Overrides:
notifySimulationState in class DefaultObserver

start

public void start()
Description copied from interface: Component
Tell the component to start activity.

Specified by:
start in interface Component
Overrides:
start in class DefaultObserver

stop

public void stop()
Description copied from interface: Component
Tell the component to cease activity.

Specified by:
stop in interface Component
Overrides:
stop in class DefaultObserver

setSimulationContext

public void setSimulationContext(ServerSimulationContext context)
Specified by:
setSimulationContext in interface ServerSimulationContextReceiver

drawSimulation

protected abstract void drawSimulation(int step,
                                       SimulationWorldState state,
                                       AgentState[] agentstates)

drawBackground

protected abstract void drawBackground(SimulationWorldState state)


Copyright © 2012. All Rights Reserved.