JAL-1807
[jalview.git] / site / j2s / jalview / schemes / RNAInteractionColourScheme.js
diff --git a/site/j2s/jalview/schemes/RNAInteractionColourScheme.js b/site/j2s/jalview/schemes/RNAInteractionColourScheme.js
new file mode 100644 (file)
index 0000000..6935253
--- /dev/null
@@ -0,0 +1,27 @@
+Clazz.declarePackage ("jalview.schemes");
+Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.RNAInteractionColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () {
+c$ = Clazz.declareType (jalview.schemes, "RNAInteractionColourScheme", jalview.schemes.ResidueColourScheme);
+Clazz.defineMethod (c$, "findColour", 
+function (c) {
+return this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]];
+}, "~S");
+Clazz.defineMethod (c$, "findColour", 
+function (c, j, seq) {
+var currentColour;
+if ((this.threshold == 0) || this.aboveThreshold (c, j)) {
+try {
+currentColour = this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]];
+} catch (ex) {
+if (Clazz.exceptionOf (ex, Exception)) {
+return java.awt.Color.white;
+} else {
+throw ex;
+}
+}
+} else {
+return java.awt.Color.white;
+}if (this.conservationColouring) {
+currentColour = this.applyConservation (currentColour, j);
+}return currentColour;
+}, "~S,~N,jalview.datamodel.SequenceI");
+});