- Color[] colors;\r
- int threshold = 0;\r
-\r
- /* Set when threshold colouring to either pid_gaps or pid_nogaps*/\r
- protected String ignoreGaps = "pid_gaps";\r
-\r
- /** DOCUMENT ME!! */\r
- public Hashtable [] consensus;\r
-\r
- /**\r
- * Creates a new ResidueColourScheme object.\r
- *\r
- * @param colors DOCUMENT ME!\r
- * @param threshold DOCUMENT ME!\r
- */\r
- public ResidueColourScheme(Color[] colors, int threshold)\r
+\r
+ boolean conservationColouring = false;\r
+\r
+ Color[] colors;\r
+ int threshold = 0;\r
+\r
+ /* Set when threshold colouring to either pid_gaps or pid_nogaps*/\r
+ protected String ignoreGaps = AAFrequency.PID_GAPS;\r
+\r
+ /** Consenus as a hashtable array */\r
+ Hashtable[] consensus;\r
+\r
+ /** Conservation string as a char array */\r
+ char[] conservation;\r
+ int conservationLength=0;\r
+\r
+ /** DOCUMENT ME!! */\r
+ int inc = 30;\r
+\r
+ /**\r
+ * Creates a new ResidueColourScheme object.\r
+ *\r
+ * @param colors DOCUMENT ME!\r
+ * @param threshold DOCUMENT ME!\r
+ */\r
+ public ResidueColourScheme(Color[] colours, int threshold)\r
+ {\r
+ this.colors = colours;\r
+ this.threshold = threshold;\r
+ }\r
+\r
+ /**\r
+ * Creates a new ResidueColourScheme object.\r
+ */\r
+ public ResidueColourScheme()\r
+ {\r
+ }\r
+\r
+ /**\r
+ * Find a colour without an index in a sequence\r
+ */\r
+ public Color findColour(char c)\r
+ {\r
+ return colors[ResidueProperties.aaIndex[c]];\r
+ }\r
+\r
+ public Color findColour(char c, int j)\r
+ {\r
+ Color currentColour;\r
+\r
+ if ( (threshold == 0) || aboveThreshold(c, j))\r
+ {\r
+ currentColour = colors[ResidueProperties.aaIndex[c]];\r
+ }\r
+ else\r