Index: trunk/src/tmcsim/common/RevisionNumber.java
===================================================================
--- trunk/src/tmcsim/common/RevisionNumber.java	(revision 6)
+++ trunk/src/tmcsim/common/RevisionNumber.java	(revision 6)
@@ -0,0 +1,50 @@
+package tmcsim.common;
+
+import java.io.File;
+import java.util.Scanner;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * RevisionNumber represents the current Subversion revision. The Ant build
+ * script generates this value and saves it in a plain text file in the 'config'
+ * folder. (See target '-pre-compile'). The file should be included into the
+ * distributed zip file by the build script so it is available at run time to be
+ * displayed in help info.
+ *
+ * @author jdalbey
+ */
+public class RevisionNumber
+{
+
+    private static Logger logger = Logger.getLogger("tmcsim.common");
+    // Read the subversion revision info and return it
+
+    /**
+     * Return the version number as a string. The revision number is generated
+     * by the svnversion command.
+     *
+     * @see http://svnbook.red-bean.com/en/1.7/svn.ref.svnversion.re.html
+     * Currently this string it return untouched. Future enhancements might make
+     * it pretty.
+     * @return the revision number as a string
+     */
+    public static String getString()
+    {
+        String revision = "unknown"; // default
+        String kConfigFile = "config/svn-version.txt";
+//        InputStream in = RevisionNumber.class.getResourceAsStream("config/svn-version.txt");
+        try
+        {
+            Scanner scan = new Scanner(new File(kConfigFile));
+            revision = scan.next();
+        } catch (Exception e)
+        {
+            logger.logp(Level.SEVERE,
+                    "RevisionNumber", "getString()",
+                    "Exception trying to read from file: "
+                    + kConfigFile, e);
+        }
+        return revision;
+    }
+}
Index: trunk/src/tmcsim/simulationmanager/SimulationManagerView.java
===================================================================
--- trunk/src/tmcsim/simulationmanager/SimulationManagerView.java	(revision 2)
+++ trunk/src/tmcsim/simulationmanager/SimulationManagerView.java	(revision 6)
@@ -737,4 +737,5 @@
         simulationStatus     = new JLabel("Simulation Status");
         simulationStatusText = new JLabel("No Script");
+        simulationStatusText.setName("simulationStatusText");
         simulationStatusText.setFont(new Font("Geneva", Font.BOLD, 14));
         
@@ -746,4 +747,6 @@
         pauseButton  = new JButton(new PauseSimulationAction(this));
         resetButton = new JButton(new ResetSimulationAction(this));
+        loadScriptButton = new JButton(new LoadScriptAction(this));
+        loadScriptButton.setAlignmentX(Box.CENTER_ALIGNMENT);
         
         startButton.setEnabled(false);
@@ -756,11 +759,14 @@
         simulationTimeButtonBox = new Box(BoxLayout.X_AXIS);
         
+        simulationTimeButtonBox.add(loadScriptButton);
         simulationTimeButtonBox.add(startButton);
         simulationTimeButtonBox.add(pauseButton);
         simulationTimeButtonBox.add(resetButton);
+//        currentScript = new JLabel(" no script loaded");
+        //currentScript.setAlignmentX(Box.LEFT_ALIGNMENT);
+//        simulationTimeButtonBox.add (currentScript);
         
         simulationStatus.setAlignmentX(Box.CENTER_ALIGNMENT);
         simulationStatusText.setAlignmentX(Box.CENTER_ALIGNMENT);
