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
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
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