JAL-1432 updated copyright notices
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index c392b1c..541c7c2 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
 package jalview.gui;
 
@@ -485,7 +486,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
         return false;
       }
 
-      //fastPaint = false;
+      fastPaint = false;
       vscroll.setValue(vscroll.getValue() - 1);
     }
     else
@@ -495,11 +496,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
         return false;
       }
 
-      //fastPaint = false;
+      fastPaint = false;
       vscroll.setValue(vscroll.getValue() + 1);
     }
 
-    //fastPaint = true;
+    fastPaint = true;
 
     return true;
   }
@@ -521,7 +522,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
         return false;
       }
 
-      //fastPaint = false;
+      fastPaint = false;
       hscroll.setValue(hscroll.getValue() - 1);
     }
     else
@@ -531,11 +532,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
         return false;
       }
 
-      //fastPaint = false;
+      fastPaint = false;
       hscroll.setValue(hscroll.getValue() + 1);
     }
 
-    //fastPaint = true;
+    fastPaint = true;
 
     return true;
   }
@@ -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);
       }