avrora.gui
Interface VisualMonitor

All Superinterfaces:
Monitor
All Known Implementing Classes:
VisualRadioMonitor.VisualMonitor, VisualRegMonitor.VisualMonitor

public interface VisualMonitor
extends Monitor

The VisualMonitor class represents a monitor attached to a Simulator instance. Created by the MonitorFactory class, a monitor collects statistics about a program as it runs, and then when the simulation is complete, generates a report.

All visual monitors are expected to "draw" some graphical output (e.g. a graph, a table) to a displayable Swing panel.


Method Summary
 GraphEvents getGraph()
          This is a temporary hack...once Global Monitors is rewritten to be more robust, this will be deleted
 void report()
          The report() method is called after the simulation is complete.
 void setVisualPanel(javax.swing.JPanel thePanel, javax.swing.JPanel theOptionsPanel)
          This is called right after a monitor is actually init (when the sim is just beginning It physically let's the new monitor "know" about it's painting surfaces Note that it's possible with the new implementation that this function will be unnecessary
 void updateDataAndPaint()
          This function should be called by the thread that periodically repaints the monitors chalkaboard.
 

Method Detail

updateDataAndPaint

public void updateDataAndPaint()
This function should be called by the thread that periodically repaints the monitors chalkaboard. It is assumed that this function will also handle any internal data maniuplations that are necessary


getGraph

public GraphEvents getGraph()
This is a temporary hack...once Global Monitors is rewritten to be more robust, this will be deleted


setVisualPanel

public void setVisualPanel(javax.swing.JPanel thePanel,
                           javax.swing.JPanel theOptionsPanel)
This is called right after a monitor is actually init (when the sim is just beginning It physically let's the new monitor "know" about it's painting surfaces

Note that it's possible with the new implementation that this function will be unnecessary

Parameters:
thePanel - The main display panel for the monitor
theOptionsPanel - The panel that the monitor can display options to

report

public void report()
The report() method is called after the simulation is complete. The monitor generates a textual or other format representation of the information collected during the execution of the program.

For visual monitors, typically is would do a "last check" to make sure it got all it's data from temporary storage onto the display.

Specified by:
report in interface Monitor