New colourScheme
authoramwaterhouse <Andrew Waterhouse>
Fri, 21 Jan 2005 18:33:37 +0000 (18:33 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 21 Jan 2005 18:33:37 +0000 (18:33 +0000)
src/jalview/schemes/NucleotideColourScheme.java [new file with mode: 0755]

diff --git a/src/jalview/schemes/NucleotideColourScheme.java b/src/jalview/schemes/NucleotideColourScheme.java
new file mode 100755 (executable)
index 0000000..caa6998
--- /dev/null
@@ -0,0 +1,37 @@
+package jalview.schemes;\r
+\r
+import java.awt.*;\r
+import java.util.*;\r
+\r
+\r
+public class NucleotideColourScheme extends ResidueColourScheme\r
+{\r
+  public NucleotideColourScheme() {\r
+  super(ResidueProperties.nucleotide,0);\r
+  }\r
+\r
+\r
+  public Color findColour(String n)\r
+  {\r
+    System.out.println("called");\r
+    return colors[((Integer)(ResidueProperties.nucleotideHash.get(n))).intValue()];\r
+  }\r
+\r
+\r
+  public Color findColour(String n, int j, Vector aa) {\r
+\r
+    if (threshold == 0 || aboveThreshold(aa, n, j))\r
+      try\r
+      {\r
+        return colors[ ( (Integer) (ResidueProperties.nucleotideHash.get(n))).intValue()];\r
+      }\r
+      catch (Exception ex)\r
+      {\r
+        return Color.white;\r
+      }\r
+    else\r
+      return Color.white;\r
+\r
+  }\r
+\r
+}\r