import jalview.api.AlignExportSettingsI;
import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.datamodel.AlignExportSettingsAdapter;
import jalview.datamodel.AlignmentExportData;
import jalview.gui.AlignmentPanel;
import jalview.gui.IProgressIndicator;
+import jalview.io.exceptions.ImageOutputException;
import jalview.util.MessageManager;
public abstract class HTMLOutput implements Runnable
}
else
{
- System.out.println(message);
+ jalview.bin.Console.outPrintln(message);
}
}
return generatedFile;
}
- public void exportHTML(String outputFile)
+ public void exportHTML(String outputFile) throws ImageOutputException
+ {
+ exportHTML(outputFile, null);
+ }
+
+ public void exportHTML(String outputFile, String renderer) throws ImageOutputException
{
setProgressMessage(MessageManager.formatMessage(
"status.exporting_alignment_as_x_file", getDescription()));
e.printStackTrace();
return;
}
- new Thread(this).start();
+ if (Jalview.isHeadlessMode())
+ {
+ this.run(renderer);
+ }
+ else
+ {
+ new Thread(this).start();
+ }
}
{
return description;
}
+
+ // used to pass an option such as render to run
+ public abstract void run(String string) throws ImageOutputException;
}
\ No newline at end of file