use webservice info to display web service state
[jalview.git] / src / jalview / gui / SequenceRenderer.java
index 5b5a392..cf7db6c 100755 (executable)
@@ -46,18 +46,18 @@ public class SequenceRenderer implements RendererI
 \r
     graphics = g;\r
 \r
-    drawBoxes(seq, start, end, x1, y1, (int) width, height, pid);\r
+    drawBoxes(seq, start, end, x1, y1, (int) width, height);\r
 \r
     fm = g.getFontMetrics();\r
     drawText(seq,start,end,x1,y1,(int)width,height);\r
 \r
   }\r
 \r
-  public void drawBoxes(SequenceI seq,int start, int end, int x1, int y1, int width, int height,Vector freq) {\r
+  public void drawBoxes(SequenceI seq,int start, int end, int x1, int y1, int width, int height) {\r
     int i      = start;\r
     int length = seq.getLength();\r
 \r
-    int curStart = x1;\r
+    int curStart = -1;\r
     int curWidth = width;\r
 \r
     Color tempColour = null;\r
@@ -76,7 +76,8 @@ public class SequenceRenderer implements RendererI
 \r
       if (resBoxColour != tempColour)\r
       {\r
-        graphics.fillRect(x1+width*(curStart-start),y1,curWidth,height);\r
+        if(tempColour!=null)\r
+          graphics.fillRect(x1+width*(curStart-start),y1,curWidth,height);\r
         graphics.setColor(resBoxColour);\r
 \r
         curStart = i;\r
@@ -89,7 +90,9 @@ public class SequenceRenderer implements RendererI
 \r
       i++;\r
     }\r
-    graphics.fillRect(x1+width*(curStart-start),y1,curWidth,height);\r
+\r
+\r
+     graphics.fillRect(x1+width*(curStart-start),y1,curWidth,height);\r
   }\r
 \r
   public void drawText(SequenceI seq,int start, int end, int x1, int y1, int width, int height)\r
@@ -131,7 +134,10 @@ public class SequenceRenderer implements RendererI
           if(av.getColourText())\r
            {\r
              getBoxColour(av.getGlobalColourScheme(), seq, i);\r
-             graphics.setColor(resBoxColour.darker());\r
+             if(av.getShowBoxes())\r
+              graphics.setColor(resBoxColour.darker());\r
+            else\r
+              graphics.setColor(resBoxColour);\r
            }\r
         }\r
 \r