consensus held in residueColour
[jalview.git] / src / jalview / schemes / ResidueColourScheme.java
index b0a5caa..7eab3dd 100755 (executable)
@@ -7,13 +7,19 @@ import java.awt.*;
 public class ResidueColourScheme implements ColourSchemeI{\r
     Color    [] colors;\r
     int       threshold = 0;\r
+    public Vector   consensus;\r
 \r
     public ResidueColourScheme(Color[] colors, int threshold) {\r
-       this.colors    = colors;\r
+        this.colors    = colors;\r
        this.threshold = threshold;\r
     }\r
 \r
-    public ResidueColourScheme() {\r
+    public ResidueColourScheme()\r
+    {   }\r
+\r
+    public void setConsensus(Vector consensus)\r
+    {\r
+      this.consensus = consensus;\r
     }\r
 \r
     public Color findColour(String aa)\r
@@ -21,9 +27,9 @@ public class ResidueColourScheme implements ColourSchemeI{
       return colors[((Integer)(ResidueProperties.aaHash.get(aa))).intValue()];\r
     }\r
 \r
-    public Color findColour(String s, int j, Vector aa) {\r
+    public Color findColour(String s, int j) {\r
 \r
-       if( threshold==0 || aboveThreshold(aa,s,j))\r
+       if( threshold==0 || aboveThreshold(s,j))\r
           return colors[((Integer)(ResidueProperties.aaHash.get(s))).intValue()];\r
        else\r
           return Color.white;\r
@@ -38,10 +44,9 @@ public class ResidueColourScheme implements ColourSchemeI{
        threshold = ct;\r
     }\r
 \r
-    public boolean aboveThreshold(Vector aa,String s, int j)\r
+    public boolean aboveThreshold(String s, int j)\r
     {\r
-\r
-       Hashtable hash = (Hashtable)aa.elementAt(j);\r
+       Hashtable hash = (Hashtable)consensus.elementAt(j);\r
 \r
         if ( ( (Integer) hash.get("maxCount")).intValue() != -1 && hash.contains(s))\r
         {\r