Ejemplo n.º 1
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);
   }
 }
Ejemplo n.º 2
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();
    }
  }