Changeset 47 in tmcsimulator for trunk/src/tmcsim/simulationmanager/SimulationManager.java
- Timestamp:
- 06/28/2016 02:25:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/simulationmanager/SimulationManager.java
r33 r47 9 9 import java.util.logging.Level; 10 10 import java.util.logging.Logger; 11 12 11 import javax.swing.JOptionPane; 13 12 import javax.swing.UIManager; 14 15 13 import tmcsim.common.CADEnums.PARAMICS_STATUS; 14 import tmcsim.common.ScriptException; 16 15 import tmcsim.common.SimulationException; 17 16 … … 48 47 49 48 private static final String CONFIG_FILE_NAME = "sim_manager_config.properties"; 50 /**49 /** 51 50 * Error logger. 52 51 */ … … 192 191 193 192 /** 193 * Load a simulation script from the specified file. 194 * 195 * @param scriptFile the XML file containing the simulation control script 196 * to be run. 197 * @throws ScriptException if the script throws an exception 198 * @throws SimulationException if the simulation throws an exception 199 */ 200 public void loadScript(File scriptFile) throws ScriptException, SimulationException 201 { 202 theSimManagerModel.loadScript(scriptFile); 203 } 204 205 /** 194 206 * Main class. 195 207 * 196 208 * @param args Command line arguments. 197 209 */ 198 static public void main(String[] args) { 210 static public void main(String[] args) 211 { 199 212 //System.setProperty("swing.defaultlaf", "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); 200 if(System.getProperty("CONFIG_DIR") == null){ 201 System.setProperty("CONFIG_DIR", "config"); 202 } 203 204 try { 205 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 213 if (System.getProperty("CONFIG_DIR") == null) 214 { 215 System.setProperty("CONFIG_DIR", "config"); 216 } 217 218 try 219 { 220 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 206 221 new SimulationManager(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + CONFIG_FILE_NAME); 207 } catch (Exception e) { 222 } catch (Exception e) 223 { 208 224 simManLogger.logp(Level.SEVERE, "SimulationManager", "Main", 209 225 "Error occured initializing application", e);
Note: See TracChangeset
for help on using the changeset viewer.
