JAL-3253 preliminary static fixes for JavaScript
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 20f8cd1..20d06e9 100644 (file)
@@ -550,6 +550,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
     // Note in JComponent:
     // This method is called by the toolkit internally and should
     // not be called directly by programs.
+    // I note that addNotify() is called in several areas of Jalview.
 
     int annotationHeight = getAnnotationPanel().adjustPanelHeight();
     annotationHeight = getAnnotationPanel()
@@ -1375,8 +1376,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
   {
     int seqPanelWidth = getSeqPanel().seqCanvas.getWidth();
 
-    if (System.getProperty("java.awt.headless") != null
-            && System.getProperty("java.awt.headless").equals("true"))
+    if (Jalview.isHeadlessMode())
     {
       seqPanelWidth = alignFrame.getWidth() - getVisibleIdWidth()
               - vscroll.getPreferredSize().width