X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignmentPanel.java;h=4a679b69f673c7233bebce5e60e295d3a3164dd0;hb=6fb502e4a8749d1d98f5442c3b8156ab47996b77;hp=a283c012096f90bb992608a4a55b1bd7fa189249;hpb=59d682209891099d46b960509907c79e3fb276fe;p=jalview.git diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index a283c01..4a679b6 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -19,7 +19,6 @@ package jalview.gui; import java.beans.*; import java.io.*; -import java.util.Hashtable; import java.awt.*; import java.awt.event.*; @@ -689,7 +688,7 @@ public class AlignmentPanel extends GAlignmentPanel implements seqPanel.seqCanvas.fastPaint(scrollX, scrollY); scalePanel.repaint(); - if (av.getShowAnnotation()) + if (av.getShowAnnotation() && scrollX!=0) { annotationPanel.fastPaint(scrollX); } @@ -1095,7 +1094,9 @@ public class AlignmentPanel extends GAlignmentPanel implements 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" @@ -1116,8 +1117,7 @@ public class AlignmentPanel extends GAlignmentPanel implements 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 @@ -1185,7 +1185,7 @@ public class AlignmentPanel extends GAlignmentPanel implements } } finally { - if (alignFrame != null) + if (alignFrame != null && !headless) { alignFrame.setProgressBar("Export complete.", progress); }