X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FHtmlSvgOutput.java;h=b8241c8763662923e234a55e2f7d16e0d1f7282d;hb=39f35c9fc1fb8270d93ba06aa83f3dfbd18dd4a2;hp=1f828538b2fe13f1c7fb339658f88dd5d3943d20;hpb=1e28a196997a1e0b8b74d468bfd3df8ec74c1337;p=jalview.git diff --git a/src/jalview/io/HtmlSvgOutput.java b/src/jalview/io/HtmlSvgOutput.java index 1f82853..b8241c8 100644 --- a/src/jalview/io/HtmlSvgOutput.java +++ b/src/jalview/io/HtmlSvgOutput.java @@ -26,7 +26,6 @@ import jalview.gui.LineartOptions; import jalview.gui.OOMWarning; import jalview.math.AlignmentDimension; import jalview.util.MessageManager; -import jalview.util.dialogrunner.RunResponse; import java.awt.Graphics; import java.awt.print.PrinterException; @@ -35,8 +34,6 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; -import javax.swing.JOptionPane; - import org.jfree.graphics2d.svg.SVGGraphics2D; import org.jfree.graphics2d.svg.SVGHints; @@ -44,34 +41,7 @@ public class HtmlSvgOutput extends HTMLOutput { public HtmlSvgOutput(AlignmentPanel ap) { - super(ap); - } - - @Override - public void exportHTML(String outputFile) - { - exportStarted(); - try - { - if (outputFile == null) - { - outputFile = getOutputFile(); - if (outputFile == null) - { - setProgressMessage(MessageManager.formatMessage( - "status.cancelled_image_export_operation", "HTML")); - return; - } - } - generatedFile = new File(outputFile); - } catch (Exception e) - { - setProgressMessage(MessageManager - .formatMessage("info.error_creating_file", "HTML")); - e.printStackTrace(); - return; - } - new Thread(this).start(); + super(ap, "HTML"); } public int printUnwrapped(int pwidth, int pheight, int pi, @@ -233,10 +203,6 @@ public class HtmlSvgOutput extends HTMLOutput { try { - setProgressMessage(null); - setProgressMessage(MessageManager.formatMessage( - "status.exporting_alignment_as_x_file", getDescription())); - String renderStyle = Cache.getDefault("HTML_RENDERING", "Prompt each time"); AtomicBoolean textOption = new AtomicBoolean( @@ -245,7 +211,7 @@ public class HtmlSvgOutput extends HTMLOutput /* * configure the action to run on OK in the dialog */ - RunResponse okAction = new RunResponse(JOptionPane.OK_OPTION) + Runnable okAction = new Runnable() { @Override public void run() @@ -260,7 +226,7 @@ public class HtmlSvgOutput extends HTMLOutput if (renderStyle.equalsIgnoreCase("Prompt each time") && !isHeadless()) { LineartOptions svgOption = new LineartOptions("HTML", textOption); - svgOption.setResponseAction(1, new RunResponse(JOptionPane.NO_OPTION) + svgOption.setResponseAction(1, new Runnable() { @Override public void run() @@ -349,10 +315,4 @@ public class HtmlSvgOutput extends HTMLOutput .formatMessage("info.error_creating_file", getDescription())); } } - - @Override - protected String getDescription() - { - return "HTML"; - } }