Index: trunk/src/tmcsim/cadsimulator/viewer/MediaStatusPanel.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/viewer/MediaStatusPanel.java	(revision 2)
+++ trunk/src/tmcsim/cadsimulator/viewer/MediaStatusPanel.java	(revision 44)
@@ -1,48 +1,76 @@
 package tmcsim.cadsimulator.viewer;
 
+import java.util.Iterator;
+import java.util.Observable;
 import java.util.TreeMap;
-
 import javax.swing.JPanel;
 import javax.swing.JTabbedPane;
-
 import tmcsim.cadsimulator.videocontrol.DVDStatusUpdate;
 import tmcsim.cadsimulator.videocontrol.DVDTitleUpdate;
+import tmcsim.cadsimulator.viewer.model.CADMediaStatus;
 
 /**
- * MediaStatusPanel is a GUI object used for displaying information
- * for DVD connections created by the CAD Simulator.  Tabs for each
- * DVD are created and information is displayed on a DVDInfoPanel.
- * All status and title updates are sent to the corresponding
- * DVDInfoPanel.  The DVDs are referenced by connection info, which
- * is unique to each DVD player.
- * 
- * @author Matthew Cechini
- * @version
+ * MediaStatusPanel is a GUI object used for displaying information for DVD
+ * connections created by the CAD Simulator. Tabs for each DVD are created and
+ * information is displayed on a DVDInfoPanel. All status and title updates are
+ * sent to the corresponding DVDInfoPanel. The DVDs are referenced by connection
+ * info, which is unique to each DVD player.
+ *
+ * @author jdalbey
  */
 @SuppressWarnings("serial")
