JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / jalview / schemes / NucleotideColourScheme.js
1 Clazz.declarePackage ("jalview.schemes");
2 Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.NucleotideColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () {
3 c$ = Clazz.declareType (jalview.schemes, "NucleotideColourScheme", jalview.schemes.ResidueColourScheme);
4 Clazz.makeConstructor (c$, 
5 function () {
6 Clazz.superConstructor (this, jalview.schemes.NucleotideColourScheme, [jalview.schemes.ResidueProperties.nucleotideIndex, jalview.schemes.ResidueProperties.nucleotide, 0]);
7 });
8 Clazz.defineMethod (c$, "findColour", 
9 function (c) {
10 return this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]];
11 }, "~S");
12 Clazz.defineMethod (c$, "findColour", 
13 function (c, j, seq) {
14 var currentColour;
15 if ((this.threshold == 0) || this.aboveThreshold (c, j)) {
16 try {
17 currentColour = this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]];
18 } catch (ex) {
19 if (Clazz.exceptionOf (ex, Exception)) {
20 return java.awt.Color.white;
21 } else {
22 throw ex;
23 }
24 }
25 } else {
26 return java.awt.Color.white;
27 }if (this.conservationColouring) {
28 currentColour = this.applyConservation (currentColour, j);
29 }return currentColour;
30 }, "~S,~N,jalview.datamodel.SequenceI");
31 });