X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignmentPanel.java;h=541c7c29104d93a80632f0c8e65186ee86f7f1c6;hb=865a855a4ca87eadb3e5ff284ed32ed307d9c34b;hp=f8a2543ffd6d906b6c74a20b3be031438f77c228;hpb=ad20cd92225f2ee8c251d39b00b90555d382a616;p=jalview.git diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index f8a2543..541c7c2 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * @@ -14,6 +14,7 @@ * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.gui; @@ -688,7 +689,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); } @@ -1094,7 +1095,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" @@ -1115,8 +1118,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 @@ -1184,7 +1186,7 @@ public class AlignmentPanel extends GAlignmentPanel implements } } finally { - if (alignFrame != null) + if (alignFrame != null && !headless) { alignFrame.setProgressBar("Export complete.", progress); }