Merge branch 'develop' into features/filetypeEnum
[jalview.git] / src / jalview / io / BioJsHTMLOutput.java
index f8fa1f5..80df097 100644 (file)
@@ -22,12 +22,15 @@ package jalview.io;
 
 import jalview.api.AlignExportSettingI;
 import jalview.api.AlignmentViewPanel;
+import jalview.bin.Cache;
 import jalview.datamodel.AlignmentExportData;
 import jalview.exceptions.NoFileSelectedException;
+import jalview.gui.AlignFrame;
 import jalview.gui.IProgressIndicator;
 import jalview.gui.OOMWarning;
 import jalview.json.binding.biojs.BioJSReleasePojo;
 import jalview.json.binding.biojs.BioJSRepositoryPojo;
+import jalview.util.ImageMaker;
 import jalview.util.MessageManager;
 
 import java.io.BufferedInputStream;
@@ -125,11 +128,11 @@ public class BioJsHTMLOutput
         }
 
       };
-      AlignmentExportData exportData = jalview.gui.AlignFrame
-              .getAlignmentForExport(JSONFile.FILE_DESC,
+      AlignmentExportData exportData = AlignFrame
+              .getAlignmentForExport(FileFormat.Json,
                       ap.getAlignViewport(), exportSettings);
       String bioJSON = new FormatAdapter(ap, exportData.getSettings())
-              .formatSequences(JSONFile.FILE_DESC, exportData
+              .formatSequences(FileFormat.Json, exportData
                       .getAlignment(), exportData.getOmitHidden(),
                       exportData.getStartEndPostions(), ap
                               .getAlignViewport().getColumnSelection());
@@ -176,9 +179,8 @@ public class BioJsHTMLOutput
     }
 
     JalviewFileChooser jvFileChooser = new JalviewFileChooser(
-            jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
-            new String[] { "html" }, new String[] { "HTML files" },
-            "HTML files");
+            Cache.getProperty("LAST_DIRECTORY"), ImageMaker.HTML_EXTENSION,
+            ImageMaker.HTML_EXTENSION, ImageMaker.HTML_EXTENSION);
     jvFileChooser.setFileView(new JalviewFileView());
 
     jvFileChooser.setDialogTitle(MessageManager
@@ -188,7 +190,7 @@ public class BioJsHTMLOutput
     int fileChooserOpt = jvFileChooser.showSaveDialog(null);
     if (fileChooserOpt == JalviewFileChooser.APPROVE_OPTION)
     {
-      jalview.bin.Cache.setProperty("LAST_DIRECTORY", jvFileChooser
+      Cache.setProperty("LAST_DIRECTORY", jvFileChooser
               .getSelectedFile().getParent());
       selectedFile = jvFileChooser.getSelectedFile().getPath();
     }