net.sourceforge.jabm
Class DesktopSimulationManager

java.lang.Object
  extended by net.sourceforge.jabm.SimulationManager
      extended by net.sourceforge.jabm.DesktopSimulationManager
All Implemented Interfaces:
java.lang.Runnable

public class DesktopSimulationManager
extends SimulationManager

The main class to run if running JABM with a graphical user interface. The simulation model is specified as a Spring beans xml configuration file, as per SimulationManager.

See Also:
SimulationManager
 

Field Summary
protected  java.util.LinkedList<net.infonode.docking.View> builtinViews
           
protected  net.infonode.docking.theme.DockingWindowsTheme currentTheme
           
protected  javax.swing.JFrame desktopFrame
           
protected  net.infonode.docking.RootWindow desktopPane
           
protected  net.infonode.docking.View outputView
           
protected  javax.swing.JToggleButton pauseButton
           
protected  net.infonode.docking.properties.RootWindowProperties properties
           
protected  PropertiesEditor propertiesEditor
           
protected  net.infonode.docking.View propertiesView
           
protected  int propertiesViewId
           
protected  java.util.LinkedList<net.infonode.docking.View> reportViews
           
protected  javax.swing.JButton runButton
           
protected  SimulationController simulationController
           
protected  java.util.Properties simulationProperties
           
protected  java.lang.Thread simulationThread
           
protected  javax.swing.JButton terminateButton
           
protected  net.infonode.docking.util.ViewMap viewMap
           
protected  javax.swing.JMenuItem[] viewMenuItems
           
 
Fields inherited from class net.sourceforge.jabm.SimulationManager
baseDirName, configOnly, generateSeeds, propFile, seedMask, SIMULATION_CONTROLLER_BEAN, varFile
 
Constructor Summary
DesktopSimulationManager()
           
 
Method Summary
 void cleanUp()
           
 void closeApplication()
           
protected  javax.swing.JMenu createFileMenu()
           
protected  javax.swing.JMenu createHelpMenu()
           
protected  javax.swing.ImageIcon createImageIcon(java.lang.String path, java.lang.String description)
          Returns an ImageIcon, or null if the path was invalid.
 javax.swing.JComponent createOutputFrame()
           
 javax.swing.JMenu createReportMenu()
           
 javax.swing.JToolBar createToolBar()
           
protected  javax.swing.JMenu createViewMenu()
           
protected  javax.swing.JMenuItem createViewMenuItem(java.lang.String title, net.infonode.docking.View view)
           
 java.lang.String getLayoutFileName()
           
 java.util.List<Report> getReports()
           
 Simulation getSimulation()
           
 net.infonode.docking.DockingWindow[] getWindows(java.util.List<net.infonode.docking.View> windows)
           
 void handleExceptionWithErrorDialog(java.lang.Exception e)
           
protected  void helpDialog()
           
 void initialise()
           
 void initialiseGUI()
           
 void initialiseViews()
           
 void intialiseLayout()
           
 void loadSimulationProperties()
           
static void main(java.lang.String[] args)
           
 void pause()
           
 void populateViewMenu(javax.swing.JMenu menu, java.util.List<net.infonode.docking.View> views)
           
 void restoreLayout()
           
 void resume()
           
 void run()
           
 void runSingleExperiment()
           
 void saveLayout()
           
 void saveSimulationProperties()
           
 void terminate()
           
 
Methods inherited from class net.sourceforge.jabm.SimulationManager
getSimulationController, launch, runSingleExperiment, runSingleExperiment, setup, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

desktopPane

protected net.infonode.docking.RootWindow desktopPane

viewMap

protected net.infonode.docking.util.ViewMap viewMap

desktopFrame

protected javax.swing.JFrame desktopFrame

reportViews

protected java.util.LinkedList<net.infonode.docking.View> reportViews

builtinViews

protected java.util.LinkedList<net.infonode.docking.View> builtinViews

viewMenuItems

protected javax.swing.JMenuItem[] viewMenuItems

currentTheme

protected net.infonode.docking.theme.DockingWindowsTheme currentTheme

properties

protected net.infonode.docking.properties.RootWindowProperties properties

simulationController

protected SimulationController simulationController

simulationThread

protected java.lang.Thread simulationThread

simulationProperties

protected java.util.Properties simulationProperties

propertiesViewId

protected int propertiesViewId

runButton

protected javax.swing.JButton runButton

pauseButton

protected javax.swing.JToggleButton pauseButton

terminateButton

protected javax.swing.JButton terminateButton

propertiesView

protected net.infonode.docking.View propertiesView

propertiesEditor

protected PropertiesEditor propertiesEditor

outputView

protected net.infonode.docking.View outputView
Constructor Detail

DesktopSimulationManager

public DesktopSimulationManager()
Method Detail

initialise

public void initialise()

saveSimulationProperties

public void saveSimulationProperties()

loadSimulationProperties

public void loadSimulationProperties()

initialiseViews

public void initialiseViews()

createOutputFrame

public javax.swing.JComponent createOutputFrame()

initialiseGUI

public void initialiseGUI()

createViewMenuItem

protected javax.swing.JMenuItem createViewMenuItem(java.lang.String title,
                                                   net.infonode.docking.View view)

populateViewMenu

public void populateViewMenu(javax.swing.JMenu menu,
                             java.util.List<net.infonode.docking.View> views)

createReportMenu

public javax.swing.JMenu createReportMenu()

createViewMenu

protected javax.swing.JMenu createViewMenu()

createHelpMenu

protected javax.swing.JMenu createHelpMenu()

helpDialog

protected void helpDialog()

createToolBar

public javax.swing.JToolBar createToolBar()

createImageIcon

protected javax.swing.ImageIcon createImageIcon(java.lang.String path,
                                                java.lang.String description)
Returns an ImageIcon, or null if the path was invalid.


createFileMenu

protected javax.swing.JMenu createFileMenu()

closeApplication

public void closeApplication()

cleanUp

public void cleanUp()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class SimulationManager

runSingleExperiment

public void runSingleExperiment()
Overrides:
runSingleExperiment in class SimulationManager

getLayoutFileName

public java.lang.String getLayoutFileName()
                                   throws java.io.IOException
Throws:
java.io.IOException

saveLayout

public void saveLayout()
                throws java.io.IOException
Throws:
java.io.IOException

restoreLayout

public void restoreLayout()
                   throws java.io.IOException
Throws:
java.io.IOException

intialiseLayout

public void intialiseLayout()

getWindows

public net.infonode.docking.DockingWindow[] getWindows(java.util.List<net.infonode.docking.View> windows)

handleExceptionWithErrorDialog

public void handleExceptionWithErrorDialog(java.lang.Exception e)

terminate

public void terminate()

pause

public void pause()

resume

public void resume()

getReports

public java.util.List<Report> getReports()

getSimulation

public Simulation getSimulation()

main

public static void main(java.lang.String[] args)