JAL-3085 spike - will need to cherrypick from this branch
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 55fd185..56d993f 100644 (file)
@@ -48,7 +48,6 @@ import java.awt.Dimension;
 import java.awt.Font;
 import java.awt.FontMetrics;
 import java.awt.Graphics;
-import java.awt.Insets;
 import java.awt.event.AdjustmentEvent;
 import java.awt.event.AdjustmentListener;
 import java.awt.event.ComponentAdapter;
@@ -556,13 +555,10 @@ public class AlignmentPanel extends GAlignmentPanel implements
       /*
        * Estimate available height in the AlignFrame for alignment +
        * annotations. Deduct an estimate for title bar, menu bar, scale panel,
-       * hscroll, status bar (as these are not laid out we can't inspect their
-       * actual heights). Insets gives frame borders.
+       * hscroll, status bar, insets. 
        */
-      int stuff = Platform.isAMac() ? 80 : 100;
-      Insets insets = alignFrame.getInsets();
-      int availableHeight = alignFrame.getHeight() - stuff - insets.top
-              - insets.bottom;
+      int stuff = Platform.isAMac() ? 120 : 140;
+      int availableHeight = alignFrame.getHeight() - stuff;
 
       /*
        * If not enough vertical space, maximize annotation height while keeping
@@ -1274,7 +1270,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
     }
     Integer idwidth = null;
     if (onscreen || (idwidth = Cache
-            .getIntegerProperty("FIGURE_USERIDWIDTH")) == null)
+            .getIntegerProperty("FIGURE_FIXEDIDWIDTH")) == null)
     {
       int w = getIdPanel().getWidth();
       return (w > 0 ? w : calculateIdWidth().width + 4);
@@ -1410,6 +1406,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
     makeAlignmentImage(jalview.util.ImageMaker.TYPE.EPS, epsFile);
   }
 
+  public void makePDF(File pdfFile)
+  {
+    makeAlignmentImage(jalview.util.ImageMaker.TYPE.PDF, pdfFile);
+  }
+
   /**
    * DOCUMENT ME!
    */