Example #1
0
 public boolean saveAs() {
   final boolean[] success = new boolean[] {false};
   FileSaveDialog d =
       new FileSaveDialog(this, "jsmaa", "JSMAA model files") {
         public void doAction(String path, String extension) {
           File file = checkFileExtension(new File(path));
           success[0] = trySaveModel(file);
           modelManager.setModelFile(file);
         }
       };
   d.saveActions();
   return success[0];
 }
Example #2
0
 private void saveAsHtmlDialog(final Component component) {
   FileSaveDialog dialog =
       new FileSaveDialog(component, "html", "HTML files") {
         @Override
         public void doAction(String path, String extension) {
           try {
             saveD80ToHtmlFile(path);
           } catch (IOException e) {
             throw new RuntimeException("Could not save html file", e);
           }
         }
       };
   dialog.saveActions();
 }