wrap align correction for last row
authoramwaterhouse <Andrew Waterhouse>
Fri, 6 May 2005 17:07:02 +0000 (17:07 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 6 May 2005 17:07:02 +0000 (17:07 +0000)
src/jalview/appletgui/IdCanvas.java
src/jalview/appletgui/SeqCanvas.java
src/jalview/gui/IdCanvas.java
src/jalview/gui/SeqCanvas.java

index cc042ed..80533f2 100755 (executable)
@@ -135,7 +135,7 @@ public class IdCanvas extends Panel
           int rowSize =  av.getEndRes() - av.getStartRes();\r
           // Draw the rest of the panels\r
 \r
-          for(int ypos=2*av.charHeight, row=av.getEndRes()-rowSize;\r
+          for(int ypos=2*av.charHeight, row=av.startRes;\r
               ypos <= getSize().height && row<av.alignment.getWidth();\r
               ypos += av.chunkHeight, row+=rowSize )\r
           {\r
index 4305abe..679d48b 100755 (executable)
@@ -250,6 +250,8 @@ public void fastPaint(int horizontal, int vertical)
       int cWidth  =   (canvasWidth - LABEL_EAST -LABEL_WEST)/av.charWidth;\r
       int cHeight =  (av.getAlignment().getHeight() + 2)*av.charHeight;\r
 \r
+      av.endRes = av.startRes + cWidth;\r
+\r
       int  endx   = startRes+cWidth-1;\r
       int  ypos  = 2*av.charHeight;\r
 \r
index d7a034c..048fb37 100755 (executable)
@@ -132,7 +132,7 @@ public class IdCanvas extends JPanel
           int rowSize =  av.getEndRes() - av.getStartRes();\r
           // Draw the rest of the panels\r
 \r
-          for(int ypos=2*av.charHeight, row=av.getEndRes()-rowSize;\r
+          for(int ypos=2*av.charHeight, row=av.startRes;\r
               ypos <= getHeight() && row<av.alignment.getWidth();\r
               ypos += av.chunkHeight, row+=rowSize )\r
           {\r
index f3e7532..1a8ae3d 100755 (executable)
@@ -252,6 +252,8 @@ public void fastPaint(int horizontal, int vertical)
       int cWidth  =   (canvasWidth - LABEL_EAST -LABEL_WEST)/av.charWidth;\r
       int cHeight =  (av.getAlignment().getHeight() + 2)*av.charHeight;\r
 \r
+      av.endRes = av.startRes + cWidth;\r
+\r
       int  endx   = startRes+cWidth-1;\r
       int  ypos  = 2*av.charHeight;\r
 \r