Applet has hidden regions
[jalview.git] / src / jalview / appletgui / FeatureRenderer.java
index 66a9bc2..31b09c7 100755 (executable)
@@ -78,6 +78,7 @@ public class FeatureRenderer
       renderOrder = fr.renderOrder;\r
       featureGroups = fr.featureGroups;\r
       featureColours = fr.featureColours;\r
+      transparency =  fr.transparency;\r
     }\r
 \r
 \r
@@ -99,7 +100,7 @@ public class FeatureRenderer
 \r
       currentColour = null;\r
 \r
-      drawSequence(null, lastSequence, lastSequence.findPosition(i), -1,-1, -1, -1);\r
+      drawSequence(null, lastSequence, lastSequence.findPosition(i), -1,-1);\r
 \r
       if(currentColour==null)\r
         return initialCol;\r
@@ -136,7 +137,7 @@ public class FeatureRenderer
 \r
       currentColour = null;\r
 \r
-      drawSequence(null, lastSequence, lastSequence.findPosition(column), -1,-1, -1, -1);\r
+      drawSequence(null, lastSequence, lastSequence.findPosition(column), -1,-1);\r
 \r
       if(currentColour==null)\r
         return initialCol;\r
@@ -166,7 +167,7 @@ public class FeatureRenderer
     int sfSize, sfindex, spos, epos;\r
 \r
     public void drawSequence(Graphics g, SequenceI seq,\r
-                             int start, int end, int y1, int width, int height)\r
+                             int start, int end, int y1)\r
     {\r
       if (   seq.getSequenceFeatures() == null\r
           || seq.getSequenceFeatures().length==0)\r
@@ -246,13 +247,13 @@ public class FeatureRenderer
                           seq.findIndex(sequenceFeatures[sfindex].begin) - 1,\r
                           new Color( ( (Integer) av.featuresDisplayed.get(\r
                 sequenceFeatures[sfindex].type)).intValue()),\r
-                          start, end, y1, width, height);\r
+                          start, end, y1);\r
             renderFeature(g, seq,\r
                           seq.findIndex(sequenceFeatures[sfindex].end) - 1,\r
                           seq.findIndex(sequenceFeatures[sfindex].end) - 1,\r
                           new Color( ( (Integer) av.featuresDisplayed.get(\r
                 sequenceFeatures[sfindex].type)).intValue()),\r
-                          start, end, y1, width, height);\r
+                          start, end, y1);\r
 \r
           }\r
           else\r
@@ -260,7 +261,7 @@ public class FeatureRenderer
                           seq.findIndex(sequenceFeatures[sfindex].begin) - 1,\r
                           seq.findIndex(sequenceFeatures[sfindex].end) - 1,\r
                           getColour(sequenceFeatures[sfindex].type),\r
-                          start, end, y1, width, height);\r
+                          start, end, y1);\r
 \r
         }\r
       }\r
@@ -275,7 +276,7 @@ public class FeatureRenderer
     char s;\r
     int i;\r
     void renderFeature(Graphics g, SequenceI seq,\r
-                       int fstart, int fend, Color featureColour, int start, int end,  int y1, int width, int height)\r
+                       int fstart, int fend, Color featureColour, int start, int end,  int y1)\r
     {\r
 \r
       if (((fstart <= end) && (fend >= start)))\r
@@ -301,16 +302,16 @@ public class FeatureRenderer
 \r
             g.setColor(featureColour);\r
 \r
-            g.fillRect( (i - start) * width, y1, width, height);\r
+            g.fillRect( (i - start) * av.charWidth, y1, av.charWidth, av.charHeight);\r
 \r
             if(!av.validCharWidth)\r
               continue;\r
 \r
             g.setColor(Color.white);\r
-            charOffset = (width - fm.charWidth(s)) / 2;\r
+            charOffset = (av.charWidth - fm.charWidth(s)) / 2;\r
             g.drawString(String.valueOf(s),\r
-                         charOffset + (width * (i - start)),\r
-                         (y1 + height) - height / 5); //pady = height / 5;\r
+                         charOffset + (av.charWidth * (i - start)),\r
+                         (y1 + av.charHeight) - av.charHeight / 5); //pady = height / 5;\r
 \r
           }\r
       }\r
@@ -411,10 +412,10 @@ public class FeatureRenderer
   {\r
     void setTransparency(Graphics g, float value)\r
     {\r
-      Graphics2D g2 = (Graphics2D) g;\r
-      g2.setComposite(\r
-          AlphaComposite.getInstance(\r
-              AlphaComposite.SRC_OVER, value));\r
+      //Graphics2D g2 = (Graphics2D) g;\r
+   //   g2.setComposite(\r
+     //     AlphaComposite.getInstance(\r
+     //         AlphaComposite.SRC_OVER, value));\r
     }\r
   }\r
 \r