correct eps png bug missing last 2 lines
authoramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 09:55:17 +0000 (09:55 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 09:55:17 +0000 (09:55 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignmentPanel.java

index 867de61..ca9903c 100755 (executable)
@@ -116,31 +116,12 @@ public class AlignFrame extends GAlignFrame
 \r
   protected void createPNG_actionPerformed(ActionEvent e)\r
   {\r
-    int height = (viewport.alignment.getWidth() / viewport.getChunkWidth() +1) * viewport.chunkHeight;\r
-    int width = alignPanel.seqPanel.getWidth() + alignPanel.idPanel.getWidth();\r
-\r
-    if(!viewport.getWrapAlignment())\r
-    {\r
-      height = viewport.alignment.getHeight() * viewport.charHeight;\r
-      width = alignPanel.idPanel.getWidth() + viewport.alignment.getWidth() * viewport.charWidth;\r
-    }\r
-\r
-    alignPanel.makePNG( width, height);\r
+    alignPanel.makePNG();\r
   }\r
 \r
   protected void epsFile_actionPerformed(ActionEvent e)\r
   {\r
-    int height = (viewport.alignment.getWidth() / viewport.getChunkWidth() +1) * viewport.chunkHeight;\r
-    int width = alignPanel.seqPanel.getWidth() + alignPanel.idPanel.getWidth();\r
-\r
-    if(!viewport.getWrapAlignment())\r
-    {\r
-      height = viewport.alignment.getHeight() * viewport.charHeight;\r
-      width = alignPanel.idPanel.getWidth() + viewport.alignment.getWidth() * viewport.charWidth;\r
-    }\r
-\r
-    alignPanel.makeEPS( width, height);\r
-\r
+    alignPanel.makeEPS();\r
   }\r
 \r
 \r
@@ -1051,7 +1032,7 @@ if ( viewport.getConservationSelected() )
     // Need visual-delay indication here.\r
     public void run()\r
        {\r
-         jalview.ws.Jemboss jemboss = new jalview.ws.Jemboss();\r
+      /*   jalview.ws.Jemboss jemboss = new jalview.ws.Jemboss();\r
          Vector sv = viewport.getAlignment().getSequences();\r
          SequenceI[] seqs = new SequenceI[sv.size()];\r
 \r
@@ -1097,12 +1078,12 @@ if ( viewport.getConservationSelected() )
   }\r
   public void jpredMenuItem_actionPerformed(ActionEvent e)\r
     {\r
-      JInternalFrame frame = new JInternalFrame();\r
-      JPredClient ct = new JPredClient((SequenceI)\r
-                                       viewport.getAlignment().getSequences().elementAt(0));\r
+    //  JInternalFrame frame = new JInternalFrame();\r
+//      JPredClient ct = new JPredClient((SequenceI)\r
+    ///                                   viewport.getAlignment().getSequences().elementAt(0));\r
     }\r
 \r
-\r
+*/}}\r
   protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) {\r
     // Pick the tree file\r
     JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.\r
index 4a2e3f1..76fc8d5 100755 (executable)
@@ -434,7 +434,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
     }\r
 \r
     // draw main sequence panel\r
-    pg.translate(idWidth,0);\r
+    pg.translate(idWidth+4,0);\r
     pg.setClip(0,0,pwidth-idWidth, pheight);\r
     seqPanel.seqCanvas.drawPanel(pg,startRes,endRes,startSeq,endSeq,startRes,startSeq,0);\r
 \r
@@ -492,7 +492,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
     }\r
 \r
     // draw main sequence panel\r
-    pg.translate(idWidth,0);\r
+    pg.translate(idWidth+4,0);\r
     seqPanel.seqCanvas.drawWrappedPanel(pg, pwidth-idWidth, pheight, pi*noChunksOnPage*chunkWidth);\r
 \r
 \r
@@ -501,8 +501,17 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
   }\r
 \r
 \r
-  public void makeEPS(int width, int height)\r
+  public void makeEPS()\r
   {\r
+    int height = (av.alignment.getWidth() / av.getChunkWidth() +1) * av.chunkHeight;\r
+    int width = seqPanel.getWidth() + idPanel.getWidth();\r
+\r
+    if (!av.getWrapAlignment())\r
+    {\r
+      height = (av.alignment.getHeight()+1) * av.charHeight + 30;\r
+      width = idPanel.getWidth() + av.alignment.getWidth() * av.charWidth;\r
+    }\r
+\r
     try\r
     {\r
       jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser(jalview.bin.Cache.getProperty(\r
@@ -534,8 +543,19 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
     }\r
   }\r
 \r
-  public void makePNG(int width, int height)\r
+  public void makePNG()\r
   {\r
+      int height = (av.alignment.getWidth() / av.getChunkWidth() +1) * av.chunkHeight;\r
+      int width = seqPanel.getWidth() + idPanel.getWidth();\r
+\r
+      if (!av.getWrapAlignment())\r
+      {\r
+        height = (av.alignment.getHeight()+1) * av.charHeight + 30;\r
+        width = idPanel.getWidth() + av.alignment.getWidth() * av.charWidth;\r
+      }\r
+\r
+\r
+\r
     try\r
     {\r
       jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser(jalview.bin.Cache.getProperty(\r