void makeAlignmentImage(int type, File file)
{
long progress = System.currentTimeMillis();
- if (alignFrame != null)
+ boolean headless = (System.getProperty("java.awt.headless") != null
+ && System.getProperty("java.awt.headless").equals("true"));
+ if (alignFrame != null && !headless)
{
alignFrame.setProgressBar("Saving "
+ (type == jalview.util.ImageMaker.PNG ? "PNG image"
if (av.getWrapAlignment())
{
height = getWrappedHeight();
- if (System.getProperty("java.awt.headless") != null
- && System.getProperty("java.awt.headless").equals("true"))
+ if (headless)
{
// need to obtain default alignment width and then add in any
// additional allowance for id margin
}
} finally
{
- if (alignFrame != null)
+ if (alignFrame != null && !headless)
{
alignFrame.setProgressBar("Export complete.", progress);
}