for now, draw selection box bottom -1
authoramwaterhouse <Andrew Waterhouse>
Thu, 7 Apr 2005 16:58:38 +0000 (16:58 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 7 Apr 2005 16:58:38 +0000 (16:58 +0000)
src/jalview/gui/SeqCanvas.java

index 5782661..caf93fc 100755 (executable)
@@ -81,8 +81,8 @@ public void fastPaint(int horizontal, int vertical)
 \r
     gg.translate(transX, transY);\r
 \r
-    drawPanel(gg, sr, er, ss, es, sr, ss, 0);\r
 \r
+    drawPanel(gg, sr, er, ss, es, sr, ss, 0);\r
     gg.translate( -transX, -transY);\r
 \r
     fastPaint = true;\r
@@ -172,7 +172,6 @@ public void fastPaint(int horizontal, int vertical)
 \r
   public void drawPanel(Graphics g1,int x1,int x2, int y1, int y2,int startx, int starty,int offset) {\r
 \r
-\r
    Graphics2D g = (Graphics2D)g1;\r
     g.setFont(av.getFont());\r
     RendererI sr = av.getRenderer();\r
@@ -209,7 +208,7 @@ public void fastPaint(int horizontal, int vertical)
     /////////////////////////////\r
     for (int i = y1 ; i < y2 ;i++)\r
     {\r
-     nextSeq = av.getAlignment().getSequenceAt(i);\r
+     nextSeq = av.alignment.getSequenceAt(i);\r
 \r
      sr.drawSequence(g, nextSeq, av.alignment.findAllGroups( nextSeq ),x1,x2,\r
                  (x1 - startx) * av.charWidth,\r
@@ -262,7 +261,7 @@ public void fastPaint(int horizontal, int vertical)
 \r
             if (bottom == -1 &&\r
                 !group.sequences.contains(av.alignment.getSequenceAt(i + 1)))\r
-              bottom = sy + av.charHeight -1;\r
+              bottom = sy + av.charHeight ;\r
 \r
             if (!inGroup)\r
             {\r
@@ -270,6 +269,7 @@ public void fastPaint(int horizontal, int vertical)
                   !group.sequences.contains(av.alignment.getSequenceAt(i - 1)))\r
                 top = sy;\r
 \r
+\r
               oldY = sy;\r
               inGroup = true;\r
               if (group == av.getSelectionGroup())\r
@@ -288,13 +288,20 @@ public void fastPaint(int horizontal, int vertical)
           {\r
             if (inGroup)\r
             {\r
-\r
               g.drawLine(sx, oldY, sx, sy );\r
               g.drawLine(sx+ex, oldY, sx+ex, sy );\r
+\r
               if (top != -1)\r
+              {\r
                 g.drawLine(sx, top, sx + ex, top);\r
+                top =-1;\r
+              }\r
               if (bottom != -1)\r
+              {\r
                 g.drawLine(sx, bottom, sx + ex, bottom);\r
+                bottom = -1;\r
+              }\r
+\r
 \r
               inGroup = false;\r
             }\r
@@ -305,10 +312,16 @@ public void fastPaint(int horizontal, int vertical)
         {\r
 \r
           if(top!=-1)\r
-             g.drawLine(sx,top, sx+ex, top);\r
+          {\r
+            g.drawLine(sx, top, sx + ex, top);\r
+            top =-1;\r
+          }\r
           if(bottom!=-1)\r
-             g.drawLine(sx,bottom, sx+ex, bottom);\r
+           {\r
+             g.drawLine(sx, bottom-1, sx + ex, bottom-1);\r
+             bottom = -1;\r
 \r
+           }\r
           sy = offset + AlignmentUtil.getPixelHeight(starty, i, av.charHeight);\r
           g.drawLine(sx, oldY, sx, sy );\r
           g.drawLine(sx+ex, oldY, sx+ex, sy );\r