-        simulationStatusText.setName("simulationStatusText");
         
         TitledBorder title = BorderFactory.createTitledBorder(
@@ -779,10 +785,6 @@
         scriptBox.setAlignmentX(Box.CENTER_ALIGNMENT);
         
-        loadScriptButton = new JButton(new LoadScriptAction(this));
-        loadScriptButton.setAlignmentX(Box.CENTER_ALIGNMENT);
-        
         scriptBox.add(simulationStatusBox);
         scriptBox.add(Box.createVerticalStrut(5));
-        scriptBox.add(loadScriptButton);
         
         simulationClockLabel = new JLabel("0:00:00");
@@ -800,6 +802,6 @@
         simulationTimeAndStatusBox = Box.createHorizontalBox();
         simulationTimeAndStatusBox.setAlignmentX(Box.LEFT_ALIGNMENT);
-        simulationTimeAndStatusBox.setMaximumSize(new Dimension(640, 200));
-        simulationTimeAndStatusBox.setPreferredSize(new Dimension(640, 160));
+        simulationTimeAndStatusBox.setMaximumSize(new Dimension(640, 300));
+        simulationTimeAndStatusBox.setPreferredSize(new Dimension(640, 1600));
         simulationTimeAndStatusBox.add(Box.createHorizontalStrut(5));
         simulationTimeAndStatusBox.add(simulationTimeBox);
@@ -1224,5 +1226,5 @@
     private JLabel timeScheduledLabel;
     private JLabel CADClientClockLabel;
-            
+    private JLabel currentScript;
     private Box adminInteractionBox;    
     private Box simulationRightSideBox;
Index: trunk/src/tmcsim/simulationmanager/SimulationManager.java
===================================================================
--- trunk/src/tmcsim/simulationmanager/SimulationManager.java	(revision 2)
+++ trunk/src/tmcsim/simulationmanager/SimulationManager.java	(revision 6)
@@ -9,143 +9,174 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import javax.swing.JOptionPane;
 import javax.swing.UIManager;
-
+import tmcsim.common.CADEnums.PARAMICS_STATUS;
 import tmcsim.common.SimulationException;
-import tmcsim.common.CADEnums.PARAMICS_STATUS;
 
 /**
- * Simulation Manager is the main class for this module.  The Simulation Manager
- * is used to control the view and control the simulation.  Simulation incidents
- * are loaded, removed, reschedule, and added from the Simulation Manager.  The
+ * Simulation Manager is the main class for this module. The Simulation Manager
+ * is used to control the view and control the simulation. Simulation incidents
+ * are loaded, removed, reschedule, and added from the Simulation Manager. The
  * Simulation Manager provides functionality for connecting to the paramics
- * communicator and applying diversions.  A history of all events is shown as well.<br> 
- * The SimulationManager may be started at any point before, during, or after 
- * a simulation has begun. The SimulationManager connects to the CADSimulator 
- * and communicates through Java RMI methods.  If two SimulationManagers are started,
- * the second one started, chronologically, will receive communication from the 
- * CADSimulator. <br><br>  
- * The properties file for the SimulationManager class contains the following data.<br>
+ * communicator and applying diversions. A history of all events is shown as
+ * well.<br>
+ * The SimulationManager may be started at any point before, during, or after a
+ * simulation has begun. The SimulationManager connects to the CADSimulator and
+ * communicates through Java RMI methods. If two SimulationManagers are started,
+ * the second one started, chronologically, will receive communication from the
+ * CADSimulator. <br><br>
+ * The properties file for the SimulationManager class contains the following
+ * data.<br>
  * <code>
  * -----------------------------------------------------------------------------<br>
- * Host Name              The host name where the CADSimulator is located.<br>
- * Error File             The target file to use for error logging.<br>
+ * Host Name The host name where the CADSimulator is located.<br>
+ * Error File The target file to use for error logging.<br>
  * -----------------------------------------------------------------------------<br>
  * Example File: <br>
- * CADSimulatorHost    = localhost <br>
- * ErrorFile           = sim_mgr_error.xml <br>
+ * CADSimulatorHost = localhost <br>
+ * ErrorFile = sim_mgr_error.xml <br>
  * -----------------------------------------------------------------------------<br>
  * </code>
  *
  * @author Matthew Cechini (mcechini@calpoly.edu)
- * @version $Date: 2009/04/17 16:27:47 $ $Revision: 1.7 
+ * @version $Date: 2009/04/17 16:27:47 $ $Revision: 1.7
  */
-public class SimulationManager {
-        
-    /** Error logger. */
+public class SimulationManager
+{
+
+    /**
+     * Error logger.
+     */
     private static Logger simManLogger = Logger.getLogger("tmcsim.simulationmanager");
-    
+
     /**
      * Enumeration containing property names.
+     *
      * @author Matthew Cechini
      */
-    private static enum PROPERTIES {
-        CAD_SIM_HOST  ("CADSimulatorHost"),
-        CAD_SIM_PORT  ("CADSimulatorRMIPort"),
-        SCRIPT_DIR    ("ScriptDir"),
-        FAKE_PARAMICS ("FakeParamicsConnection");
-        
+    private static enum PROPERTIES
+    {
+
+        CAD_SIM_HOST("CADSimulatorHost"),
+        CAD_SIM_PORT("CADSimulatorRMIPort"),
+        SCRIPT_DIR("ScriptDir"),
+        FAKE_PARAMICS("FakeParamicsConnection");
         public String name;
-        
-        private PROPERTIES(String n) {
+
+        private PROPERTIES(String n)
+        {
             name = n;
         }
-        
     }
-        
-    /**
-     * Instance of the SimulationManagerModel which communicates with the 
-     * CAD Simulator to display the current simulation information.  This
-     * model class contains the data that is displayed by the SimulationManagerView
-     * class.  The View purely provides a GUI interface for the data contained within
+    /**
+     * Instance of the SimulationManagerModel which communicates with the CAD
+     * Simulator to display the current simulation information. This model class
+     * contains the data that is displayed by the SimulationManagerView class.
+     * The View purely provides a GUI interface for the data contained within
      * the model.
      */
-    private SimulationManagerModel  theSimManagerModel;
-    
-    /**
-     * Instance of the SimulationManagerView class which provides a GUI for the user
-     * to view the current simulation information and to manage the simulation.  The 
-     * view communicates to the SimulationManagerModel class to get and set data.
-     */
-    SimulationManagerView   theSimManagerView;
-    
-    /** The Properties object for the Simulation Manager. */
+    SimulationManagerModel theSimManagerModel;
+    /**
+     * Instance of the SimulationManagerView class which provides a GUI for the
+     * user to view the current simulation information and to manage the
+     * simulation. The view communicates to the SimulationManagerModel class to
+     * get and set data.
+     */
+    SimulationManagerView theSimManagerView;
+    /**
+     * The Properties object for the Simulation Manager.
+     */
     private Properties simManagerProperties;
-    
-    /**
-     * Constructor.  Set communication data members from properties file.  Instantiate
-     * the SimulationManager Model and View objects, and set visibility to true.
-     * 
-     * @param propertiesFile Properties file containing info for Simulation Manager.
-     */
-    public SimulationManager(String propertiesFile) throws SimulationException {    
-
-        try {
+
+    /**
+     * Constructor. Set communication data members from properties file.
+     * Instantiate the SimulationManager Model and View objects, and set
+     * visibility to true.
+     *
+     * @param propertiesFile Properties file containing info for Simulation
+     * Manager.
+     */
+    public SimulationManager(String propertiesFile) throws SimulationException
+    {
+
+        try
+        {
             simManagerProperties = new Properties();
             simManagerProperties.load(new FileInputStream(new File(propertiesFile)));
-            
-            SimulationManagerView.SCRIPT_DIR = 
-                simManagerProperties.getProperty(PROPERTIES.SCRIPT_DIR.name).trim();
+
+            SimulationManagerView.SCRIPT_DIR =
+                    simManagerProperties.getProperty(PROPERTIES.SCRIPT_DIR.name).trim();
 
             //make sure properties aren't null
-            if(simManagerProperties.getProperty(PROPERTIES.CAD_SIM_HOST.name) == null)
-                throw new Exception("CAD Simulator host property is null.");  
-                
-            if(simManagerProperties.getProperty(PROPERTIES.CAD_SIM_PORT.name) == null)
+            if (simManagerProperties.getProperty(PROPERTIES.CAD_SIM_HOST.name) == null)
+            {
+                throw new Exception("CAD Simulator host property is null.");
+            }
+
+            if (simManagerProperties.getProperty(PROPERTIES.CAD_SIM_PORT.name) == null)
+            {
                 throw new Exception("CAD Simulator port property is null.");
-            
-        }
-        catch (Exception e)
-        {     
-            simManLogger.logp(Level.SEVERE, "SimulationManager", "Constructor", 
+            }
+
+        } catch (Exception e)
+        {
+            simManLogger.logp(Level.SEVERE, "SimulationManager", "Constructor",
                     "Exception in reading properties file.", e);
-            
+
             throw new SimulationException(SimulationException.INITIALIZE_ERROR, e);
         }
 
         //Construct the SimulationManagerModel
-        try 
-        {                
+        try
+        {
             theSimManagerModel = new SimulationManagerModel(
-                    simManagerProperties.getProperty(PROPERTIES.CAD_SIM_HOST.name).trim(), 
+                    simManagerProperties.getProperty(PROPERTIES.CAD_SIM_HOST.name).trim(),
                     simManagerProperties.getProperty(PROPERTIES.CAD_SIM_PORT.name).trim());
 
             //Construct the SimulationManagerView and set up the Model-View references.
             theSimManagerView = new SimulationManagerView(theSimManagerModel);
-            theSimManagerModel.setView(theSimManagerView);                           
-        }
-        catch (RemoteException re) 
-        {
-            simManLogger.logp(Level.SEVERE, "SimulationManager", "Constructor", 
+            theSimManagerModel.setView(theSimManagerView);
+        } catch (RemoteException re)
+        {
+            simManLogger.logp(Level.SEVERE, "SimulationManager", "Constructor",
                     "Unable to establish RMI ", re);
 
-            throw new SimulationException(SimulationException.CAD_SIM_CONNECT, re); 
-        }
-
-        theSimManagerView.addWindowListener(new WindowListener() {
-            public void windowClosed(WindowEvent e)  {}
-            public void windowOpened(WindowEvent e)  {}            
-            public void windowIconified(WindowEvent e)  {}         
-            public void windowDeiconified(WindowEvent e)  {}    
-            public void windowActivated(WindowEvent e)  {}                             
-            public void windowDeactivated(WindowEvent e)  {}         
-            public void windowClosing(WindowEvent e)  {     
+            throw new SimulationException(SimulationException.CAD_SIM_CONNECT, re);
+        }
+
+        theSimManagerView.addWindowListener(new WindowListener()
+        {
+            public void windowClosed(WindowEvent e)
+            {
+            }
+
+            public void windowOpened(WindowEvent e)
+            {
+            }
+
+            public void windowIconified(WindowEvent e)
+            {
+            }
+
+            public void windowDeiconified(WindowEvent e)
+            {
+            }
+
+            public void windowActivated(WindowEvent e)
+            {
+            }
+
+            public void windowDeactivated(WindowEvent e)
+            {
+            }
+
+            public void windowClosing(WindowEvent e)
+            {
                 theSimManagerModel.disconnect();
                 System.exit(0);
-            }           
+            }
         });
 
-        if(Boolean.parseBoolean(simManagerProperties.getProperty(
+        if (Boolean.parseBoolean(simManagerProperties.getProperty(
                 PROPERTIES.FAKE_PARAMICS.name).trim()))
         {
@@ -154,45 +185,39 @@
 
         //Show the SimulationManager
-        theSimManagerView.setVisible(true);        
+        theSimManagerView.setVisible(true);
     }
-    
-    /**
-     * Main class.  
-     * 
+
+    /**
+     * Main class.
+     *
      * @param args Command line arguments.
      */
-    static public void main(String[] args) {
+    static public void main(String[] args)
+    {
         System.setProperty("SIM_MGR_PROPERTIES", "config/sim_manager_config.properties");
-
-        try {
-            if(System.getProperty("SIM_MGR_PROPERTIES") != null)
+        //System.setProperty("swing.defaultlaf", "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
+
+        try
+        {
+            if (System.getProperty("SIM_MGR_PROPERTIES") != null)
             {
                 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-                
+
                 new SimulationManager(System.getProperty("SIM_MGR_PROPERTIES"));
-            }
-            else
-            {
-                throw new Exception ("SIM_MGR_PROPERTIES system property not defined.");
-            }
-        } 
-        catch (Exception e) 
-        {
-            simManLogger.logp(Level.SEVERE, "SimulationManager", "Main", 
+            } else
+            {
+                throw new Exception("SIM_MGR_PROPERTIES system property not defined.");
+            }
+        } catch (Exception e)
+        {
+            simManLogger.logp(Level.SEVERE, "SimulationManager", "Main",
                     "Error occured initializing application", e);
-            
-            JOptionPane.showMessageDialog(null, e.getMessage(), 
-                "Error - Program Exiting", JOptionPane.ERROR_MESSAGE);  
-            
+
+            JOptionPane.showMessageDialog(null, e.getMessage(),
+                    "Error - Program Exiting", JOptionPane.ERROR_MESSAGE);
+
             System.exit(-1);
-        }   
-        
+        }
+
     }
 }
-
-
-
-
-
-
-
Index: trunk/src/tmcsim/simulationmanager/SimulationManagerModel.java
===================================================================
--- trunk/src/tmcsim/simulationmanager/SimulationManagerModel.java	(revision 2)
+++ trunk/src/tmcsim/simulationmanager/SimulationManagerModel.java	(revision 6)
@@ -10,265 +10,313 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import tmcsim.cadmodels.CMSDiversion;
 import tmcsim.cadmodels.CMSInfo;
 import tmcsim.client.cadclientgui.data.Incident;
 import tmcsim.client.cadclientgui.data.IncidentEvent;
+import tmcsim.common.CADEnums.PARAMICS_STATUS;
+import tmcsim.common.CADEnums.SCRIPT_STATUS;
 import tmcsim.common.ScriptException;
 import tmcsim.common.SimulationException;
-import tmcsim.common.CADEnums.PARAMICS_STATUS;
-import tmcsim.common.CADEnums.SCRIPT_STATUS;
 import tmcsim.interfaces.CoordinatorInterface;
 import tmcsim.interfaces.SimulationManagerInterface;
 
-
 /**
- * SimulationManagerModel is the model class for the Simulation Manager.  All communication
- * between the Coordinator and the Simulation Manager passes through this object.  The view
- * passes requests through local methods, and the Coordinator calls remote functions in this
- * object to update the viewed simulation data.
- * <br/> 
- * At construction, the SimulationManagerModel registers itself with the coordinator.  
- * Administrative commands for the simulation are received from the SimlationManagerView 
- * class, and then the appropriate Coordinator remote method is executed.  During a 
- * simulation, the Coordinator calls remote methods contained in the SimulationManagerInterface.  
- * For a description of those methods, see the interface's documentation.  After construction, 
- * this model class must have its setView() method called to set the reference to its view class.
- * 
+ * SimulationManagerModel is the model class for the Simulation Manager. All
+ * communication between the Coordinator and the Simulation Manager passes
+ * through this object. The view passes requests through local methods, and the
+ * Coordinator calls remote functions in this object to update the viewed
+ * simulation data.
+ * <br/>
+ * At construction, the SimulationManagerModel registers itself with the
+ * coordinator. Administrative commands for the simulation are received from the
+ * SimlationManagerView class, and then the appropriate Coordinator remote
+ * method is executed. During a simulation, the Coordinator calls remote methods
+ * contained in the SimulationManagerInterface. For a description of those
+ * methods, see the interface's documentation. After construction, this model
+ * class must have its setView() method called to set the reference to its view
+ * class.
+ *
  * @see SimulationManagerView
  * @see SimulationManagerInterface
- * @author Matthew Cechini 
+ * @author Matthew Cechini
  * @version $Revision: 1.3 $ $Date: 2006/06/06 20:46:41 $
  */
 @SuppressWarnings("serial")
-public class SimulationManagerModel extends UnicastRemoteObject 
-    implements SimulationManagerInterface {
-    
-    /** Error Logger. */
+public class SimulationManagerModel extends UnicastRemoteObject
+        implements SimulationManagerInterface
+{
+
+    /**
+     * Error Logger.
+     */
     private Logger simManagerLogger = Logger.getLogger("tmcsim.simulationmanager");
-    
-    /** RMI interface for communication with the remote Coordinator. */ 
+    /**
+     * RMI interface for communication with the remote Coordinator.
+     */
     private static CoordinatorInterface theCoorInt;
-    
-    /** The SimulationManagerView object. */
-    private SimulationManagerView theSimManagerView;    
-    
-
-    /**
-     * Constructor.  Establishes the RMI communication with the Coordinator.
-     *
-     * @param hostname Host name of the CAD Simulator.    
-     * @param portNumber Port number of the CAD Simulator RMI communication. 
+    /**
+     * The SimulationManagerView object.
+     */
+    private SimulationManagerView theSimManagerView;
+
+    /**
+     * Constructor. Establishes the RMI communication with the Coordinator.
+     *
+     * @param hostname Host name of the CAD Simulator.
+     * @param portNumber Port number of the CAD Simulator RMI communication.
      * @throws RemoteException if error in RMI communication
-     * @throws SimulationException if there is an error in registering RMI methods.
-     */
-    public SimulationManagerModel(String hostname, String portNumber) 
-            throws RemoteException, SimulationException {
-        super();                                
-                                        
+     * @throws SimulationException if there is an error in registering RMI
+     * methods.
+     */
+    public SimulationManagerModel(String hostname, String portNumber)
+            throws RemoteException, SimulationException
+    {
+        super();
+
         connect(hostname, portNumber);
-    }       
-    
+    }
+
     /**
      * Connect to the Coordinator's RMI object, and register this object for
      * callback with the Coordinator.
-     * @param hostname Host name of the CAD Simulator.    
-     * @param portNumber Port number of the CAD Simulator RMI communication. 
-     * @throws SimulationException if there is an error creating the RMI connection.
-     */ 
-    protected void connect(String hostname, String portNumber) 
-        throws SimulationException {
-        
+     *
+     * @param hostname Host name of the CAD Simulator.
+     * @param portNumber Port number of the CAD Simulator RMI communication.
+     * @throws SimulationException if there is an error creating the RMI
+     * connection.
+     */
+    protected void connect(String hostname, String portNumber)
+            throws SimulationException
+    {
+
         String coorIntURL = "";
-        
-        try {  
-            coorIntURL = "rmi://" + hostname + ":" + portNumber + "/coordinator"; 
-            
-            theCoorInt = (CoordinatorInterface)Naming.lookup(coorIntURL);
-            theCoorInt.registerForCallback(this);           
-            
-        }
-        catch (Exception e) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "establishRMIConnection", "Unable to establish RMI " +
-                    "communication with the CAD Simulator.  URL <" + coorIntURL + ">", e);
-            
+
+        try
+        {
+            coorIntURL = "rmi://" + hostname + ":" + portNumber + "/coordinator";
+
+            theCoorInt = (CoordinatorInterface) Naming.lookup(coorIntURL);
+            theCoorInt.registerForCallback(this);
+
+        } catch (Exception e)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "establishRMIConnection", "Unable to establish RMI "
+                    + "communication with the CAD Simulator.  URL <" + coorIntURL + ">", e);
+
             throw new SimulationException(SimulationException.CAD_SIM_CONNECT, e);
-        }   
-    }
-    
-    /**
-     * This method unregisters this SimulationManager from the Coordinator and closes
-     * the RMI communication.
-     */
-    public void disconnect() {
-        try {
+        }
+    }
+
+    /**
+     * This method unregisters this SimulationManager from the Coordinator and
+     * closes the RMI communication.
+     */
+    public void disconnect()
+    {
+        try
+        {
             theCoorInt.unregisterForCallback(this);
             theCoorInt = null;
-        }
-        catch (Exception e) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "closeSimManager", "Exception in unregistering Simulation" +
-                    "Manager from the CAD Simulator.", e);
-        }
-    }
-    
-    /**
-     * Set the local reference to the SimulationManagerView object.  The view
-     * is updated with the current simulation time, script status, and Paramics
-     * connection status. 
+        } catch (Exception e)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "closeSimManager", "Exception in unregistering Simulation"
+                    + "Manager from the CAD Simulator.", e);
+        }
+    }
+
+    /**
+     * Set the local reference to the SimulationManagerView object. The view is
+     * updated with the current simulation time, script status, and Paramics
+     * connection status.
      *
      * @param newView The instance of the SimulationManagerView class.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public void setView(SimulationManagerView newView) throws SimulationException {
-        try {
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void setView(SimulationManagerView newView) throws SimulationException
+    {
+        try
+        {
             theSimManagerView = newView;
-            
-            theSimManagerView.tick(theCoorInt.getCurrentSimulationTime());  
+
+            theSimManagerView.tick(theCoorInt.getCurrentSimulationTime());
             theSimManagerView.setScriptStatus(theCoorInt.getScriptStatus());
             theSimManagerView.setParamicsStatus(theCoorInt.getParamicsStatus());
-            
+
             initialize();
-        }
-        catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "startSimulation", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }   
-        
-    }   
-    
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "startSimulation", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+
+    }
+
     /**
      * This method initializes the SimulationManager with all current simulation
-     * data from the Coordinator.  If the simulation is running when the Simulation
-     * Manager is initialized, all previously occured incidents, events, and current
-     * diversion must be displayed.  This method first loads the list of current
-     * incidents from the coordinator, then the triggered events, followed by 
-     * all CMSInfo objects.  The SimulationManagerView is notified of any current
-     * diversions within the CMSInfo objects.  
-     * 
-     * @throws SimulationException if there is an error in RMI communication or if the 
-     *         SimulationManagerView reference has not been set.
-     */
-    protected void initialize() throws SimulationException {
-        
-        try {
-        
+     * data from the Coordinator. If the simulation is running when the
+     * Simulation Manager is initialized, all previously occured incidents,
+     * events, and current diversion must be displayed. This method first loads
+     * the list of current incidents from the coordinator, then the triggered
+     * events, followed by all CMSInfo objects. The SimulationManagerView is
+     * notified of any current diversions within the CMSInfo objects.
+     *
+     * @throws SimulationException if there is an error in RMI communication or
+     * if the SimulationManagerView reference has not been set.
+     */
+    protected void initialize() throws SimulationException
+    {
+
+        try
+        {
+
             //Load all incidents from Coordinator
-            loadIncidents(); 
-            
+            loadIncidents();
+
             //Load all triggered incidents from Coordinator
             TreeMap<Integer, Vector<IncidentEvent>> tempEvents = theCoorInt.getTriggeredEvents();
-            for(Integer key : tempEvents.keySet())  {           
-                for(IncidentEvent ie : tempEvents.get(key)) 
-                    eventOccured(key, ie);           
-            }           
-                  
+            for (Integer key : tempEvents.keySet())
+            {
+                for (IncidentEvent ie : tempEvents.get(key))
+                {
+                    eventOccured(key, ie);
+                }
+            }
+
             //Load all current diversions from the Coordinator
             TreeSet<String> cmsIDs = theCoorInt.getCMSIDs();
-            CMSInfo cmsinfo  = null;
-            for(String cms_id : cmsIDs) {
+            CMSInfo cmsinfo = null;
+            for (String cms_id : cmsIDs)
+            {
                 cmsinfo = theCoorInt.getCMSDiversionInfo(cms_id);
-                
-                for(CMSDiversion div : cmsinfo.possibleDiversions) {
-                    if(div.getCurrDiv() != 0) {                     
+
+                for (CMSDiversion div : cmsinfo.possibleDiversions)
+                {
+                    if (div.getCurrDiv() != 0)
+                    {
                         theSimManagerView.addDiversion(cmsinfo, div);
-                    }       
+                    }
                 }
-            }   
-            
+            }
+
             //Send the list of CMS IDs to the View.
             theSimManagerView.setCMS_IDList(cmsIDs.toArray());
-        }
-        catch (Exception e) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
+
+        } catch (Exception e)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
                     "initialize", "Unable to initialize the SimulationManager.", e);
-            
+
             throw new SimulationException(SimulationException.CAD_SIM_COMM, e);
-        }   
-    }
-
-    public void tick(long theTime) throws RemoteException {
-        if(theSimManagerView != null)
-            theSimManagerView.tick(theTime);    
-    }
-    
-    public void incidentAdded(Incident newIncident) throws RemoteException {
-        if(theSimManagerView != null) {
+        }
+    }
+
+    public void tick(long theTime) throws RemoteException
+    {
+        if (theSimManagerView != null)
+        {
+            theSimManagerView.tick(theTime);
+        }
+    }
+
+    public void incidentAdded(Incident newIncident) throws RemoteException
+    {
+        if (theSimManagerView != null)
+        {
             Integer logNum = new Integer(newIncident.getLogNumber());
-            
-            theSimManagerView.addIncident(newIncident);         
+
+            theSimManagerView.addIncident(newIncident);
             theSimManagerView.addIncidentTab(logNum);
         }
     }
 
-    public void incidentStarted(Integer logNumber) throws RemoteException {
-        if(theSimManagerView != null) {
+    public void incidentStarted(Integer logNumber) throws RemoteException
+    {
+        if (theSimManagerView != null)
+        {
             theSimManagerView.startIncident(logNumber);
         }
     }
 
-    public void incidentRemoved(Integer logNumber) throws RemoteException {
-        if(theSimManagerView != null) {
+    public void incidentRemoved(Integer logNumber) throws RemoteException
+    {
+        if (theSimManagerView != null)
+        {
             theSimManagerView.removeIncident(logNumber);
             theSimManagerView.removeIncidentTab(logNumber);
         }
     }
-    
-    public void eventOccured(Integer logNumber, IncidentEvent theEvent) throws RemoteException {
-        if(theSimManagerView != null) {
+
+    public void eventOccured(Integer logNumber, IncidentEvent theEvent) throws RemoteException
+    {
+        if (theSimManagerView != null)
+        {
             theSimManagerView.addIncidentEvent(logNumber, theEvent);
         }
     }
-    
-    public void setScriptStatus(SCRIPT_STATUS newStatus) throws RemoteException {
-        if(theSimManagerView != null)
-            theSimManagerView.setScriptStatus(newStatus);       
-    }
-
-    public void setParamicsStatus(PARAMICS_STATUS newStatus) throws RemoteException {
-        if(theSimManagerView != null)
-            theSimManagerView.setParamicsStatus(newStatus);     
-        
-    }
-    
-    /**
-     * This method passes the view's request to start the simulation 
-     * on to the remote coordinator.
+
+    public void setScriptStatus(SCRIPT_STATUS newStatus) throws RemoteException
+    {
+        if (theSimManagerView != null)
+        {
+            theSimManagerView.setScriptStatus(newStatus);
+        }
+    }
+
+    public void setParamicsStatus(PARAMICS_STATUS newStatus) throws RemoteException
+    {
+        if (theSimManagerView != null)
+        {
+            theSimManagerView.setParamicsStatus(newStatus);
+        }
+
+    }
+
+    /**
+     * This method passes the view's request to start the simulation on to the
+     * remote coordinator.
      *
      * @throws ScriptException if an error occurs in started the simulation.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */  
-    public void startSimulation() throws ScriptException, SimulationException {
-
-        try {
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void startSimulation() throws ScriptException, SimulationException
+    {
+
+        try
+        {
             theCoorInt.startSimulation();
-        }
-        catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "startSimulation", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }   
-
-    }
-    
-    /**
-     * This method passes the view's request to reset the simulation 
-     * on to the remote coordinator.  The View's simulation time is reset to 0.
-     * The view's incident tabs are cleared and incident list reset and initialized
-     * with the current list of incidents.  The list of diversions is also reset.
-     * 
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public void resetSimulation() throws SimulationException {      
-
-        try {
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "startSimulation", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+
+    }
+
+    /**
+     * This method passes the view's request to reset the simulation on to the
+     * remote coordinator. The View's simulation time is reset to 0. The view's
+     * incident tabs are cleared and incident list reset and initialized with
+     * the current list of incidents. The list of diversions is also reset.
+     *
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void resetSimulation() throws SimulationException
+    {
+
+        try
+        {
             theCoorInt.resetSimulation();
-            
+
             tick(0);
             theSimManagerView.resetIncidentTabs();
@@ -276,358 +324,412 @@
             theSimManagerView.resetDiversions();
 
-            loadIncidents(); 
-        }
-        catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "resetSimulation", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }   
-
-    }
-    
-    /**
-     * This method passes the view's request to pause the simulation 
-     * on to the remote coordinator.
-     *      
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public void pauseSimulation() throws SimulationException {
-
-        try {
+            loadIncidents();
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "resetSimulation", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+
+    }
+
+    /**
+     * This method passes the view's request to pause the simulation on to the
+     * remote coordinator.
+     *
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void pauseSimulation() throws SimulationException
+    {
+
+        try
+        {
             theCoorInt.pauseSimulation();
-         }
-        catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "pauseSimulation", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }   
-
-    }
-    
-    /**
-     * This method passes the view's request to goto a new simulation 
-     * time on to the remote coordinator.
-     * 
-     * @param time Simulation time 
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public void gotoSimulationTime(long time) throws SimulationException {
-        
-        try {
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "pauseSimulation", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+
+    }
+
+    /**
+     * This method passes the view's request to goto a new simulation time on to
+     * the remote coordinator.
+     *
+     * @param time Simulation time
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void gotoSimulationTime(long time) throws SimulationException
+    {
+
+        try
+        {
             theCoorInt.gotoSimulationTime(time);
-        }
-        catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "gotoSimulationTime", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }   
-    }
-    
-    /**
-     * This method passes the view's request to load a script file on to the 
-     * remote Coordinator.  If this is successful, the View's incident tabs 
-     * are cleared and incident list reset and initialized with the current 
-     * list of incidents.  If the load is not successful, the View's incident tabs
-     * and incident list are cleared.  The list of diversions is also reset.
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "gotoSimulationTime", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to load a script file on to the
+     * remote Coordinator. If this is successful, the View's incident tabs are
+     * cleared and incident list reset and initialized with the current list of
+     * incidents. If the load is not successful, the View's incident tabs and
+     * incident list are cleared. The list of diversions is also reset.
      *
      * @param scriptFile the File chosen by the user in the open file dialog.
      * @throws ScriptException if an error occurs in reading the script file.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public void loadScript(File scriptFile) throws ScriptException, SimulationException{    
-        
-        try {
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void loadScript(File scriptFile) throws ScriptException, SimulationException
+    {
+
+        try
+        {
             theCoorInt.loadScriptFile(scriptFile);
-            
+
             tick(0);
             theSimManagerView.resetIncidentTabs();
             theSimManagerView.resetIncidents();
             theSimManagerView.resetDiversions();
-            
+
             loadIncidents();
-         } 
-         catch(ScriptException se) {
+        } catch (ScriptException se)
+        {
             theSimManagerView.resetIncidentTabs();
             theSimManagerView.resetIncidents();
             theSimManagerView.resetDiversions();
             throw se;
-         }
-        catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "loadScript", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }           
-    }
-    
-     /**
-      * This method passes the view's request to create a connection between
-      * the CADSimulator and the Paramics Communicator on to the remote Coordinator. 
-      *
-      * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-      */
-     public void connectToParamics() throws SimulationException {
-
-        try {
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "loadScript", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to create a connection between the
+     * CADSimulator and the Paramics Communicator on to the remote Coordinator.
+     *
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void connectToParamics() throws SimulationException
+    {
+
+        try
+        {
             theCoorInt.connectToParamics();
-        } 
-        catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "connectToParamics", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-     }
-     
-     /** 
-      * This method passes the view's request to drop the connection between
-      * the CADSimulator and the Paramics Communicator on to the
-      * remote Coordinator. 
-      *
-      * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-      */
-     public void disconnectFromParamics() throws SimulationException { 
-
-        try {
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "connectToParamics", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to drop the connection between the
+     * CADSimulator and the Paramics Communicator on to the remote Coordinator.
+     *
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void disconnectFromParamics() throws SimulationException
+    {
+
+        try
+        {
             theCoorInt.disconnectFromParamics();
-        } 
-        catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "disconnectFromParamics", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-     }
-     
-     /**
-      * This method passes the view's request to load a paramics
-      * network on to the remote Coordinator. 
-      *
-      * @param networkID The unique network ID that is being loaded
-      *
-      * @throws ScriptException if there is an error in loading the network
-      * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-      */
-     public void loadParamicsNetwork(int networkID) throws ScriptException, SimulationException {
-        try {
-             theCoorInt.loadParamicsNetwork(networkID);         
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "loadParamicsNetwork", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-     }
-         
-     /**
-      * This method passes the view's request to get the value of the
-      * currently loaded paramics network on to the remote Coordinator.
-      * 
-      * @return Value of the loaded paramics network.  
-      * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-      */
-     public int getParamicsNetworkLoaded() throws SimulationException {
-         try {
-            return theCoorInt.getParamicsNetworkLoaded();           
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "getParamicsNetworkLoaded", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-     }
-    
-    /**
-     * This method passes the view's request to trigger an incident 
-     * on to the remote Coordinator.
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "disconnectFromParamics", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to load a paramics network on to
+     * the remote Coordinator.
+     *
+     * @param networkID The unique network ID that is being loaded
+     *
+     * @throws ScriptException if there is an error in loading the network
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void loadParamicsNetwork(int networkID) throws ScriptException, SimulationException
+    {
+        try
+        {
+            theCoorInt.loadParamicsNetwork(networkID);
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "loadParamicsNetwork", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to get the value of the currently
+     * loaded paramics network on to the remote Coordinator.
+     *
+     * @return Value of the loaded paramics network.
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public int getParamicsNetworkLoaded() throws SimulationException
+    {
+        try
+        {
+            return theCoorInt.getParamicsNetworkLoaded();
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "getParamicsNetworkLoaded", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to trigger an incident on to the
+     * remote Coordinator.
      *
      * @throws ScriptException if an error occurs in triggering an event.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public void triggerIncident(int logNumber) throws ScriptException, SimulationException {
-        try {
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void triggerIncident(int logNumber) throws ScriptException, SimulationException
+    {
+        try
+        {
             theCoorInt.triggerIncident(logNumber);
-            
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "startIncident", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-    }
-
-     /**
-      * This method passes the view's request to add an incident into the 
-      * simulation on to the remote Coordinator.
-      *
-      * @param newIncident Incident to add to the simulation
-      * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-      */
-     public void addIncident(final Incident newIncident) throws SimulationException {       
-
-        try {
+
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "startIncident", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to add an incident into the
+     * simulation on to the remote Coordinator.
+     *
+     * @param newIncident Incident to add to the simulation
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void addIncident(final Incident newIncident) throws SimulationException
+    {
+
+        try
+        {
             theCoorInt.addIncident(newIncident);
-    
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "addIncident", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }       
-
-    }
-    
-    /**
-     * This method passes the view's request to delete an incident from the 
+
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "addIncident", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+
+    }
+
+    /**
+     * This method passes the view's request to delete an incident from the
      * simulation on to the remote Coordinator.
      *
      * @throws ScriptException if an error occurs in deleting an event.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public void deleteIncident(int logNumber) throws ScriptException, SimulationException {
-
-        try {
-            theCoorInt.deleteIncident(logNumber);   
-    
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "deleteIncident", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }       
-    }   
-    
-    
-    /**
-     * This method passes the view's request to reschedule an incident on to 
-     * the remote Coordinator.
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void deleteIncident(int logNumber) throws ScriptException, SimulationException
+    {
+
+        try
+        {
+            theCoorInt.deleteIncident(logNumber);
+
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "deleteIncident", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to reschedule an incident on to the
+     * remote Coordinator.
      *
      * @param newTime New simulation time (in seconds).
-     * @throws ScriptException if the Incident has already started or the time for 
-     *         recheduling has already passed.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-     public void rescheduleIncident(long newTime, int logNumber) throws ScriptException, SimulationException {
-            
-        try {
+     * @throws ScriptException if the Incident has already started or the time
+     * for recheduling has already passed.
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void rescheduleIncident(long newTime, int logNumber) throws ScriptException, SimulationException
+    {
+
+        try
+        {
             theCoorInt.rescheduleIncident(logNumber, newTime);
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "rescheduleIncident", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }               
-     }
-     
-    /**
-     * This method passes the view's request to get the current list of 
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "rescheduleIncident", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to get the current list of
      * Incidents loaded into the simulation on to the remote Coordinator.
      *
      * @return Vector The Vector of currently loaded incidents.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public Vector<Incident> getIncidentList() throws SimulationException {
-
-        try {
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public Vector<Incident> getIncidentList() throws SimulationException
+    {
+
+        try
+        {
             return theCoorInt.getIncidentList();
-            
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "getIncidentList", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-    }    
-             
-    /**
-     * This method passes the view's request to get the CMSInfo object 
-     * that corresponds to a unique CMS ID String on to the remote Coordinator.
-     * 
+
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "getIncidentList", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to get the CMSInfo object that
+     * corresponds to a unique CMS ID String on to the remote Coordinator.
+     *
      * @param cms_id Unique CMS ID String.
      * @return CMSInfo object corresponding to the parameter CMS id.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public CMSInfo getCMSDiversionInfo(String cms_id) throws SimulationException {
-        
-        try {
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public CMSInfo getCMSDiversionInfo(String cms_id) throws SimulationException
+    {
+
+        try
+        {
             return theCoorInt.getCMSDiversionInfo(cms_id);
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "getCMSDiversionInfo", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-    }
-     
-    /**
-     * This method passes the view's request to update diversions for a
-     * CMS on to the remote Coordinator.
-     * 
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "getCMSDiversionInfo", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method passes the view's request to update diversions for a CMS on
+     * to the remote Coordinator.
+     *
      * @param diversion CMS diversions information to apply.
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */
-    public void applyDiversions(CMSInfo diversion) throws SimulationException {
-        
-        try {
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    public void applyDiversions(CMSInfo diversion) throws SimulationException
+    {
+
+        try
+        {
             theCoorInt.applyDiversions(diversion);
 
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "applyDiversions", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-    }
-    
-    /**
-     * This method loads the current list of incidents from the Coordinator into the
-     * SimulationManager.  For each incident in the simulation, notify the view to
-     * add a new incident tab.  If the Incident has begun in the simulation, 
-     * call the incidentStarted() method to update the view accordingly.
-     * 
-     * @throws SimulationException if there is an error in RMI communication to the CAD Simulator.
-     */ 
-    private void loadIncidents() throws SimulationException {       
-        
-        try {           
-            for(Incident inc : theCoorInt.getIncidentList()) {
-    
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "applyDiversions", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+    }
+
+    /**
+     * This method loads the current list of incidents from the Coordinator into
+     * the SimulationManager. For each incident in the simulation, notify the
+     * view to add a new incident tab. If the Incident has begun in the
+     * simulation, call the incidentStarted() method to update the view
+     * accordingly.
+     *
+     * @throws SimulationException if there is an error in RMI communication to
+     * the CAD Simulator.
+     */
+    private void loadIncidents() throws SimulationException
+    {
+
+        try
+        {
+            for (Incident inc : theCoorInt.getIncidentList())
+            {
+
                 Integer logNum = new Integer(inc.getLogNumber());
-                
+
                 theSimManagerView.addIncidentTab(logNum);
                 theSimManagerView.addIncident(inc);
-            
-                if(inc.getSecondsToStart() < theCoorInt.getCurrentSimulationTime()) {
+
+                if (inc.getSecondsToStart() < theCoorInt.getCurrentSimulationTime())
+                {
                     incidentStarted(logNum);
                 }
             }
-        } catch (RemoteException re) {
-            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel", 
-                    "loadIncidentListTable", "Unable to communicate with the " +
-                    "CAD Simulator.", re);
-            
-            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
-        }
-        
-    }
-    
-
+        } catch (RemoteException re)
+        {
+            simManagerLogger.logp(Level.SEVERE, "SimulationManagerModel",
+                    "loadIncidentListTable", "Unable to communicate with the "
+                    + "CAD Simulator.", re);
+
+            throw new SimulationException(SimulationException.CAD_SIM_COMM, re);
+        }
+
+    }
 }
Index: trunk/src/tmcsim/simulationmanager/actions/LoadScriptAction.java
===================================================================
--- trunk/src/tmcsim/simulationmanager/actions/LoadScriptAction.java	(revision 2)
+++ trunk/src/tmcsim/simulationmanager/actions/LoadScriptAction.java	(revision 6)
@@ -54,4 +54,5 @@
                     try{ 
                         theSimManagerView.getModel().loadScript(selectedFile);
+                        theSimManagerView.setTitle("Simulation Manager: " + selectedFile.getName());
                     }
                     catch (ScriptException se) {
Index: trunk/src/tmcsim/paramicscommunicator/ParamicsCommunicator.java
===================================================================
--- trunk/src/tmcsim/paramicscommunicator/ParamicsCommunicator.java	(revision 2)
+++ trunk/src/tmcsim/paramicscommunicator/ParamicsCommunicator.java	(revision 6)
@@ -17,14 +17,10 @@
 import java.util.Properties;
 import java.util.TreeMap;
-import java.util.logging.FileHandler;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import javax.swing.JOptionPane;
 import javax.swing.UIManager;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
-
 import tmcsim.common.CADProtocol.PARAMICS_ACTIONS;
 import tmcsim.common.CADProtocol.PARAMICS_COMM_TAGS;
@@ -32,100 +28,112 @@
 import tmcsim.paramicscommunicator.FileRegUpdate.REG_TYPE;
 import tmcsim.paramicscommunicator.gui.ParamicsCommunicatorGUI;
-import tmcsim.simulationmanager.SimulationManager;
-
 
 /**
- * ParamicsCommunicator is the main class for this module.  The Paramics 
- * Communicator is used to provide communication between the CAD Simulator
- * and the Paramics traffic modeler.  While the application is running, data 
- * is received on a socket from the CAD Simulator.  Transmitted data are
- * XML documents containing information and action commands. The CAD Simulator 
- * registers readers and writers with the ParamicsCommunicator.  Any data read 
- * by a ParamicsReader is sent back to the CAD Simulator.  All data to be 
- * written by a ParamicsWriter is received through the socket.<br><br>  
- * The properties file for the ParamicsCommunicator class contains the following data.<br>
+ * ParamicsCommunicator is the main class for this module. The Paramics
+ * Communicator is used to provide communication between the CAD Simulator and
+ * the Paramics traffic modeler. While the application is running, data is
+ * received on a socket from the CAD Simulator. Transmitted data are XML
+ * documents containing information and action commands. The CAD Simulator
+ * registers readers and writers with the ParamicsCommunicator. Any data read by
+ * a ParamicsReader is sent back to the CAD Simulator. All data to be written by
+ * a ParamicsWriter is received through the socket.<br><br>
+ * The properties file for the ParamicsCommunicator class contains the following
+ * data.<br>
  * <code>
  * -----------------------------------------------------------------------------<br>
- * Socket Port          The port number to use for socket communication.<br>
- * Working Directory    The working directory use for Paramics file communication.<br>
- * Error File           The target file to use for error logging.<br>
+ * Socket Port The port number to use for socket communication.<br>
+ * Working Directory The working directory use for Paramics file
+ * communication.<br>
+ * Error File The target file to use for error logging.<br>
  * -----------------------------------------------------------------------------<br>
  * Example File: <br>
- * SocketPort          = 4450 <br>
- * WorkingDirectory    = c:\\tmc_simulator\\ <br>
- * ErrorFile           = sim_mgr_error.xml <br>
+ * SocketPort = 4450 <br>
+ * WorkingDirectory = c:\\tmc_simulator\\ <br>
+ * ErrorFile = sim_mgr_error.xml <br>
  * -----------------------------------------------------------------------------<br>
  * </code>
  *
  * @author Matthew Cechini (mcechini@calpoly.edu)
- * @version $Date: 2009/04/17 16:27:46 $ $Revision: 1.7 
+ * @version $Date: 2009/04/17 16:27:46 $ $Revision: 1.7
  */
-public class ParamicsCommunicator extends Observable implements Observer, Runnable {
-
-    /** Error logger. */
+public class ParamicsCommunicator extends Observable implements Observer, Runnable
+{
+
+    /**
+     * Error logger.
+     */
     private static Logger paramLogger = Logger.getLogger("tmcsim.paramicscommunicator");
-    
+
     /**
      * Enumeration containing property names.
+     *
      * @author Matthew Cechini
      */
-    private static enum PROPERTIES {
-        
-        SOCKET_PORT ("SocketPort"),
-        WORKING_DIR ("WorkingDirectory");       
-        
+    private static enum PROPERTIES
+    {
+
+        SOCKET_PORT("SocketPort"),
+        WORKING_DIR("WorkingDirectory");
         public String name;
-        
-        private PROPERTIES(String n) {
+
+        private PROPERTIES(String n)
+        {
             name = n;
         }
     }
-    
-        
-    /** Properties object. */
-    private Properties paramicsCommProp = null; 
-    
-    /** Current working directory where files will be read and written */
+    /**
+     * Properties object.
+     */
+    private Properties paramicsCommProp = null;
+    /**
+     * Current working directory where files will be read and written
+     */
     private String workingDirectory = null;
-    
-    /** Socket used to create socket communication with the CAD Simulator.  */
+    /**
+     * Socket used to create socket communication with the CAD Simulator.
+     */
     private ServerSocket serverSocket = null;
-    
-    /** Soccket used to communicate with CAD Simulator.*/
-    private Socket paramicsSocket = null;   
-    
-    /** Input Stream for reading data from the CAD Simulator. */
+    /**
+     * Soccket used to communicate with CAD Simulator.
+     */
+    private Socket paramicsSocket = null;
+    /**
+     * Input Stream for reading data from the CAD Simulator.
+     */
     private ObjectInputStream in = null;
-    
-    /** Output Stream for writing data to the CAD Simulator.  */
+    /**
+     * Output Stream for writing data to the CAD Simulator.
+     */
     private ObjectOutputStream out = null;
-    
-    /** Map of all current ParamicsFileWriters referenced by I/O ID. */
+    /**
+     * Map of all current ParamicsFileWriters referenced by I/O ID.
+     */
     private TreeMap<String, ParamicsFileWriter> writers = null;
-    
-    /** Map of all current ParamicsFileReaders referenced by I/O ID.  */
+    /**
+     * Map of all current ParamicsFileReaders referenced by I/O ID.
+     */
     private TreeMap<String, ParamicsFileReader> readers = null;
-    
-    /** The view class for the ParamicsCommunicator. */
+    /**
+     * The view class for the ParamicsCommunicator.
+     */
     private ParamicsCommunicatorGUI theGUI;
-    
-    /**
-     * Constructor.  Read in the property values.  If the properties file 
-     * does not contain a value for the working directory, open a dialog
-     * to prompt the user for the path of the Paramics working directory.
-     * An empty string is not accepted.  A null signifies that the user
-     * pressed cancel.  Prompt the user to accept the cancel and exit the
-     * application if confirmed.  Continue until a valid directory has been
-     * entered, that exists, and append a '\' to the end of the directory
-     * if necessary.
-     * 
-     * Initialize the Sockets
-     * and begin communication.
-     *
-     * @param propertiesFilePath File Path of ParamicsCommunicator properties file.
-     */
-    public ParamicsCommunicator (String propertiesFile) 
-    {
-        
+
+    /**
+     * Constructor. Read in the property values. If the properties file does not
+     * contain a value for the working directory, open a dialog to prompt the
+     * user for the path of the Paramics working directory. An empty string is
+     * not accepted. A null signifies that the user pressed cancel. Prompt the
+     * user to accept the cancel and exit the application if confirmed. Continue
+     * until a valid directory has been entered, that exists, and append a '\'
+     * to the end of the directory if necessary.
+     *
+     * Initialize the Sockets and begin communication.
+     *
+     * @param propertiesFilePath File Path of ParamicsCommunicator properties
+     * file.
+     */
+    public ParamicsCommunicator(String propertiesFile)
+    {
+
         writers = new TreeMap<String, ParamicsFileWriter>();
         readers = new TreeMap<String, ParamicsFileReader>();
@@ -133,90 +141,123 @@
         theGUI = new ParamicsCommunicatorGUI();
         addObserver(theGUI);
-        theGUI.addWindowListener(new WindowListener() {         
-            public void windowActivated(WindowEvent arg0) {};
-            public void windowClosed(WindowEvent arg0) {};
-            public void windowClosing(WindowEvent arg0) {
+        theGUI.addWindowListener(new WindowListener()
+        {
+            public void windowActivated(WindowEvent arg0)
+            {
+            }
+
+            ;
+            public void windowClosed(WindowEvent arg0)
+            {
+            }
+
+            ;
+            public void windowClosing(WindowEvent arg0)
+            {
                 System.exit(0);
             }
-            public void windowDeactivated(WindowEvent arg0) {};
-            public void windowDeiconified(WindowEvent arg0) {};
-            public void windowIconified(WindowEvent arg0) {};
-            public void windowOpened(WindowEvent arg0) {};
+
+            public void windowDeactivated(WindowEvent arg0)
+            {
+            }
+
+            ;
+            public void windowDeiconified(WindowEvent arg0)
+            {
+            }
+
+            ;
+            public void windowIconified(WindowEvent arg0)
+            {
+            }
+
+            ;
+            public void windowOpened(WindowEvent arg0)
+            {
+            }
+        ;
         });
-        
-        try {
+
+        try
+        {
             paramicsCommProp = new Properties();
             paramicsCommProp.load(new FileInputStream(propertiesFile));
-            
-            if(paramicsCommProp.getProperty(PROPERTIES.SOCKET_PORT.name) == null) 
-            {
-                JOptionPane.showMessageDialog(theGUI, 
-                        "Properties file missing CAD Simulator Port information.", 
+
+            if (paramicsCommProp.getProperty(PROPERTIES.SOCKET_PORT.name) == null)
+            {
+                JOptionPane.showMessageDialog(theGUI,
+                        "Properties file missing CAD Simulator Port information.",
                         "Invalid Configuration", JOptionPane.ERROR_MESSAGE);
                 System.exit(0);
-            }
-            else if(paramicsCommProp.getProperty(PROPERTIES.WORKING_DIR.name) == null || 
-                    paramicsCommProp.getProperty(PROPERTIES.WORKING_DIR.name).length() == 0) {
-                
-                try {
+            } else if (paramicsCommProp.getProperty(PROPERTIES.WORKING_DIR.name) == null
+                    || paramicsCommProp.getProperty(PROPERTIES.WORKING_DIR.name).length() == 0)
+            {
+
+                try
+                {
                     String workingDir = null;
-                    
-                    while (workingDir == null || workingDir.length() == 0) {                        
+
+                    while (workingDir == null || workingDir.length() == 0)
+                    {
                         workingDir = JOptionPane.showInputDialog(null,
                                 "Please set the output directory for Paramics communication.",
                                 "Paramics Working Directory", JOptionPane.QUESTION_MESSAGE);
-                        
-                        if(workingDir == null) {
-                            
-                        }
-                        else if(!new File(workingDir).exists()) {
+
+                        if (workingDir == null)
+                        {
+                        } else if (!new File(workingDir).exists())
+                        {
                             JOptionPane.showMessageDialog(null,
                                     "Directory does not exist.",
                                     "Invalid Working Directory", JOptionPane.WARNING_MESSAGE);
-                            
+
                             workingDir = null;
-                        }
-                        else if(!new File(workingDir).isDirectory()) {
+                        } else if (!new File(workingDir).isDirectory())
+                        {
                             JOptionPane.showMessageDialog(null,
                                     workingDir + " is not a directory.",
                                     "Invalid Working Directory", JOptionPane.WARNING_MESSAGE);
-                            
+
                             workingDir = null;
-                        }                       
+                        }
                     }
 
-                    if(workingDir.lastIndexOf("\\") != workingDir.length()-1) {
+                    if (workingDir.lastIndexOf("\\") != workingDir.length() - 1)
+                    {
                         workingDir = workingDir + "\\";
                     }
-                    
-                    paramicsCommProp.setProperty(PROPERTIES.WORKING_DIR.name, workingDir);      
+
+                    paramicsCommProp.setProperty(PROPERTIES.WORKING_DIR.name, workingDir);
                     paramicsCommProp.store(new FileOutputStream(propertiesFile), "");
-                } catch (IOException ioe) {
-                    paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Constructor", 
+                } catch (IOException ioe)
+                {
+                    paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Constructor",
                             "Exception in writing properties file.", ioe);
                 }
-                
+
             }
 
             workingDirectory = paramicsCommProp.getProperty(
-                    PROPERTIES.WORKING_DIR.name).trim();                    
-
-        } catch (Exception e) {
-            paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Constructor", 
+                    PROPERTIES.WORKING_DIR.name).trim();
+
+        } catch (Exception e)
+        {
+            paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Constructor",
                     "Exception in reading properties file.", e);
         }
-        
-        
-        try {
+
+
+        try
+        {
             initializeSockets(Integer.parseInt(paramicsCommProp.getProperty(
                     PROPERTIES.SOCKET_PORT.name).trim()));
-        }
-        catch (Exception e) {
-            paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Constructor", 
+        } catch (Exception e)
+        {
+            paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Constructor",
                     "Exception in initializing sockets.", e);
         }
 
     }
-    
+
     /**
      * Transmits a message XML document object to the CAD Simulator.
@@ -224,108 +265,139 @@
      * @param mess The ParamicsCommMessage to be transmitted.
      */
-    private void write(Document mess) {
-        
-        synchronized(paramicsSocket) {
-            try {
+    private void write(Document mess)
+    {
+
+        synchronized (paramicsSocket)
+        {
+            try
+            {
                 out.writeObject(mess);
                 out.flush();
-            }
-            catch (Exception e) {
-                paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "write", 
+            } catch (Exception e)
+            {
+                paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "write",
                         "Exception in writing to the socket.", e);
             }
         }
     }
-    
-    /**
-     * Observer/Observable update method.  The Paramics Communicator observers
-     * registered ParamicsReaders.  When messages are to be sent, they are sent
-     * through this method.  All messages are ParamicsCommMessage objects.  Send 
+
+    /**
+     * Observer/Observable update method. The Paramics Communicator observers
+     * registered ParamicsReaders. When messages are to be sent, they are sent
+     * through this method. All messages are ParamicsCommMessage objects. Send
      * these messages to the write() method for transmission on the socket.
      */
-    public void update(Observable o, Object arg) {      
-
-        if(arg instanceof Document) {
-            write((Document)arg);               
-        }           
-    }
-    
-    /**
-     * Runnable method.  While this thread is not interrupted, read in an 
-     * object from the socket input stream.  If an object exists, call
-     * doMessage() to parse and perform the received action in the message.  
-     */
-    public void run() {
-        
-        while(true) {                       
-            try {
-                doMessage((Document)in.readObject());
-            } 
-            catch(SocketTimeoutException ste) {
+    public void update(Observable o, Object arg)
+    {
+
+        if (arg instanceof Document)
+        {
+            write((Document) arg);
+        }
+    }
+
+    /**
+     * Runnable method. While this thread is not interrupted, read in an object
+     * from the socket input stream. If an object exists, call doMessage() to
+     * parse and perform the received action in the message.
+     */
+    public void run()
+    {
+
+        while (true)
+        {
+            try
+            {
+                doMessage((Document) in.readObject());
+            } catch (SocketTimeoutException ste)
+            {
                 //just try again
-            }   
-            catch(EOFException eofe) {
-                paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", 
+            } catch (EOFException eofe)
+            {
+                paramLogger.logp(Level.SEVERE, "ParamicsCommunicator",
                         "run", "EOF Exception in reading data from the socket.", eofe);
-            }
-            catch(Exception e) {
-                paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", 
+            } catch (Exception e)
+            {
+                paramLogger.logp(Level.SEVERE, "ParamicsCommunicator",
                         "run", "Exception in reading data from the socket.", e);
 
-                JOptionPane.showMessageDialog(theGUI, 
-                        "Connection has been lost to the CAD Simulator.  " +
-                        "Paramics Communicator will now shutdown.", 
+                JOptionPane.showMessageDialog(theGUI,
+                        "Connection has been lost to the CAD Simulator.  "
+                        + "Paramics Communicator will now shutdown.",
                         "Dropped Connection", JOptionPane.ERROR_MESSAGE);
                 break;
-            }                   
-        }
-        
-        
-        try { in.close(); } catch (Exception e) {}
-        try { out.close(); } catch (Exception e) {}
-        try { serverSocket.close(); } catch (Exception e) {}
-        try { paramicsSocket.close(); } catch (Exception e) {}
-        
-    }
-    
+            }
+        }
+
+
+        try
+        {
+            in.close();
+        } catch (Exception e)
+        {
+        }
+        try
+        {
+            out.close();
+        } catch (Exception e)
+        {
+        }
+        try
+        {
+            serverSocket.close();
+        } catch (Exception e)
+        {
+        }
+        try
+        {
+            paramicsSocket.close();
+        } catch (Exception e)
+        {
+        }
+
+    }
+
     /**
      * Perform the action represented in the received XML document message.
-     * First determine if the action is from a READER, WRITER, and RESET.  
-     * If the paramics action is REGISTER, add a new ParamicsFileReader/Writer 
-     * to the local list of readers/writers and update the GUI with a 
-     * FileRegUpdate object. If the paramics action is UNREGISTER, remove the 
-     * ParamicsFileReader/Writer from the local list of readers/writers and update
-     * the GUI with a FileRegUpdate object.  If RESET is received, clear all 
-     * readers and writers. 
-     * 
+     * First determine if the action is from a READER, WRITER, and RESET. If the
+     * paramics action is REGISTER, add a new ParamicsFileReader/Writer to the
+     * local list of readers/writers and update the GUI with a FileRegUpdate
+     * object. If the paramics action is UNREGISTER, remove the
+     * ParamicsFileReader/Writer from the local list of readers/writers and
+     * update the GUI with a FileRegUpdate object. If RESET is received, clear
+     * all readers and writers.
+     *
      * @param mess Received XML document message.
      */
-    private void doMessage (Document mess) {
-        
+    private void doMessage(Document mess)
+    {
+
         Element rootElement = mess.getDocumentElement();
 
-        String id     = null;
+        String id = null;
         String action = null;
-        
-        switch(PARAMICS_COMM_TAGS.fromString(rootElement.getNodeName())) {
+
+        switch (PARAMICS_COMM_TAGS.fromString(rootElement.getNodeName()))
+        {
             case READER:
-                id     = rootElement.getAttribute(PARAMICS_COMM_TAGS.ID.tag);
+                id = rootElement.getAttribute(PARAMICS_COMM_TAGS.ID.tag);
                 action = rootElement.getAttribute(PARAMICS_COMM_TAGS.ACTION.tag);
-                
-                switch(PARAMICS_ACTIONS.fromString(action)) {
+
+                switch (PARAMICS_ACTIONS.fromString(action))
+                {
                     case REGISTER:
-                        Integer interval   = Integer.parseInt(rootElement.getChildNodes().item(0).getTextContent());
-                        String  targetFile = rootElement.getChildNodes().item(1).getTextContent();
-                        
-                        readers.put(id, new ParamicsFileReader(workingDirectory, id, 
+                        Integer interval = Integer.parseInt(rootElement.getChildNodes().item(0).getTextContent());
+                        String targetFile = rootElement.getChildNodes().item(1).getTextContent();
+
+                        readers.put(id, new ParamicsFileReader(workingDirectory, id,
                                 interval, targetFile));
                         readers.get(id).addObserver(this);
                         readers.get(id).addObserver(theGUI);
-                        
+
                         setChanged();
-                        notifyObservers(new FileRegUpdate(IO_TYPE.READ, 
+                        notifyObservers(new FileRegUpdate(IO_TYPE.READ,
                                 REG_TYPE.REGISTER, id, targetFile, interval));
                         break;
-                    case UNREGISTER: 
+                    case UNREGISTER:
                         readers.get(id).deleteObserver(this);
                         readers.get(id).deleteObserver(theGUI);
@@ -333,36 +405,37 @@
 
                         setChanged();
-                        notifyObservers(new FileRegUpdate(IO_TYPE.READ, 
-                                REG_TYPE.UNREGISTER, id, null, null));                      
+                        notifyObservers(new FileRegUpdate(IO_TYPE.READ,
+                                REG_TYPE.UNREGISTER, id, null, null));
                         break;
                 }
                 break;
             case WRITER:
-                id     = rootElement.getAttribute(PARAMICS_COMM_TAGS.ID.tag);
+                id = rootElement.getAttribute(PARAMICS_COMM_TAGS.ID.tag);
                 action = rootElement.getAttribute(PARAMICS_COMM_TAGS.ACTION.tag);
-                
-                switch(PARAMICS_ACTIONS.fromString(action)) {
+
+                switch (PARAMICS_ACTIONS.fromString(action))
+                {
                     case REGISTER:
-                        String targetFile = rootElement.getChildNodes().item(0).getTextContent(); 
-                        
-                        writers.put(id, new ParamicsFileWriter(id, 
+                        String targetFile = rootElement.getChildNodes().item(0).getTextContent();
+
+                        writers.put(id, new ParamicsFileWriter(id,
                                 workingDirectory, targetFile));
                         writers.get(id).addObserver(theGUI);
-                        
+
                         setChanged();
-                        notifyObservers(new FileRegUpdate(IO_TYPE.WRITE, 
-                                REG_TYPE.REGISTER, id, targetFile, null));      
+                        notifyObservers(new FileRegUpdate(IO_TYPE.WRITE,
+                                REG_TYPE.REGISTER, id, targetFile, null));
                         break;
-                    case UNREGISTER: 
+                    case UNREGISTER:
                         writers.remove(id);
-                        
+
                         writers.get(id).deleteObserver(theGUI);
 
                         setChanged();
-                        notifyObservers(new FileRegUpdate(IO_TYPE.WRITE, 
+                        notifyObservers(new FileRegUpdate(IO_TYPE.WRITE,
                                 REG_TYPE.UNREGISTER, id, null, null));
                         break;
                     case WRITE_FILE:
-                        writers.get(id).writeMessage((Element)rootElement.getChildNodes().item(0));
+                        writers.get(id).writeMessage((Element) rootElement.getChildNodes().item(0));
                         break;
                 }
@@ -372,91 +445,97 @@
                 writers.clear();
                 break;
-        }   
-    }
-    
-    /**
-     * Method waits to accept a socket connection from the CAD Simulator.  
-     * When a connection has been established the method exits.  The input and
-     * output streams are created on the new socket.
-     * 
-     * @param socketPort Socket port to use for establishing Socket communication.
-     * @throws IOException if there is an exception in establishing Socket communication.
-     */
-    private void initializeSockets(Integer socketPort) throws IOException {
-    
+        }
+    }
+
+    /**
+     * Method waits to accept a socket connection from the CAD Simulator. When a
+     * connection has been established the method exits. The input and output
+     * streams are created on the new socket.
+     *
+     * @param socketPort Socket port to use for establishing Socket
+     * communication.
+     * @throws IOException if there is an exception in establishing Socket
+     * communication.
+     */
+    private void initializeSockets(Integer socketPort) throws IOException
+    {
+
         boolean waiting = true;
-        
-        try {
-            serverSocket = new ServerSocket(socketPort);            
-            //delay for accept timeout(milliseconds)        
-            serverSocket.setSoTimeout(10 * 1000);  
-        }
-        catch (IOException ioe) {
-            throw new IOException("Exception in creating " +
-                    "the server socket on port " + socketPort);
-        }
-        
-        while(waiting) {            
-            try{
+
+        try
+        {
+            serverSocket = new ServerSocket(socketPort);
+            //delay for accept timeout(milliseconds)
+            serverSocket.setSoTimeout(10 * 1000);
+        } catch (IOException ioe)
+        {
+            throw new IOException("Exception in creating "
+                    + "the server socket on port " + socketPort);
+        }
+
+        while (waiting)
+        {
+            try
+            {
                 paramicsSocket = serverSocket.accept();
                 waiting = false;
-            } 
-            catch(SocketTimeoutException ste) {
+            } catch (SocketTimeoutException ste)
+            {
                 System.out.println("...waiting...");
-            }   
-            catch(IOException ioe) {
-                throw new IOException("Exception in creating " +
-                        "the receiving socket on port " + socketPort);
-            }
-        }
-
-        
+            } catch (IOException ioe)
+            {
+                throw new IOException("Exception in creating "
+                        + "the receiving socket on port " + socketPort);
+            }
+        }
+
+
         //** out must be performed before in to unlock for connecting socket **//
-        try {       
-            out     = new ObjectOutputStream(paramicsSocket.getOutputStream());
-            in      = new ObjectInputStream(paramicsSocket.getInputStream());
-        }
-        catch (IOException ioe) {
-            throw new IOException("Exception in creating input " +
-                    "and output streams on socket.");
-        }
-            
-    }
-
-    /**
-     * Construct the ParamicsCommunicator with the properties file path, 
-     * either from the command line arguments or default.
-     * 
+        try
+        {
+            out = new ObjectOutputStream(paramicsSocket.getOutputStream());
+            in = new ObjectInputStream(paramicsSocket.getInputStream());
+        } catch (IOException ioe)
+        {
+            throw new IOException("Exception in creating input "
+                    + "and output streams on socket.");
+        }
+
+    }
+
+    /**
+     * Construct the ParamicsCommunicator with the properties file path, either
+     * from the command line arguments or default.
+     *
      * @param args Command line arguments.
      */
-    public static void main(String[] args) {
-
-        try
-        {
-            if(System.getProperty("PARAMICS_COMM_PROPERTIES") != null)
+    public static void main(String[] args)
+    {
+        System.setProperty("PARAMICS_COMM_PROPERTIES", "config/paramics_communicator_config.properties");
+
+        try
+        {
+            if (System.getProperty("PARAMICS_COMM_PROPERTIES") != null)
             {
                 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-    
+
                 new Thread(new ParamicsCommunicator(System.getProperty(
                         "PARAMICS_COMM_PROPERTIES"))).start();
-            }
-            else
-            {
-                throw new Exception ("PARAMICS_COMM_PROPERTIES system property not defined.");
-            }
-        } 
-        catch (Exception e) 
-        {
-            paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Main", 
+            } else
+            {
+                throw new Exception("PARAMICS_COMM_PROPERTIES system property not defined.");
+            }
+        } catch (Exception e)
+        {
+            paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Main",
                     "Error occured initializing application", e);
 
-            JOptionPane.showMessageDialog(null, e.getMessage(), 
-                    "Error - Program Exiting", JOptionPane.ERROR_MESSAGE);  
-            
+            JOptionPane.showMessageDialog(null, e.getMessage(),
+                    "Error - Program Exiting", JOptionPane.ERROR_MESSAGE);
+
             System.exit(-1);
         }
-    
-        
-    }   
-    
+
+
+    }
 }
Index: trunk/src/tmcsim/paramicscommunicator/ParamicsFileReader.java
===================================================================
--- trunk/src/tmcsim/paramicscommunicator/ParamicsFileReader.java	(revision 2)
+++ trunk/src/tmcsim/paramicscommunicator/ParamicsFileReader.java	(revision 6)
@@ -10,87 +10,103 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import javax.xml.parsers.DocumentBuilderFactory;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
-
 import tmcsim.common.CADProtocol.PARAMICS_ACTIONS;
 import tmcsim.common.CADProtocol.PARAMICS_COMM_TAGS;
 import tmcsim.paramicscommunicator.FileIOUpdate.IO_TYPE;
 
-
 /**
- * The ParamicsFileReader handles reading fom a target file which
- * is written to by Paramics.  Once initialized, a timer task is
- * started which periodically checks the target file for updates.
- * If the file has been modified, it is read and cleared.  The read
- * data is transmitted to the CAD Simulator.
+ * The ParamicsFileReader handles reading fom a target file which is written to
+ * by Paramics. Once initialized, a timer task is started which periodically
+ * checks the target file for updates. If the file has been modified, it is read
+ * and cleared. The read data is transmitted to the CAD Simulator.
  *
  * @author Matthew Cechini
- * @version
+ * @version 0.1 Notes by jdalbey: Paramics modeler is licensed third-party
+ * software and apparently we don't have an SDK for it. So it seems the
+ * workaround was to communicate with it via data files that the modeler
+ * produces. Wacky, but it works for now. Look at the run() method below: if
+ * (lastModified &lt; inputFile.lastModified()) Means it's watching the file to
+ * see if it has been updated by the modeler.
  */
-public class ParamicsFileReader extends Observable {
-    
-    /** Error Logger. */
-    private Logger paramLogger = Logger.getLogger("tmcsim.paramicscommunicator");   
-    
-    /** FileReader ID used for creation of the ParamicsCommMessage */
+public class ParamicsFileReader extends Observable
+{
+
+    /**
+     * Error Logger.
+     */
+    private Logger paramLogger = Logger.getLogger("tmcsim.paramicscommunicator");
+    /**
+     * FileReader ID used for creation of the ParamicsCommMessage
+     */
     private String readerID = null;
-    
-    /** File reference to the file where data is read. */
+    /**
+     * File reference to the file where data is read.
+     */
     private File inputFile = null;
-    
-    /** FileReader used to read data from the input file. */
+    /**
+     * FileReader used to read data from the input file.
+     */
     private FileReader fileReader = null;
-    
-    /** FileWriter used to clear the input file. */
+    /**
+     * FileWriter used to clear the input file.
+     */
     private FileWriter fileWriter = null;
-    
-    /** Value (seconds since 1/1/1970) of input file's last modification time. */
+    /**
+     * Value (seconds since 1/1/1970) of input file's last modification time.
+     */
     private long lastModified = 0;
-    
-    /** Timer used to schedule file reading tasks. */
+    /**
+     * Timer used to schedule file reading tasks.
+     */
     private Timer readerTimer = null;
-    
-    /** 
-     * Duration (in seconds) that the TimerTask will be scheduled to
-     * read from the target file.
+    /**
+     * Duration (in seconds) that the TimerTask will be scheduled to read from
+     * the target file.
      */
     private long readerInterval;
-    
+
     /**
-     * A TimerTask to read from the target file.  If the file has been modified since
-     * last read, read the file and transmit the data to the CAD Simulator.
+     * A TimerTask to read from the target file. If the file has been modified
+     * since last read, read the file and transmit the data to the CAD
+     * Simulator.
+     *
      * @author Matthew Cechini
      */
-    private class ReaderTimerTask extends TimerTask {
-        public void run() {     
-            
-            if (lastModified < inputFile.lastModified()) {
-                                
-                try {
+    private class ReaderTimerTask extends TimerTask
+    {
+
+        public void run()
+        {
+
+            if (lastModified < inputFile.lastModified())
+            {
+
+                try
+                {
                     Document readerDoc = DocumentBuilderFactory.newInstance()
-                        .newDocumentBuilder().newDocument();
-            
+                            .newDocumentBuilder().newDocument();
+
                     Element readerElem = readerDoc.createElement(PARAMICS_COMM_TAGS.READER.tag);
                     readerElem.setAttribute(PARAMICS_COMM_TAGS.ID.tag, readerID);
-                    readerElem.setAttribute(PARAMICS_COMM_TAGS.ACTION.tag, 
+                    readerElem.setAttribute(PARAMICS_COMM_TAGS.ACTION.tag,
                             PARAMICS_ACTIONS.READ_FILE.action);
-                    
+
                     Element messageElem = readerDoc.createElement(PARAMICS_COMM_TAGS.MESSAGE.tag);
-                    messageElem.appendChild(readerDoc.createTextNode(readFromFile()));
+                    String fileContents = readFromFile();
+                    messageElem.appendChild(readerDoc.createTextNode(fileContents));
                     readerElem.appendChild(messageElem);
-                    
-                    readerDoc.appendChild(readerElem);          
-                        
+
+                    readerDoc.appendChild(readerElem);
+
                     setChanged();
                     notifyObservers(readerDoc);
-                }                   
-                catch (Exception e) {
-                    paramLogger.logp(Level.SEVERE, 
-                            "ParamicsFileReader.ReaderTimerTask", "run()", 
-                            "Exception in reading from file: " + 
-                            inputFile.getName(), e);
+                } catch (Exception e)
+                {
+                    paramLogger.logp(Level.SEVERE,
+                            "ParamicsFileReader.ReaderTimerTask", "run()",
+                            "Exception in reading from file: "
+                            + inputFile.getName(), e);
                 }
             }
@@ -98,72 +114,79 @@
     }
 
-
     /**
-     * Constructor.  Set the reader id and interval from the parsed
-     * ParamicsCommMessage.  The interval is found within the first three
-     * characters of the object's "message" data member.  Create a file
-     * object for the target file, and create a new file if it does
-     * not already exist.  Instantiate the timer and ReaderTimerTask
-     * to begin periodic reading of the file.
-     * 
-     * @param workingDir Target working directory.
+     * Constructor. Set the reader id and interval from the parsed
+     * ParamicsCommMessage. The interval is found within the first three
+     * characters of the object's "message" data member. Create a file object
+     * for the target file, and create a new file if it does not already exist.
+     * Instantiate the timer and ReaderTimerTask to begin periodic reading of
+     * the file.
+     *
+     * @param workingDir Target working directory. // Oops, the following seem
+     * obsolete
      * @param mess ParamicsCommMessage object containing registration data.
      * @param theComm Reference to the ParamicsCommunicator.
      */
-    public ParamicsFileReader(String workingDir, String id, Integer interval, String targetFile) {
-        
-        try {       
-            readerID       = id;
+    public ParamicsFileReader(String workingDir, String id, Integer interval, String targetFile)
+    {
+
+        try
+        {
+            readerID = id;
             readerInterval = interval;
-                    
-            inputFile = new File(workingDir + targetFile);  
-                        
-            if(!inputFile.exists()) {
+
+            inputFile = new File(workingDir + targetFile);
+
+            if (!inputFile.exists())
+            {
                 inputFile.createNewFile();
             }
-            
+
             readerTimer = new Timer();
-            readerTimer.scheduleAtFixedRate(new ReaderTimerTask(), 
-                0L, readerInterval * 1000); 
-            
-        } catch (IOException ioe) {
-            paramLogger.logp(Level.SEVERE, "ParamicsFileReader", 
+            readerTimer.scheduleAtFixedRate(new ReaderTimerTask(),
+                    0L, readerInterval * 1000);
+
+        } catch (IOException ioe)
+        {
+            paramLogger.logp(Level.SEVERE, "ParamicsFileReader",
                     "Constructor()", "Exception in initializing file reading.", ioe);
         }
     }
-    
-    
+
     /**
-     * Method opens the target file and reads all contents.  The file is then 
+     * Method opens the target file and reads all contents. The file is then
      * cleared.
      *
      * @returns
-     * @throws IOException if there is an error in reading or writing to the file.
+     * @throws IOException if there is an error in reading or writing to the
+     * file.
      */
-    private String readFromFile() throws IOException {
-        
-        char[] input = new char[(int)inputFile.length()];
-        
+    private String readFromFile() throws IOException
+    {
+
+        char[] input = new char[(int) inputFile.length()];
+
         fileReader = new FileReader(inputFile);
-        fileReader.read(input);     
+        fileReader.read(input);
         fileReader.close();
-        
+
         //make sure the new file has a modified time that is different
-        try {
+        try
+        {
             Thread.sleep(1000);
+        } catch (Exception e)
+        {
         }
-        catch (Exception e) {}
-        
+
         //clear file after reading contents
         fileWriter = new FileWriter(inputFile);
         fileWriter.write("");
         fileWriter.close();
-        
+
         lastModified = inputFile.lastModified();
-        
+
         setChanged();
-        notifyObservers(new FileIOUpdate(IO_TYPE.READ, readerID, (long)input.length));      
-                        
+        notifyObservers(new FileIOUpdate(IO_TYPE.READ, readerID, (long) input.length));
+
         return new String(input);
-    }       
+    }
 }
Index: trunk/src/tmcsim/paramicscommunicator/gui/ParamicsCommunicatorGUI.java
===================================================================
--- trunk/src/tmcsim/paramicscommunicator/gui/ParamicsCommunicatorGUI.java	(revision 2)
+++ trunk/src/tmcsim/paramicscommunicator/gui/ParamicsCommunicatorGUI.java	(revision 6)
@@ -11,90 +11,104 @@
 import java.util.logging.LogRecord;
 import java.util.logging.Logger;
-
 import javax.swing.BorderFactory;
 import javax.swing.Box;
 import javax.swing.BoxLayout;
 import javax.swing.JFrame;
+import javax.swing.JMenuBar;
+import javax.swing.JOptionPane;
 import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextArea;
-
+import tmcsim.common.RevisionNumber;
 import tmcsim.paramicscommunicator.FileIOUpdate;
 import tmcsim.paramicscommunicator.FileRegUpdate;
 
 /**
- * ParamicsCommunicatorGUI is the view class for the ParamicsCommunicator.
- * The user interface shows a tab for each I/O reader or writer that has
- * been registered with the ParamicsCommunicator.  The tab shows the 
- * history of I/O reads and writes, and the unique information for the
- * target file and I/O interval.
- * 
+ * ParamicsCommunicatorGUI is the view class for the ParamicsCommunicator. The
+ * user interface shows a tab for each I/O reader or writer that has been
+ * registered with the ParamicsCommunicator. The tab shows the history of I/O
+ * reads and writes, and the unique information for the target file and I/O
+ * interval.
+ *
  * @author Matthew Cechini
  * @version
  */
 @SuppressWarnings("serial")
-public class ParamicsCommunicatorGUI extends JFrame implements Observer {
-    
-    /**
-     * Logging handler that writes all received log records to the
-     * error text area.
+public class ParamicsCommunicatorGUI extends JFrame implements Observer
+{
+
+    /**
+     * Logging handler that writes all received log records to the error text
+     * area.
+     *
      * @author Matthew Cechini
      */
-    protected class ParamicsLoggerHandler extends Handler {
+    protected class ParamicsLoggerHandler extends Handler
+    {
 
         DateFormat timeFormat = DateFormat.getTimeInstance();
-        
-        public void close() throws SecurityException {
-        }
-        
-        public void flush() {
-        }
-        
-        public void publish(LogRecord record) {
+
+        public void close() throws SecurityException
+        {
+        }
+
+        public void flush()
+        {
+        }
+
+        public void publish(LogRecord record)
+        {
             StringBuffer errorBuf = new StringBuffer();
-            
+
             errorBuf.append(timeFormat.format(new Date(record.getMillis())));
-            errorBuf.append("  -  " + record.getMessage() + "\n");          
-            
-            errorTA.setText(errorTA.getText() + errorBuf.toString()); 
-        }       
-    }
-
-    /** Map of FileIOTableModel objects for each reader id. */
+            errorBuf.append("  -  " + record.getMessage() + "\n");
+
+            errorTA.setText(errorTA.getText() + errorBuf.toString());
+        }
+    }
+    /**
+     * Map of FileIOTableModel objects for each reader id.
+     */
     protected TreeMap<String, FileIOTableModel> readerTables;
-
-    /** Map of FileIOTableModel objects for each writer id. */
+    /**
+     * Map of FileIOTableModel objects for each writer id.
+     */
     protected TreeMap<String, FileIOTableModel> writerTables;
-    
-    /**
-     * Constructor.  Initialize local lists, set up the logging handler and
+
+    /**
+     * Constructor. Initialize local lists, set up the logging handler and
      * initialize the GUI.
      */
-    public ParamicsCommunicatorGUI() {      
+    public ParamicsCommunicatorGUI()
+    {
         super("Paramics Communicator");
-        
+
         readerTables = new TreeMap<String, FileIOTableModel>();
         writerTables = new TreeMap<String, FileIOTableModel>();
-        
+
         Logger.getLogger("tmcsim.paramicscommunicator").addHandler(new ParamicsLoggerHandler());
-        
+
         initializeGUI();
-    }   
-    
-    /**
-     * Observer update method.  If the update object is a FileIOUpdate object,
-     * update the TableModel corresponding to the unique I/O id.  If the
-     * update object is a FileRegUpdate object, add a new tab if the 
-     * registration type is REGISTER, or update an existing tab if the
-     * registration type is UNREGISTER.
-     */
-    public void update(Observable o, Object arg) {
-        
-        if(arg instanceof FileIOUpdate) {
-
-            try {
-                FileIOUpdate update = (FileIOUpdate)arg;
-                
-                switch(update.ioType) {
+    }
+
+    /**
+     * Observer update method. If the update object is a FileIOUpdate object,
+     * update the TableModel corresponding to the unique I/O id. If the update
+     * object is a FileRegUpdate object, add a new tab if the registration type
+     * is REGISTER, or update an existing tab if the registration type is
+     * UNREGISTER.
+     */
+    public void update(Observable o, Object arg)
+    {
+
+        if (arg instanceof FileIOUpdate)
+        {
+
+            try
+            {
+                FileIOUpdate update = (FileIOUpdate) arg;
+
+                switch (update.ioType)
+                {
                     case READ:
                         readerTables.get(update.ioID).addIOUpdate(update);
@@ -104,22 +118,25 @@
                         break;
                 }
-            }
-            catch (Exception e) {
+            } catch (Exception e)
+            {
                 Logger.getLogger("tmcsim.paramicscommunicator.gui").logp(
-                        Level.SEVERE, "ParamicsCommunicatorGUI", "update", 
+                        Level.SEVERE, "ParamicsCommunicatorGUI", "update",
                         "Exception in receiving FileIOUpdate object.", e);
             }
-        }
-        else if(arg instanceof FileRegUpdate) {
-            try {
-                FileRegUpdate update = (FileRegUpdate)arg;
-                
-                switch(update.ioType) {
+        } else if (arg instanceof FileRegUpdate)
+        {
+            try
+            {
+                FileRegUpdate update = (FileRegUpdate) arg;
+
+                switch (update.ioType)
+                {
                     case READ:
-                        switch(update.regType) {
+                        switch (update.regType)
+                        {
                             case REGISTER:
                                 FileIOTableModel model = new FileIOTableModel();
                                 readerTables.put(update.ioID, model);
-    
+
                                 addTab(update, model);
                                 break;
@@ -130,9 +147,10 @@
                         break;
                     case WRITE:
-                        switch(update.regType) {
+                        switch (update.regType)
+                        {
                             case REGISTER:
                                 FileIOTableModel model = new FileIOTableModel();
                                 writerTables.put(update.ioID, model);
-                                
+
                                 addTab(update, model);
                                 break;
@@ -140,37 +158,53 @@
                                 //unregister
                                 break;
-                        }                   
+                        }
                         break;
                 }
 
-            }
-            catch (Exception e) {
+            } catch (Exception e)
+            {
                 Logger.getLogger("tmcsim.paramicscommunicator.gui").logp(
-                        Level.SEVERE, "ParamicsCommunicatorGUI", "update", 
+                        Level.SEVERE, "ParamicsCommunicatorGUI", "update",
                         "Exception in receiving FileRegUpdate object.", e);
             }
-        }       
-    }
-    
-    private void initializeGUI() {
-        
-        /* Added by Nathaniel Lehrer */
-        this.setJMenuBar(new javax.swing.JMenuBar() {
-            {
-                javax.swing.JMenu fileMenu = new javax.swing.JMenu("File");
-                javax.swing.JMenuItem logItem = new javax.swing.JMenuItem("Show Log");
-                
-                logItem.addActionListener(new java.awt.event.ActionListener() {
-                    public void actionPerformed(java.awt.event.ActionEvent evt) {
-                        tmcsim.paramicslog.gui.ParamicsLogGUI.getInstance().display(); 
-                    }
-                });
-                
-                fileMenu.add(logItem);
-                this.add(fileMenu);
+        }
+    }
+
+    private void initializeGUI()
+    {
+
+        JMenuBar menuBar = new JMenuBar();
+
+        javax.swing.JMenu fileMenu = new javax.swing.JMenu("File");
+        javax.swing.JMenuItem logItem = new javax.swing.JMenuItem("Show Log");
+
+        logItem.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                tmcsim.paramicslog.gui.ParamicsLogGUI.getInstance().display();
             }
         });
-        /* End Add by Nathaniel Lehrer */
-        
+
+        fileMenu.add(logItem);
+        menuBar.add(fileMenu);
+
+        javax.swing.JMenu helpMenu = new javax.swing.JMenu("Help");
+        javax.swing.JMenuItem aboutItem = new javax.swing.JMenuItem("About");
+
+        aboutItem.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                String ver = RevisionNumber.getString();
+                JOptionPane.showMessageDialog(rootPane, "Version: " + ver, "About", JOptionPane.INFORMATION_MESSAGE);
+            }
+        });
+
+        helpMenu.add(aboutItem);
+        menuBar.add(helpMenu);
+
+        this.setJMenuBar(menuBar);
+
         fileIOTabs = new JTabbedPane();
         fileIOTabs.setAlignmentX(Box.CENTER_ALIGNMENT);
@@ -180,10 +214,10 @@
         fileIOTabs.setBorder(BorderFactory.createCompoundBorder(
                 BorderFactory.createTitledBorder(
-                    BorderFactory.createRaisedBevelBorder(), "Registered I/O"),
-                    BorderFactory.createEmptyBorder(5,5,5,5)));
-    
+                BorderFactory.createRaisedBevelBorder(), "Registered I/O"),
+                BorderFactory.createEmptyBorder(5, 5, 5, 5)));
+
         errorTA = new JTextArea();
         errorTA.setLineWrap(true);
-        
+
         errorPane = new JScrollPane();
         errorPane.setViewportView(errorTA);
@@ -191,15 +225,15 @@
         errorPane.setBorder(BorderFactory.createCompoundBorder(
                 BorderFactory.createTitledBorder(
-                    BorderFactory.createRaisedBevelBorder(), "Errors"),
-                    BorderFactory.createEmptyBorder(5,5,5,5)));
-        
-        
+                BorderFactory.createRaisedBevelBorder(), "Errors"),
+                BorderFactory.createEmptyBorder(5, 5, 5, 5)));
+
+
         Box guiBox = new Box(BoxLayout.Y_AXIS);
         guiBox.add(fileIOTabs);
         guiBox.add(Box.createVerticalStrut(10));
         guiBox.add(errorPane);
-        
+
         add(guiBox);
-        
+
         setMinimumSize(new Dimension(420, 680));
         setPreferredSize(new Dimension(420, 680));
@@ -208,16 +242,20 @@
         setVisible(true);
     }
-    
-    /**
-     * Method creates a new tab for the new I/O object.  The tab is labeled
+
+    /**
+     * Method creates a new tab for the new I/O object. The tab is labeled
      * "Reader #" or "Writer #", where '#' is the I/O object's ID.
+     *
      * @param update Initial update object.
-     * @param model TableModel for reader/writer that will display I/O operations.
-     */
-    private void addTab(FileRegUpdate update, FileIOTableModel model) {
-        
+     * @param model TableModel for reader/writer that will display I/O
+     * operations.
+     */
+    private void addTab(FileRegUpdate update, FileIOTableModel model)
+    {
+
         String tabName = null;
-        
-        switch(update.ioType) {
+
+        switch (update.ioType)
+        {
             case READ:
                 tabName = "Reader " + update.ioID;
@@ -227,13 +265,9 @@
                 break;
         }
-        
+
         fileIOTabs.add(tabName, new ParamicsIOInfoPanel(update, model));
     }
-    
     private JTabbedPane fileIOTabs;
-
     private JScrollPane errorPane;
-    
     private JTextArea errorTA;
-
 }
