X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=site%2Fj2s%2Fjalview%2Fschemes%2FRNAInteractionColourScheme.js;fp=site%2Fj2s%2Fjalview%2Fschemes%2FRNAInteractionColourScheme.js;h=69352532334ed9029433ace609aaae86cb2ab8f8;hb=4231d40261fef32ce4570a6bbad0d35df44e8baf;hp=0000000000000000000000000000000000000000;hpb=c07eb2c5794833bd0241000d6844d783fe10cb82;p=jalview.git diff --git a/site/j2s/jalview/schemes/RNAInteractionColourScheme.js b/site/j2s/jalview/schemes/RNAInteractionColourScheme.js new file mode 100644 index 0000000..6935253 --- /dev/null +++ b/site/j2s/jalview/schemes/RNAInteractionColourScheme.js @@ -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"); +});