Exemple #1
0
  /**
   * @author boconno3, elee3
   *     <p>Exports the applicaition model to store on a file on computer for future use.
   */
  private void exportModel() {
    String pathOutputFile = view.showInputDialog("Where would you like to save the MATS model?");
    try {
      model.exportMATSModel(pathOutputFile);
    } catch (Exception exception) {
      view.showMessageDialog("Exporting file failed - exception: " + exception);
    }

    view.appendToProjectTextArea("Export Project Successfuly");
  }
Exemple #2
0
  /**
   * @author boconno3, elee3, asaini, rparames
   *     <p>This method will load a serialized file that has been saved ( a MATS system ) as the
   *     current project collection (will also load its users)
   */
  private void load() {

    String pathInputFile =
        view.showInputDialog("Where would you like to load the MATS model from?");
    try {
      setModel(MATSModel.importMATSModel(pathInputFile));
      view.setModel(model);
      view.enableImportedSystemMenuOptions();
    } catch (Exception exception) {
      view.showMessageDialog("Importing file failed - exception: " + exception);
    }

    view.enableImportedSystemMenuOptions();
    view.appendToProjectTextArea("Imported Project Successfuly");
  }