fix printing error
authoramwaterhouse <Andrew Waterhouse>
Thu, 24 Mar 2005 08:52:23 +0000 (08:52 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 24 Mar 2005 08:52:23 +0000 (08:52 +0000)
src/jalview/gui/AlignmentPanel.java

index 506fb09..d8131b4 100755 (executable)
@@ -381,7 +381,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
   public int printUnwrapped(Graphics pg, int pwidth, int pheight, int pi) throws PrinterException\r
   {\r
 \r
-    int idWidth = calculateIdWidth().width;\r
+    int idWidth = calculateIdWidth().width + 4;\r
 \r
 \r
     pg.setColor(Color.white);\r
@@ -414,10 +414,10 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
 \r
     ////////////////\r
     //draw Scale\r
-    pg.translate(30,0);\r
+    pg.translate(idWidth,0);\r
     scalePanel.drawScale(pg, startRes, endRes, pwidth-idWidth);\r
 \r
-    pg.translate(-30, 30);\r
+    pg.translate(-idWidth, 30);\r
     ////////////////\r
     // Draw the ids\r
     Color currentColor=null;\r
@@ -451,7 +451,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
     }\r
 \r
     // draw main sequence panel\r
-    pg.translate(idWidth+4,0);\r
+    pg.translate(idWidth,0);\r
     pg.setClip(0,0,pwidth-idWidth, pheight);\r
     seqPanel.seqCanvas.drawPanel(pg,startRes,endRes,startSeq,endSeq,startRes,startSeq,0);\r
 \r
@@ -462,7 +462,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
   public int printWrappedAlignment(Graphics pg, int pwidth, int pheight, int pi) throws PrinterException\r
   {\r
 \r
-    int idWidth = calculateIdWidth().width;\r
+    int idWidth = calculateIdWidth().width+4;\r
 \r
     if( seqPanel.seqCanvas.getWidth() < pwidth-idWidth)\r
       pwidth = seqPanel.seqCanvas.getWidth() + idWidth;\r
@@ -509,7 +509,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
     }\r
 \r
     // draw main sequence panel\r
-    pg.translate(idWidth+4,0);\r
+    pg.translate(idWidth,0);\r
     seqPanel.seqCanvas.drawWrappedPanel(pg, pwidth-idWidth, pheight, pi*noChunksOnPage*chunkWidth);\r
 \r
 \r