-public class MediaStatusPanel extends JPanel {
-    
-    /** Map of DVDInfoPanels(values) referenced by a DVD's connection info(key). */
+public class MediaStatusPanel extends JPanel
+{
+
+    /**
+     * Map of DVDInfoPanels(values) referenced by a DVD's connection info(key).
+     */
     private TreeMap<String, DVDInfoPanel> dvdPanels = null;
 
     /**
-     * Constructor.  Initialize data and GUI components.
+     * Constructor. Initialize data and GUI components.
      */
-    public MediaStatusPanel() {
+    public MediaStatusPanel()
+    {
 
-        dvdPanels   = new TreeMap<String, DVDInfoPanel>();
-        
+        dvdPanels = new TreeMap<String, DVDInfoPanel>();
+
         initComponents();
     }
-    
+
+    public void refresh(Observable obs)
+    {
+        CADMediaStatus status = (CADMediaStatus) obs;
+        Iterator<DVDInfoPanel> iter = status.getDVDlist();
+        // Remove existing tabs before adding them all back
+        mediaTabs.removeAll();
+        // add a new tab for each dvd panel
+        while (iter.hasNext())
+        {
+            DVDInfoPanel item = iter.next();
+            mediaTabs.addTab(
+                    "DVD " + (Integer.parseInt(item.connInfo
+                    .substring(item.connInfo
+                    .indexOf(":") + 1)) % 3000),
+                    dvdPanels.get(item.connInfo));
+        }
+//            mediaTabs.addTab(
+//                    "DVD " + (Integer.parseInt(update.connectionInfo
+//                    .substring(update.connectionInfo
+//                    .indexOf(":") + 1)) % 3000),
+//                    dvdPanels.get(update.connectionInfo));
+
+    }
+
     /**
-     * Updates the current DVDInfoPanel with the status update.
-     * If a panel does not current exist, create one and add
-     * a new tab.
-     * 
+     * Updates the current DVDInfoPanel with the status update. If a panel does
+     * not current exist, create one and add a new tab.
+     *
      * @param update DVD status update.
      */
-    public void updateDVDStatus(DVDStatusUpdate update) {
-        if(dvdPanels.get(update.connectionInfo) == null) {
+    public void updateDVDStatus(DVDStatusUpdate update)
+    {
+        if (dvdPanels.get(update.connectionInfo) == null)
+        {
             dvdPanels.put(update.connectionInfo, new DVDInfoPanel(
                     update.connectionInfo));
@@ -50,41 +78,41 @@
             mediaTabs.addTab(
                     "DVD " + (Integer.parseInt(update.connectionInfo
-                                    .substring(update.connectionInfo
-                                            .indexOf(":")+1)) % 3000), 
+                    .substring(update.connectionInfo
+                    .indexOf(":") + 1)) % 3000),
                     dvdPanels.get(update.connectionInfo));
         }
-        
-        
+
+
         dvdPanels.get(update.connectionInfo).updateDVDStatus(update);
     }
-    
+
     /**
-     * Updates the current DVDInfoPanel with the title update.
-     * If a panel does not current exist, create one and add
-     * a new tab.
-     * 
+     * Updates the current DVDInfoPanel with the title update. If a panel does
+     * not current exist, create one and add a new tab.
+     *
      * @param update DVD title update.
      */
-    public void updateDVDTitle(DVDTitleUpdate update) {
-        if(dvdPanels.get(update.connectionInfo) == null) {
+    public void updateDVDTitle(DVDTitleUpdate update)
+    {
+        if (dvdPanels.get(update.connectionInfo) == null)
+        {
             dvdPanels.put(update.connectionInfo, new DVDInfoPanel(update.connectionInfo));
-            
-            mediaTabs.addTab("DVD " + dvdPanels.size(), 
+
+            mediaTabs.addTab("DVD " + dvdPanels.size(),
                     dvdPanels.get(update.connectionInfo));
         }
-        
+
         dvdPanels.get(update.connectionInfo).updateDVDTitle(update);
     }
-    
+
     /**
      * Initialize GUI components.
      */
-    private void initComponents() {
+    private void initComponents()
+    {
         mediaTabs = new JTabbedPane();
-        
+
         add(mediaTabs);
     }
-    
     private JTabbedPane mediaTabs;
-    
 }
Index: trunk/src/tmcsim/cadsimulator/viewer/SimulationStatusPanel.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/viewer/SimulationStatusPanel.java	(revision 36)
+++ trunk/src/tmcsim/cadsimulator/viewer/SimulationStatusPanel.java	(revision 44)
@@ -5,8 +5,5 @@
 import java.awt.Dimension;
 import java.awt.Font;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.LogRecord;
-import java.util.logging.Logger;
+import java.util.Observable;
 import javax.swing.BorderFactory;
 import javax.swing.Box;
@@ -19,4 +16,5 @@
 import javax.swing.border.EtchedBorder;
 import javax.swing.border.TitledBorder;
+import tmcsim.cadsimulator.viewer.model.CADSimulatorStatus;
 import tmcsim.common.CADEnums.PARAMICS_STATUS;
 import tmcsim.common.CADEnums.SCRIPT_STATUS;
@@ -37,5 +35,5 @@
  * </ul>
  *
- * @author Matthew Cechini
+ * @author Matthew Cechini, jdalbey
  * @version
  */
@@ -45,39 +43,33 @@
 
     /**
-     * Logging Handler to listen for Information and Error messages logged for
-     * the CAD Simulator. Received LogRecords are displayed in the info or error
-     * message Text Area.
-     *
-     * @author Matthew Cechini
-     */
-    private class SimulatorErrorHandler extends Handler
-    {
-
-        public void close() throws SecurityException
-        {
-        }
-
-        public void flush()
-        {
-        }
-
-        public void publish(LogRecord rec)
-        {
-            StringBuffer msgBuffer = new StringBuffer();
-
-            msgBuffer.append(rec.getSourceClassName() + "."
-                    + rec.getSourceMethodName() + " = "
-                    + rec.getMessage());
-
-            if (rec.getLevel() == Level.INFO)
-            {
-                infoMessagesTA.setText(infoMessagesTA.getText()
-                        + msgBuffer.toString() + "\n");
-            } else
-            {
-                errorMessagesTA.setText(errorMessagesTA.getText()
-                        + msgBuffer.toString() + "\n");
-            }
-        }
+     * Refresh this view
+     *
+     * @param obs the Observable we are watching
+     */
+    public void refresh(Observable obs)
+    {
+        CADSimulatorStatus status = (CADSimulatorStatus) obs;
+        termConnectedTF.setText(String.valueOf(status.getNumClients()));
+        String yesno = "No";
+        // Should we show yes or no?
+        if (status.isSimManagerConnected())
+        {
+            yesno = "Yes";
+        }
+        managerConnectedTF.setText(yesno);
+        simulationClockLabel.setText(status.getCurrentTime());
+        setScriptStatus(status.getScriptStatus());
+        setParamicsStatus(status.getParamicsStatus());
+
+        String netText = status.getParmicsNetworkID();
+        if (netText.length() == 0)
+        {
+            netText = "None";
+        }
+        setParamicsNetworkLoaded(netText);
+
+        String msgOut = status.getInfoMessages();
+        infoMessagesTA.setText(msgOut);
+        errorMessagesTA.setText(status.getErrorMessages());
     }
     /**
@@ -85,8 +77,4 @@
      */
     private int numClientsConnected = 0;
-    /**
-     * Logging ErrorHandler.
-     */
-    private SimulatorErrorHandler errorHandler;
 
     /**
@@ -102,96 +90,14 @@
         initMessagesPanes();
 
-        errorHandler = new SimulatorErrorHandler();
-        Logger.getLogger("tmcsim.cadsimulator").addHandler(errorHandler);
-
-        CADSimulatorViewerBox = Box.createVerticalBox();
-        CADSimulatorViewerBox.add(simulationTimeAndStatusBox);
-        CADSimulatorViewerBox.add(additionalInfoBox);
-        CADSimulatorViewerBox.add(infoMessagesPane);
-        CADSimulatorViewerBox.add(errorMessagesPane);
-
-        add(CADSimulatorViewerBox);
-    }
-
-    /**
-     * Method is called when a CAD Client disconnects from the CAD Simulator.
-     * The displayed number of connected clients is incremented by one.
-     */
-    public void connectClient()
-    {
-
-        numClientsConnected++;
-
-        termConnectedTF.setText(String.valueOf(numClientsConnected));
-    }
-
-    /**
-     * Method is called when a CAD Client disconnects from the CAD Simulator.
-     * The displayed number of connected clients is decremented by one.
-     */
-    public void disconnectClient()
-    {
-
-        if (numClientsConnected > 0)
-        {
-            numClientsConnected--;
-        }
-
-        termConnectedTF.setText(String.valueOf(numClientsConnected));
-    }
-
-    /**
-     * Method is called when Simulation Manager connects or disconnects.
-     *
-     * @param connection True if simulation manager is connected, false if not.
-     */
-    public void setSimManagerStatus(boolean connection)
-    {
-
-        if (connection)
-        {
-            managerConnectedTF.setText("Yes");
-        } else
-        {
-            managerConnectedTF.setText("No");
-        }
-
-    }
-
-    /**
-     * Method called to convert current simulation time (parameter long value)
-     * to a string of format H:MM:SS. Time is then updated on GUI.
-     *
-     * @param seconds Long value of current time
-     */
-    public void setTime(long seconds)
-    {
-        String time = new String();
-        long timeSegment;
-
-        timeSegment = seconds / 3600;
-        time += String.valueOf(timeSegment) + ":";
-
-        seconds = seconds % 3600;
-
-        timeSegment = seconds / 60;
-        if (timeSegment < 10)
-        {
-            time += "0";
-        }
-
-        time += String.valueOf(timeSegment) + ":";
-        seconds = seconds % 60;
-
-        timeSegment = seconds;
-        if (timeSegment < 10)
-        {
-            time += "0";
-        }
-
-        time += String.valueOf(timeSegment);
-
-        simulationClockLabel.setText(time);
-
+        //  errorHandler = new SimulatorErrorHandler();
+        //  Logger.getLogger("tmcsim.cadsimulator").addHandler(errorHandler);
+
+        cadSimulatorViewerBox = Box.createVerticalBox();
+        cadSimulatorViewerBox.add(simulationTimeAndStatusBox);
+        cadSimulatorViewerBox.add(additionalInfoBox);
+        cadSimulatorViewerBox.add(infoMessagesPane);
+        cadSimulatorViewerBox.add(errorMessagesPane);
+
+        add(cadSimulatorViewerBox);
     }
 
@@ -206,8 +112,10 @@
     protected void displayError(String errorMessage)
     {
+        // Do we clear or append?
         if (errorMessage == null)
         {
             errorMessagesTA.setText("");
-        } else
+        }
+        else
         {
             errorMessagesTA.append(errorMessage + "\n");
@@ -253,7 +161,7 @@
      * </table>
      */
-    public void setScriptStatus(SCRIPT_STATUS newStatus)
-    {
-
+    private void setScriptStatus(SCRIPT_STATUS newStatus)
+    {
+        // Display text based on status value
         switch (newStatus)
         {
@@ -291,7 +199,7 @@
      * or dropped.
      */
-    public void setParamicsStatus(PARAMICS_STATUS newStatus)
-    {
-
+    private void setParamicsStatus(PARAMICS_STATUS newStatus)
+    {
+        // Display text based on status value
         switch (newStatus)
         {
@@ -310,5 +218,5 @@
      * @param networkID Unique ID for Paramics network that has been loaded.
      */
-    public void setParamicsNetworkLoaded(String networkID)
+    private void setParamicsNetworkLoaded(String networkID)
     {
         networkLoadedTF.setText(networkID);
@@ -325,4 +233,5 @@
         simulationStatus = new JLabel("Simulation Status");
         simulationStatusText = new JLabel("No Script");
+        simulationStatusText.setName("simulationStatusText");
 
         simulationTime.setLayout(new BorderLayout());
@@ -470,5 +379,5 @@
     private Box paramicsConnectedBox;
     private Box networkLoadedBox;
-    private Box CADSimulatorViewerBox;
+    private Box cadSimulatorViewerBox;
     private Box simulationTimeAndStatusBox;
     private Box simulationStatusBox;
Index: trunk/src/tmcsim/cadsimulator/viewer/CADSimulatorViewer.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/viewer/CADSimulatorViewer.java	(revision 36)
+++ trunk/src/tmcsim/cadsimulator/viewer/CADSimulatorViewer.java	(revision 44)
@@ -6,4 +6,9 @@
 import java.awt.event.KeyEvent;
 import java.awt.event.WindowEvent;
+import java.io.IOException;
+import java.util.Observable;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import javax.swing.JFrame;
 import javax.swing.JMenu;
@@ -13,10 +18,8 @@
 import javax.swing.JTabbedPane;
 import javax.swing.KeyStroke;
-import tmcsim.cadsimulator.videocontrol.DVDStatusUpdate;
-import tmcsim.cadsimulator.videocontrol.DVDTitleUpdate;
 import tmcsim.cadsimulator.viewer.actions.ExitAction;
-import tmcsim.common.CADEnums.PARAMICS_STATUS;
-import tmcsim.common.CADEnums.SCRIPT_STATUS;
-import tmcsim.common.RevisionNumber;
+import tmcsim.cadsimulator.viewer.model.CADMediaStatus;
+import tmcsim.cadsimulator.viewer.model.CADSimulatorStatus;
+import tmcsim.interfaces.CADViewer;
 
 /**
@@ -30,5 +33,5 @@
  */
 @SuppressWarnings("serial")
-public class CADSimulatorViewer extends JFrame
+public class CADSimulatorViewer extends JFrame implements CADViewer
 {
 
@@ -45,11 +48,12 @@
      */
     private ConfigStatusPanel configPanel;
+
     /**
      * Constructor.
      */
-    
     public CADSimulatorViewer()
     {
-        super("CAD Simulator");
+        super();
+        setTitle("CAD Simulator " + getAppVersion());
 
         initComponents();
@@ -57,73 +61,27 @@
 
     /**
-     * @see SimulationStatusPanel
+     * Read the version number from the application properties. The file
+     * 'application.properties' is generated by build.xml.
+     *
+     * @return a version string obtained from application.properties file, or
+     * "Version: unknown" if an IOerror prevents us from reading the file.
      */
-    public void connectClient()
+    private String getAppVersion()
     {
-        simulationPanel.connectClient();
-    }
-
-    /**
-     * @see SimulationStatusPanel
-     */
-    public void disconnectClient()
-    {
-        simulationPanel.disconnectClient();
-    }
-
-    /**
-     * @see SimulationStatusPanel
-     */
-    public void setSimManagerStatus(boolean connection)
-    {
-        simulationPanel.setSimManagerStatus(connection);
-    }
-
-    /**
-     * @see SimulationStatusPanel
-     */
-    public void setTime(long seconds)
-    {
-        simulationPanel.setTime(seconds);
-    }
-
-    /**
-     * @see SimulationStatusPanel
-     */
-    public void setScriptStatus(SCRIPT_STATUS newStatus)
-    {
-        simulationPanel.setScriptStatus(newStatus);
-    }
-
-    /**
-     * @see SimulationStatusPanel
-     */
-    public void setParamicsStatus(PARAMICS_STATUS newStatus)
-    {
-        simulationPanel.setParamicsStatus(newStatus);
-    }
-
-    /**
-     * @see SimulationStatusPanel
-     */
-    public void setParamicsNetworkLoaded(String networkID)
-    {
-        simulationPanel.setParamicsNetworkLoaded(networkID);
-    }
-
-    /**
-     * @see MediaStatusPanel
-     */
-    public void updateDVDStatus(DVDStatusUpdate update)
-    {
-        mediaPanel.updateDVDStatus(update);
-    }
-
-    /**
-     * @see MediaStatusPanel
-     */
-    public void updateDVDTitle(DVDTitleUpdate update)
-    {
-        mediaPanel.updateDVDTitle(update);
+        String propfilename = "/tmcsim/application.properties";
+        String propKey = "Application.revision";
+        String version = "unknown";
+        try
+        {
+            Properties props = new Properties();
+            props.load(this.getClass().getResourceAsStream(propfilename));
+            version = (String) props.get(propKey);
+        } catch (IOException ex)
+        {
+            Logger.getLogger("tmcsim/cadsimulator").log(Level.SEVERE,
+                    "CADSimulatorView.getAppVersion()",
+                    "IOError reading " + propfilename);
+        }
+        return "revision: " + version;
     }
 
@@ -147,14 +105,14 @@
         if (evt.getID() == WindowEvent.WINDOW_CLOSING)
         {
-            int option = JOptionPane.showConfirmDialog(null,
-                    "Closing the CAD Simulator will stop the current "
-                    + "simulation.  Do you wish to continue exiting?",
-                    "Confirm Exit",
-                    JOptionPane.YES_NO_OPTION);
-
-            if (option != JOptionPane.NO_OPTION)
-            {
-                System.exit(0);
-            }
+//            int option = JOptionPane.showConfirmDialog(null,
+//                    "Closing the CAD Simulator will stop the current "
+//                    + "simulation.  Do you wish to continue exiting?",
+//                    "Confirm Exit",
+//                    JOptionPane.YES_NO_OPTION);
+//
+//            if (option != JOptionPane.NO_OPTION)
+//            {
+            System.exit(0);
+//            }
         }
     }
@@ -196,5 +154,5 @@
             public void actionPerformed(java.awt.event.ActionEvent evt)
             {
-                String ver = RevisionNumber.getString();
+                String ver = "";//RevisionNumber.getString();
                 JOptionPane.showMessageDialog(rootPane, "Version: " + ver, "About", JOptionPane.INFORMATION_MESSAGE);
             }
@@ -208,4 +166,5 @@
         pack();
         setResizable(true);
+        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     }
     private JTabbedPane cadSimTabbedPane;
@@ -213,3 +172,16 @@
     private JMenu fileMenu;
     private JMenuItem exitMenuItem;
+
+    @Override
+    public void update(Observable obs, Object obj)
+    {
+        if (obs instanceof CADSimulatorStatus)
+        {
+            simulationPanel.refresh(obs);
+        }
+        if (obs instanceof CADMediaStatus)
+        {
+            mediaPanel.refresh(obs);
+        }
+    }
 }
Index: trunk/src/tmcsim/cadsimulator/viewer/DVDInfoPanel.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/viewer/DVDInfoPanel.java	(revision 2)
+++ trunk/src/tmcsim/cadsimulator/viewer/DVDInfoPanel.java	(revision 44)
@@ -2,5 +2,4 @@
 
 import java.awt.Dimension;
-
 import javax.swing.BorderFactory;
 import javax.swing.Box;
@@ -10,5 +9,4 @@
 import javax.swing.JTable;
 import javax.swing.JTextField;
-
 import tmcsim.cadsimulator.videocontrol.DVDStatusUpdate;
 import tmcsim.cadsimulator.videocontrol.DVDTitleUpdate;
@@ -17,48 +15,57 @@
 
 /**
- * DVDInfoPanel is a GUI component used in the CADSimulatorViewer.  The panel
- * displays information regarding the DVD player's connection information.
- * One table on the panel shows all DVD title that have been played or 
- * repeated.  A second table shows all DVD status updates that have been
- * received from the controller. 
- * 
+ * DVDInfoPanel is a GUI component used in the CADSimulatorViewer. The panel
+ * displays information regarding the DVD player's connection information. One
+ * table on the panel shows all DVD title that have been played or repeated. A
+ * second table shows all DVD status updates that have been received from the
+ * controller.
+ *
  * @author Matthew Cechini
- * @version 
+ * @version
  */
 @SuppressWarnings("serial")
-public class DVDInfoPanel extends JPanel {
+public class DVDInfoPanel extends JPanel
+{
 
-    /** DVD player connection info. */
-    private String connInfo = null;
-    
-    /** Table model for the title table. */
+    /**
+     * DVD player connection info.
+     */
+    public final String connInfo;
+    /**
+     * Table model for the title table.
+     */
     private DVDTitleTableModel titleTableModel;
+    /**
+     * Table to display DVD title plays and repeats.
+     */
+    private JTable titleTable;
+    /**
+     * Table model for the Status table.
+     */
+    private DVDStatusTableModel statusTableModel;
+    /**
+     * Table to display DVD status updates.
+     */
+    private JTable statusTable;
 
-    /** Table to display DVD title plays and repeats. */
-    private JTable titleTable;
-    
-    /** Table model for the Status table. */
-    private DVDStatusTableModel statusTableModel;
-    
-    /** Table to display DVD status updates. */
-    private JTable statusTable;
-    
-    
     /**
-     * Constructor.  Initialize the panel GUI components.
-     * 
+     * Constructor. Initialize the panel GUI components.
+     *
      * @param connectionInfo DVD player connection info.
      */
-    public DVDInfoPanel(String connectionInfo) {
+    public DVDInfoPanel(String connectionInfo)
+    {
         connInfo = connectionInfo;
-        
+
         initComponents();
-    }   
-    
+    }
+
     /**
      * This method updates the DVD status table with the new update object.
+     *
      * @param update Update DVD Status update.
      */
-    public void updateDVDStatus(DVDStatusUpdate update) {
+    public void updateDVDStatus(DVDStatusUpdate update)
+    {
         statusTableModel.addStatusUpdate(update);
     }
@@ -66,32 +73,36 @@
     /**
      * This method updates the DVD title table with the new update object.
+     *
      * @param update Update DVD Status update.
      */
-    public void updateDVDTitle(DVDTitleUpdate update) {
+    public void updateDVDTitle(DVDTitleUpdate update)
+    {
         titleTableModel.addTitleUpdate(update);
     }
-    
+
     /**
      * Initialize the GUI components.
      */
-    private void initComponents() {
+    private void initComponents()
+    {
 
         connInfoLbl = new JLabel("Connection Info:");
         connInfoLbl.setAlignmentX(Box.LEFT_ALIGNMENT);
-        connInfoTF  = new JTextField(connInfo);
+        connInfoTF = new JTextField(connInfo);
         connInfoTF.setColumns(30);
         connInfoTF.setAlignmentX(Box.LEFT_ALIGNMENT);
         connInfoTF.setEditable(false);
-        
+
         Box connInfoBox = Box.createVerticalBox();
         connInfoBox.add(connInfoLbl);
         connInfoBox.add(connInfoTF);
         connInfoBox.setAlignmentX(Box.CENTER_ALIGNMENT);
-        
+
         titleTableModel = new DVDTitleTableModel();
-        titleTable      = new JTable(titleTableModel);
-        titleTable.getTableHeader().setReorderingAllowed(false);  
-        
-        for(int c = 0; c < titleTable.getColumnCount(); c++) {
+        titleTable = new JTable(titleTableModel);
+        titleTable.getTableHeader().setReorderingAllowed(false);
+
+        for (int c = 0; c < titleTable.getColumnCount(); c++)
+        {
             titleTable.getColumnModel().getColumn(c).setMinWidth(
                     titleTableModel.getColumnMinWidth(c));
@@ -102,18 +113,19 @@
             titleTable.getColumnModel().getColumn(c).setResizable(true);
         }
-        
-        titlePane       = new JScrollPane();
+
+        titlePane = new JScrollPane();
         titlePane.setAlignmentX(Box.CENTER_ALIGNMENT);
         //titlePane.setMinimumSize(new Dimension(,));
-        titlePane.setPreferredSize(new Dimension(425, 225));        
+        titlePane.setPreferredSize(new Dimension(425, 225));
         titlePane.setViewportView(titleTable);
         titlePane.setBorder(BorderFactory.createTitledBorder(
-                    BorderFactory.createRaisedBevelBorder(), "Title Updates"));
+                BorderFactory.createRaisedBevelBorder(), "Title Updates"));
 
         statusTableModel = new DVDStatusTableModel();
-        statusTable      = new JTable(statusTableModel);
-        statusTable.getTableHeader().setReorderingAllowed(false);  
-        
-        for(int c = 0; c < statusTable.getColumnCount(); c++) {
+        statusTable = new JTable(statusTableModel);
+        statusTable.getTableHeader().setReorderingAllowed(false);
+
+        for (int c = 0; c < statusTable.getColumnCount(); c++)
+        {
             statusTable.getColumnModel().getColumn(c).setMinWidth(
                     statusTableModel.getColumnMinWidth(c));
@@ -124,13 +136,13 @@
             statusTable.getColumnModel().getColumn(c).setResizable(true);
         }
-        
-        statusPane       = new JScrollPane();
+
+        statusPane = new JScrollPane();
         statusPane.setAlignmentX(Box.CENTER_ALIGNMENT);
         //statusPane.setMinimumSize(new Dimension(,));
-        statusPane.setPreferredSize(new Dimension(425, 150));       
+        statusPane.setPreferredSize(new Dimension(425, 150));
         statusPane.setViewportView(statusTable);
         statusPane.setBorder(BorderFactory.createTitledBorder(
                 BorderFactory.createRaisedBevelBorder(), "Status Updates"));
-        
+
         Box panelBox = Box.createVerticalBox();
         panelBox.add(connInfoBox);
@@ -139,14 +151,11 @@
         panelBox.add(Box.createVerticalStrut(10));
         panelBox.add(statusPane);
-        panelBox.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-        
+        panelBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+
         add(panelBox);
     }
-    
     private JScrollPane titlePane;
     private JScrollPane statusPane;
-    
     private JLabel connInfoLbl;
-    
     private JTextField connInfoTF;
 }
Index: trunk/src/tmcsim/cadsimulator/viewer/CADConsoleViewer.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/viewer/CADConsoleViewer.java	(revision 44)
+++ trunk/src/tmcsim/cadsimulator/viewer/CADConsoleViewer.java	(revision 44)
@@ -0,0 +1,127 @@
+package tmcsim.cadsimulator.viewer;
+
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.Observable;
+import tmcsim.cadsimulator.viewer.model.CADSimulatorModel;
+import tmcsim.cadsimulator.viewer.model.CADSimulatorStatus;
+import tmcsim.common.CADEnums.PARAMICS_STATUS;
+import static tmcsim.common.CADEnums.SCRIPT_STATUS.ATMS_SYNCHRONIZATION;
+import static tmcsim.common.CADEnums.SCRIPT_STATUS.NO_SCRIPT;
+import static tmcsim.common.CADEnums.SCRIPT_STATUS.SCRIPT_PAUSED_STARTED;
+import static tmcsim.common.CADEnums.SCRIPT_STATUS.SCRIPT_RUNNING;
+import static tmcsim.common.CADEnums.SCRIPT_STATUS.SCRIPT_STOPPED_NOT_STARTED;
+import tmcsim.interfaces.CADViewer;
+
+/**
+ * This class provides a console to view current status information for the CAD
+ * Simulator.
+ *
+ * @see SimulationStatusPanel
+ * @see MediaStatusPanel
+ * @author Matthew Cechini
+ * @version $Revision: 1.3 $ $Date: 2006/06/06 20:46:41 $
+ */
+@SuppressWarnings("serial")
+public class CADConsoleViewer implements CADViewer
+{
+
+    /**
+     * Simulation model
+     */
+    private CADSimulatorModel cadstatus;
+    private PrintWriter display;
+
+    /**
+     * Constructor.
+     */
+    public CADConsoleViewer()
+    {
+        display = new PrintWriter(System.out, true);
+    }
+
+    public void setWriter(Writer writer)
+    {
+        display = new PrintWriter(writer, true);
+    }
+
+    public void setVisible(boolean state)
+    {
+        display.print("--- CAD Simulator ---\n");
+        display.print("Elapsed Simulation Time     : 0:00:00\n");
+        display.print("Status                      : No Script\n");
+        display.print("Connected CAD Terminals     : 0\n");
+        display.print("Simulation Manager Connected: No\n");
+        display.print("Connected to Paramics       : No\n");
+        display.print("Network Loaded              : None\n");
+        display.print("-- Info Messages --\n\n");
+        display.println("-- Error Messages --\n");
+    }
+
+    /**
+     * Method calls the processEvent() method with a WINDOW_CLOSING WindowEvent
+     * to start the application closing process.
+     */
+    public void closeViewer()
+    {
+        System.exit(0);
+    }
+
+    @Override
+    public void update(Observable obs, Object obj)
+    {
+        if (obs instanceof CADSimulatorStatus)
+        {
+            CADSimulatorStatus cadstatus = (CADSimulatorStatus) obs;
+            display.println("--- CAD Simulator ---");
+            display.println("Elapsed Simulation Time     : " + cadstatus.getCurrentTime());
+            String statusTxt = "No Script";
+            switch (cadstatus.getScriptStatus())
+            {
+                case NO_SCRIPT:
+                    statusTxt = "No Script";
+                    break;
+                case SCRIPT_STOPPED_NOT_STARTED:
+                    statusTxt = "Ready";
+                    break;
+                case SCRIPT_PAUSED_STARTED:
+                    statusTxt = "Paused";
+                    break;
+                case SCRIPT_RUNNING:
+                    statusTxt = "Running";
+                    break;
+                case ATMS_SYNCHRONIZATION:
+                    statusTxt = "Synchronizing";
+                    break;
+            }
+            display.println("Status                      : " + statusTxt);
+            display.println("Connected CAD Terminals     : " + cadstatus.getNumClients());
+            String yesno = "No";
+            if (cadstatus.isSimManagerConnected())
+            {
+                yesno = "Yes";
+            }
+            display.println("Simulation Manager Connected: " + yesno);
+            statusTxt = "No";
+            if (cadstatus.getParamicsStatus().equals(PARAMICS_STATUS.CONNECTED))
+            {
+                statusTxt = "Yes";
+            }
+            display.println("Connected to Paramics       : " + statusTxt);
+            String idTxt = "None";
+            if (cadstatus.getParmicsNetworkID().length() > 0)
+            {
+                idTxt = cadstatus.getParmicsNetworkID();
+            }
+            display.println("Network Loaded              : " + idTxt);
+            display.println("-- Info Messages --");
+            display.println(cadstatus.getInfoMessages());
+            display.println("-- Error Messages --");
+            display.println(cadstatus.getErrorMessages());
+        }
+//        if (obs instanceof CADMediaStatus)
+//        {
+//            mediaPanel.refresh(obs);
+//        }
+    }
+}
Index: trunk/src/tmcsim/cadsimulator/viewer/model/CADMediaStatus.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/viewer/model/CADMediaStatus.java	(revision 44)
+++ trunk/src/tmcsim/cadsimulator/viewer/model/CADMediaStatus.java	(revision 44)
@@ -0,0 +1,85 @@
+package tmcsim.cadsimulator.viewer.model;
+
+import java.util.Iterator;
+import java.util.Observable;
+import java.util.TreeMap;
+import tmcsim.cadsimulator.videocontrol.DVDStatusUpdate;
+import tmcsim.cadsimulator.videocontrol.DVDTitleUpdate;
+import tmcsim.cadsimulator.viewer.DVDInfoPanel;
+
+/**
+ * CADMediaStatus is the status of the DVD connections created by the CAD
+ * Simulator. All status and title updates are sent to the corresponding
+ * DVDInfoPanel. The DVDs are referenced by connection info, which is unique to
+ * each DVD player.
+ *
+ * @author jdalbey
+ */
+@SuppressWarnings("serial")
+public class CADMediaStatus extends Observable
+{
+
+    /**
+     * Map of DVDInfoPanels(values) referenced by a DVD's connection info(key).
+     */
+    private TreeMap<String, DVDInfoPanel> dvdPanels = null;
+
+    /**
+     * Constructor. Initialize data and GUI components.
+     */
+    public CADMediaStatus()
+    {
+
+        dvdPanels = new TreeMap<String, DVDInfoPanel>();
+    }
+
+    /**
+     * Updates the current DVDInfoPanel with the status update. If a panel does
+     * not current exist, create one and add a new tab.
+     *
+     * @param update DVD status update.
+     */
+    public void updateDVDStatus(DVDStatusUpdate update)
+    {
+        if (dvdPanels.get(update.connectionInfo) == null)
+        {
+            dvdPanels.put(update.connectionInfo, new DVDInfoPanel(
+                    update.connectionInfo));
+        }
+
+
+        dvdPanels.get(update.connectionInfo).updateDVDStatus(update);
+        setChanged();
+        notifyObservers();
+
+    }
+
+    public DVDInfoPanel getInfoPanel(String connectionInfo)
+    {
+        return dvdPanels.get(connectionInfo);
+    }
+
+    /**
+     * Updates the current DVDInfoPanel with the title update. If a panel does
+     * not current exist, create one and add a new tab.
+     *
+     * @param update DVD title update.
+     */
+    public void updateDVDTitle(DVDTitleUpdate update)
+    {
+        if (dvdPanels.get(update.connectionInfo) == null)
+        {
+            dvdPanels.put(update.connectionInfo, new DVDInfoPanel(update.connectionInfo));
+        }
+
+        dvdPanels.get(update.connectionInfo).updateDVDTitle(update);
+        setChanged();
+        notifyObservers();
+
+    }
+
+    public Iterator<DVDInfoPanel> getDVDlist()
+    {
+        return dvdPanels.values().iterator();
+    }
+}
Index: trunk/src/tmcsim/cadsimulator/viewer/model/CADSimulatorStatus.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/viewer/model/CADSimulatorStatus.java	(revision 44)
+++ trunk/src/tmcsim/cadsimulator/viewer/model/CADSimulatorStatus.java	(revision 44)
@@ -0,0 +1,320 @@
+package tmcsim.cadsimulator.viewer.model;
+
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import tmcsim.common.CADEnums;
+import tmcsim.common.CADEnums.PARAMICS_STATUS;
+
+/**
+ * SimulatorStatus represents the status of the current simulation. This
+ * information includes:
+ *
+ * <ul>
+ * <li>Current simulation time.</li>
+ * <li>Current simulation status.</li>
+ * <li>Number of remote CAD Clients connected.</li>
+ * <li>Status of Simulation Manager connection.</li>
+ * <li>Status of Paramics connection.</li>
+ * <li>Paramics Network Loaded</li>
+ * <li>Information log messages.</li>
+ * <li>Error log messages</li>
+ * </ul>
+ *
+ * @author jdalbey
+ * @version 0.1
+ */
+@SuppressWarnings("serial")
+public class CADSimulatorStatus extends java.util.Observable
+{
+
+    /**
+     * Count of how many CAD clients have connected.
+     */
+    private int numClientsConnected;
+    /**
+     * Is the Simulation Manager connected?
+     */
+    private boolean simMgrStatus;
+    /**
+     * The current state of the script this simulation has loaded.
+     */
+    private CADEnums.SCRIPT_STATUS scriptState;
+    /**
+     * The current simulation elapsed time.
+     */
+    private long currentTime;
+    /**
+     * The current state of the connectio to paramics
+     */
+    private PARAMICS_STATUS paramicsConnectionStatus;
+    /**
+     * ID of currently loaded paramics network
+     */
+    private String networkID;
+    /**
+     * Logging ErrorHandler.
+     */
+    private SimulatorErrorHandler errorHandler;
+    private StringBuffer infoMessages;
+    private StringBuffer errorMessages;
+
+    /**
+     * Constructor. Initialize GUI Objects. Register the logging handler to
+     * listen for log records from all loggers that exist in the
+     * "tmcsim.cadsimulator" package structure.
+     */
+    public CADSimulatorStatus()
+    {
+        errorHandler = new SimulatorErrorHandler();
+        Logger.getLogger("tmcsim.cadsimulator").addHandler(errorHandler);
+        scriptState = CADEnums.SCRIPT_STATUS.NO_SCRIPT;
+        paramicsConnectionStatus = PARAMICS_STATUS.DISCONNECTED;
+        networkID = "";
+        numClientsConnected = 0;
+        infoMessages = new StringBuffer();
+        errorMessages = new StringBuffer();
+    }
+
+    public String getInfoMessages()
+    {
+        return infoMessages.toString();
+    }
+
+    public String getErrorMessages()
+    {
+        return errorMessages.toString();
+    }
+
+    /**
+     * Method is called when a CAD Client disconnects from the CAD Simulator.
+     * The displayed number of connected clients is incremented by one.
+     */
+    public void connectClient()
+    {
+        numClientsConnected += 1;
+        setChanged();
+        notifyObservers();
+
+        //termConnectedTF.setText(String.valueOf(numClientsConnected));
+    }
+
+    /**
+     * Method is called when a CAD Client disconnects from the CAD Simulator.
+     * The displayed number of connected clients is decremented by one.
+     */
+    public void disconnectClient()
+    {
+        if (numClientsConnected > 0)
+        {
+            numClientsConnected--;
+        }
+        setChanged();
+        notifyObservers();
+
+        //termConnectedTF.setText(String.valueOf(numClientsConnected));
+    }
+
+    /**
+     * Accessor to current number of clients.
+     *
+     * @return number of connected clients
+     */
+    public int getNumClients()
+    {
+        return numClientsConnected;
+    }
+
+    /**
+     * Method is called when Simulation Manager connects or disconnects.
+     *
+     * @param connection True if simulation manager is connected, false if not.
+     */
+    public void setSimManagerStatus(boolean connection)
+    {
+        simMgrStatus = connection;
+        setChanged();
+        notifyObservers();
+
+        //managerConnectedTF.setText("Yes");
+    }
+
+    /**
+     * Accessor to Sim Mgr connection status
+     *
+     * @return number of connected clients
+     */
+    public boolean isSimManagerConnected()
+    {
+        return simMgrStatus;
+    }
+
+    /**
+     * Method called to convert current simulation time (parameter long value)
+     * to a string of format H:MM:SS. Time is then updated on GUI.
+     *
+     * @param seconds Long value of current time
+     */
+    public void setTime(long seconds)
+    {
+        currentTime = seconds;
+        setChanged();
+        notifyObservers();
+    }
+
+    public String getCurrentTime()
+    {
+        String time = new String();
+        long timeSegment;
+        long seconds = currentTime;
+        timeSegment = seconds / 3600;
+        time += String.valueOf(timeSegment) + ":";
+
+        seconds = seconds % 3600;
+
+        timeSegment = seconds / 60;
+        if (timeSegment < 10)
+        {
+            time += "0";
+        }
+
+        time += String.valueOf(timeSegment) + ":";
+        seconds = seconds % 60;
+
+        timeSegment = seconds;
+        if (timeSegment < 10)
+        {
+            time += "0";
+        }
+
+        time += String.valueOf(timeSegment);
+        return time;
+        //simulationClockLabel.setText(time);
+
+    }
+
+    /**
+     * Method is called to display the current status of the simulation.
+     *
+     * @param newStatus Current status of simulation. The following table
+     * describes each possible status and what is displayed. Each status code is
+     * found as a public static int in the Coordinator Class.
+     *
+     * <table cellpadding="2" cellspacing="2" border="1" style="text-align:
+     * left; width: 250px;">
+     * <tbody>
+     * <tr>
+     * <th>Status<br></th>
+     * <th>Actions Taken<br></th>
+     * </tr>
+     * <tr>
+     * <td>NO_SCRIPT<br></td>
+     * <td>Set the simulation status text to a black "No Script". <br></td>
+     * </tr>
+     * <tr>
+     * <td>SCRIPT_STOPPED_NOT_STARTED<br></td>
+     * <td>Set the simulation status text to a red "Ready". <br></td>
+     * </tr>
+     * <tr>
+     * <td>SCRIPT_PAUSED_STARTED<br></td>
+     * <td>Set the simulation status text to a red "Paused". <br></td>
+     * </tr>
+     * <tr>
+     * <td>SCRIPT_RUNNING<br></td>
+     * <td>Set the simulation status text to a green "Running". <br></td>
+     * </tr>
+     * <tr>
+     * <td>ATMS_SYNCHRONIZATION<br></td>
+     * <td>Set the simulation status text to an orange "Synchronizing".
+     * <br></td>
+     * </tr>
+     * </tbody>
+     * </table>
+     */
+    public void setScriptStatus(CADEnums.SCRIPT_STATUS newStatus)
+    {
+        scriptState = newStatus;
+        setChanged();
+        notifyObservers();
+    }
+
+    public CADEnums.SCRIPT_STATUS getScriptStatus()
+    {
+        return scriptState;
+    }
+
+    /**
+     * Method is called when a connection to paramics is made or dropped.
+     *
+     * @param newStatus The status denoting whether a connection has been made
+     * or dropped.
+     */
+    public void setParamicsStatus(CADEnums.PARAMICS_STATUS newStatus)
+    {
+        paramicsConnectionStatus = newStatus;
+        setChanged();
+        notifyObservers();
+    }
+
+    public CADEnums.PARAMICS_STATUS getParamicsStatus()
+    {
+        return paramicsConnectionStatus;
+    }
+
+    /**
+     * Method is called when a paramics network is loaded.
+     *
+     * @param networkID Unique ID for Paramics network that has been loaded.
+     */
+    public void setParamicsNetworkLoaded(String networkID)
+    {
+        this.networkID = networkID;
+        setChanged();
+        notifyObservers();
+    }
+
+    public String getParmicsNetworkID()
+    {
+        return networkID;
+    }
+
+    /**
+     * Logging Handler to listen for Information and Error messages logged for
+     * the CAD Simulator. Received LogRecords are displayed in the info or error
+     * message Text Area.
+     *
+     * @author Matthew Cechini
+     */
+    private class SimulatorErrorHandler extends Handler
+    {
+
+        public void close() throws SecurityException
+        {
+        }
+
+        public void flush()
+        {
+        }
+
+        public void publish(LogRecord rec)
+        {
+            StringBuffer msgBuffer = new StringBuffer();
+
+            msgBuffer.append(rec.getSourceClassName() + "."
+                    + rec.getSourceMethodName() + " = "
+                    + rec.getMessage());
+            // which panel to display in
+            if (rec.getLevel() == Level.INFO)
+            {
+                infoMessages.append(msgBuffer);
+            }
+            else
+            {
+                errorMessages.append(msgBuffer);
+            }
+            setChanged();
+            notifyObservers();
+        }
+    }
+}
Index: trunk/src/tmcsim/cadsimulator/viewer/model/CADSimulatorModel.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/viewer/model/CADSimulatorModel.java	(revision 44)
+++ trunk/src/tmcsim/cadsimulator/viewer/model/CADSimulatorModel.java	(revision 44)
@@ -0,0 +1,133 @@
+package tmcsim.cadsimulator.viewer.model;
+
+import java.util.Observer;
+import tmcsim.cadsimulator.videocontrol.DVDStatusUpdate;
+import tmcsim.cadsimulator.videocontrol.DVDTitleUpdate;
+import tmcsim.common.CADEnums.PARAMICS_STATUS;
+import tmcsim.common.CADEnums.SCRIPT_STATUS;
+
+/**
+ * CADSimulatorModel represents the state of the Simulation at any point in
+ * time. It is comprised of CADSimulatorStatus and CADMediaStatus.
+ *
+ * @author jdalbey
+ * @version $Revision: 1.3 $ $Date: 2006/06/06 20:46:41 $
+ */
+@SuppressWarnings("serial")
+public class CADSimulatorModel
+{
+
+    private CADSimulatorStatus simStatus;
+    private CADMediaStatus mediaStatus;
+
+    /**
+     * Constructor.
+     */
+    public CADSimulatorModel()
+    {
+        simStatus = new CADSimulatorStatus();
+        mediaStatus = new CADMediaStatus();
+    }
+
+    /**
+     * Make all of our delegates observers of the given view.
+     *
+     * @param view Someone that wants to observe us
+     */
+    public void addObserver(Observer view)
+    {
+//        super.addObserver(view);
+        simStatus.addObserver(view);
+        mediaStatus.addObserver(view);
+    }
+
+    /**
+     * @see SimulationStatusPanel
+     */
+    public void connectClient()
+    {
+        simStatus.connectClient();
+    }
+
+    /**
+     * @see SimulationStatusPanel
+     */
+    public void disconnectClient()
+    {
+        simStatus.disconnectClient();
+    }
+
+    /**
+     * Accessor to current number of clients.
+     *
+     * @return number of connected clients
+     */
+    public int getNumClients()
+    {
+        return simStatus.getNumClients();
+    }
+
+    /**
+     * @see SimulationStatusPanel
+     */
+    public void setSimManagerStatus(boolean connection)
+    {
+        simStatus.setSimManagerStatus(connection);
+    }
+
+    /**
+     * @see SimulationStatusPanel
+     */
+    public boolean isSimManagerConnected()
+    {
+        return simStatus.isSimManagerConnected();
+    }
+
+    /**
+     * @see SimulationStatusPanel
+     */
+    public void setTime(long seconds)
+    {
+        simStatus.setTime(seconds);
+    }
+
+    /**
+     * @see SimulationStatusPanel
+     */
+    public void setScriptStatus(SCRIPT_STATUS newStatus)
+    {
+        simStatus.setScriptStatus(newStatus);
+    }
+
+    /**
+     * @see SimulationStatusPanel
+     */
+    public void setParamicsStatus(PARAMICS_STATUS newStatus)
+    {
+        simStatus.setParamicsStatus(newStatus);
+    }
+
+    /**
+     * @see SimulationStatusPanel
+     */
+    public void setParamicsNetworkLoaded(String networkID)
+    {
+        simStatus.setParamicsNetworkLoaded(networkID);
+    }
+
+    /**
+     * @see MediaStatusPanel
+     */
+    public void updateDVDStatus(DVDStatusUpdate update)
+    {
+        mediaStatus.updateDVDStatus(update);
+    }
+
+    /**
+     * @see MediaStatusPanel
+     */
+    public void updateDVDTitle(DVDTitleUpdate update)
+    {
+        mediaStatus.updateDVDTitle(update);
+    }
+}
