JAL-3048 all image export (alignment, tree, PCA, Jmol) now via ImageExporter and...
[jalview.git] / src / jalview / io / BioJsHTMLOutput.java
index 52ce845..11436d3 100644 (file)
@@ -20,7 +20,6 @@
  */
 package jalview.io;
 
-import jalview.exceptions.NoFileSelectedException;
 import jalview.gui.AlignmentPanel;
 import jalview.gui.OOMWarning;
 import jalview.json.binding.biojs.BioJSReleasePojo;
@@ -41,7 +40,6 @@ import java.util.TreeMap;
 
 public class BioJsHTMLOutput extends HTMLOutput
 {
-
   private static File currentBJSTemplateFile;
 
   private static TreeMap<String, File> bioJsMSAVersions;
@@ -61,33 +59,6 @@ public class BioJsHTMLOutput extends HTMLOutput
     super(ap);
   }
 
-  @Override
-  public void exportHTML(String outputFile)
-  {
-    exportStarted();
-    try
-    {
-      if (outputFile == null)
-      {
-        outputFile = getOutputFile();
-      }
-      generatedFile = new File(outputFile);
-    } catch (NoFileSelectedException e)
-    {
-      setProgressMessage(MessageManager.formatMessage(
-              "status.cancelled_image_export_operation", "BioJS MSA"));
-      return;
-    } catch (Exception e)
-    {
-      setProgressMessage(MessageManager
-              .formatMessage("info.error_creating_file", "BioJS MSA"));
-      e.printStackTrace();
-      return;
-    }
-    new Thread(this).start();
-
-  }
-
   public static void refreshVersionInfo(String dirName)
           throws URISyntaxException
   {
@@ -271,12 +242,6 @@ public class BioJsHTMLOutput extends HTMLOutput
   }
 
   @Override
-  public File getExportedFile()
-  {
-    return generatedFile;
-  }
-
-  @Override
   public void run()
   {
     try
@@ -293,7 +258,7 @@ public class BioJsHTMLOutput extends HTMLOutput
       out.flush();
       out.close();
       setProgressMessage(MessageManager
-              .formatMessage("status.export_complete", "BioJS"));
+              .formatMessage("status.export_complete", getDescription()));
       exportCompleted();
 
     } catch (OutOfMemoryError err)
@@ -304,10 +269,16 @@ public class BioJsHTMLOutput extends HTMLOutput
     } catch (Exception e)
     {
       setProgressMessage(MessageManager
-              .formatMessage("info.error_creating_file", "HTML"));
+              .formatMessage("info.error_creating_file", getDescription()));
       e.printStackTrace();
     }
 
   }
 
+  @Override
+  protected String getDescription()
+  {
+    return "BioJS MSA";
+  }
+
 }