Example #1
0
  /** @param f */
  void loadParameters(File f) {
    try {
      parameters = new ParameterDatabase(f, clArgs);
    } catch (FileNotFoundException ex) {
      Output.initialError(
          "A File Not Found Exception was generated upon "
              + "reading the parameter file \""
              + f.getPath()
              + "\".\nHere it is:\n"
              + ex);
    } catch (IOException ex) {
      Output.initialError(
          "An IO Exception was generated upon reading the "
              + "parameter file \""
              + f.getPath()
              + "\".\nHere it is:\n"
              + ex);
    }

    if (parameters == null) {
      Output.initialError("No parameter file was loaded");
    } else {
      paramPanel.loadParameters();
      conPanel.loadParameters();
    }
  }
Example #2
0
 void restoreFromCheckpoint(File checkpoint) {
   try {
     state = Checkpoint.restoreFromCheckpoint(checkpoint.getCanonicalPath());
     parameters = state.parameters;
     paramPanel.loadParameters();
     conPanel.loadParameters();
     paused = true;
     setStep(false);
     spawnPlayThread(true);
     stopButton.setEnabled(true);
   } catch (OptionalDataException e) {
     Output.initialError(
         "A ClassNotFoundException was generated upon"
             + "starting up from a checkpoint."
             + "\nHere it is:\n"
             + e);
   } catch (ClassNotFoundException e) {
     Output.initialError(
         "A ClassNotFoundException was generated upon"
             + "starting up from a checkpoint."
             + "\nHere it is:\n"
             + e);
   } catch (IOException e) {
     Output.initialError(
         "An IO Exception was generated upon"
             + "starting up, probably in setting up a log"
             + "\nHere it is:\n"
             + e);
   }
 }
Example #3
0
 /**
  * This method initializes jTabbedPane
  *
  * @return javax.swing.JTabbedPane
  */
 JTabbedPane getJTabbedPane() {
   if (jTabbedPane == null) {
     jTabbedPane = new JTabbedPane();
     conPanel = new ControlPanel(this);
     conPanel.disableControls();
     jTabbedPane.add("Control", conPanel);
     paramPanel = new ParametersPanel(this);
     jTabbedPane.add("Parameters", paramPanel);
     jTabbedPane.addTab("Statistics", null, getStatisticsPane(), null);
     jTabbedPane.addTab("Inspection", null, getInspectionPane(), null);
   }
   return jTabbedPane;
 }