Changeset 26 in tmcsimulator for trunk/src/tmcsim/paramicscommunicator


Ignore:
Timestamp:
04/26/2016 06:50:09 PM (10 years ago)
Author:
jdalbey
Message:

CADSimulatorNetworkTest added, modifed ParamicsCommunicator? to check for a property if it should run without a GUI (for testing).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/paramicscommunicator/ParamicsCommunicator.java

    r25 r26  
    7474 
    7575        SOCKET_PORT("SocketPort"), 
    76         WORKING_DIR("WorkingDirectory"); 
     76        WORKING_DIR("WorkingDirectory"), 
     77        GUI_VISIBLE("GUIvisible"); 
    7778        public String name; 
    7879 
     
    139140        readers = new TreeMap<String, ParamicsFileReader>(); 
    140141 
    141         theGUI = new ParamicsCommunicatorGUI(); 
    142         addObserver(theGUI); 
    143         theGUI.addWindowListener(new WindowListener() 
    144         { 
    145             public void windowActivated(WindowEvent arg0) 
    146             { 
    147             } 
    148  
    149             ; 
    150             public void windowClosed(WindowEvent arg0) 
    151             { 
    152             } 
    153  
    154             ; 
    155             public void windowClosing(WindowEvent arg0) 
    156             { 
    157                 System.exit(0); 
    158             } 
    159  
    160             public void windowDeactivated(WindowEvent arg0) 
    161             { 
    162             } 
    163  
    164             ; 
    165             public void windowDeiconified(WindowEvent arg0) 
    166             { 
    167             } 
    168  
    169             ; 
    170             public void windowIconified(WindowEvent arg0) 
    171             { 
    172             } 
    173  
    174             ; 
    175             public void windowOpened(WindowEvent arg0) 
    176             { 
    177             } 
    178         ; 
    179         }); 
    180  
    181142        try 
    182143        { 
     
    247208        } 
    248209 
     210        // Should we display the GUI? 
     211        String visibleProp = paramicsCommProp.getProperty(PROPERTIES.GUI_VISIBLE.name); 
     212        // If no property was given, or if it was given and says True 
     213        if (visibleProp == null || (visibleProp.toLowerCase().equals("true"))) 
     214        { 
     215            theGUI = new ParamicsCommunicatorGUI(); // it sets itself visible 
     216            addObserver(theGUI); 
     217            theGUI.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE); 
     218        } 
    249219 
    250220        try 
Note: See TracChangeset for help on using the changeset viewer.