+import jalview.analysis.*;\r
+\r
+/**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @author $author$\r
+ * @version $Revision$\r
+ */\r
+public class ResidueColourScheme\r
+ implements ColourSchemeI\r
+{\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