import jalview.gui.AlignViewport;
import jalview.gui.AlignmentPanel;
import jalview.gui.HTMLOptions;
+import jalview.gui.IProgressIndicator;
+import jalview.gui.OOMWarning;
import jalview.math.AlignmentDimension;
import jalview.util.MessageManager;
public void generateHtmlSvgOutput(File file)
{
+ IProgressIndicator pIndicator = ap.alignFrame;
+ long pSessionId = System.currentTimeMillis();
try
{
+ boolean headless = (System.getProperty("java.awt.headless") != null && System
+ .getProperty("java.awt.headless").equals("true"));
if (file == null)
{
-
+ if (pIndicator != null && !headless)
+ {
+ pIndicator.setProgressBar(MessageManager.formatMessage(
+ "status.waiting_for_user_to_select_output_file", "HTML"),
+ pSessionId);
+ }
JalviewFileChooser chooser = getHTMLChooser();
chooser.setFileView(new jalview.io.JalviewFileView());
chooser.setDialogTitle(ap.alignFrame.getTitle());
}
else
{
+
+ if (pIndicator != null && !headless)
+ {
+ pIndicator.setProgressBar(MessageManager.formatMessage(
+ "status.cancelled_image_export_operation", "HTML"),
+ pSessionId);
+ }
return;
}
}
{
jalview.util.BrowserLauncher.openURL("file:///" + file);
}
+ if (pIndicator != null && !headless)
+ {
+ pIndicator.setProgressBar(MessageManager.formatMessage(
+ "status.export_complete", "HTML"), pSessionId);
+ }
+ } catch (OutOfMemoryError err)
+ {
+ System.out.println("########################\n" + "OUT OF MEMORY "
+ + file + "\n" + "########################");
+ new OOMWarning("Creating Image for " + file, err);
} catch (Exception e)
{
e.printStackTrace();
+ pIndicator.setProgressBar(MessageManager.formatMessage(
+ "info.error_creating_file", "HTML"), pSessionId);
}
}