Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / jalview / schemes / CovariationColourScheme.js
index 3d75e42..68c8f15 100644 (file)
@@ -1,41 +1,41 @@
-Clazz.declarePackage ("jalview.schemes");\r
-Clazz.load (["jalview.schemes.ResidueColourScheme", "java.util.Hashtable"], "jalview.schemes.CovariationColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.ColorUtils", "java.awt.Color"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.helixcolorhash = null;\r
-this.positionsToHelix = null;\r
-this.numHelix = 0;\r
-this.annotation = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.schemes, "CovariationColourScheme", jalview.schemes.ResidueColourScheme);\r
-Clazz.prepareFields (c$, function () {\r
-this.helixcolorhash =  new java.util.Hashtable ();\r
-this.positionsToHelix =  new java.util.Hashtable ();\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (annotation) {\r
-Clazz.superConstructor (this, jalview.schemes.CovariationColourScheme, []);\r
-this.annotation = annotation;\r
-for (var x = 0; x < this.annotation._rnasecstr.length; x++) {\r
-this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getBegin ()), this.annotation._rnasecstr[x].getFeatureGroup ());\r
-this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getEnd ()), this.annotation._rnasecstr[x].getFeatureGroup ());\r
-if (Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()) > this.numHelix) {\r
-this.numHelix = Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ());\r
-}}\r
-for (var j = 0; j <= this.numHelix; j++) {\r
-this.helixcolorhash.put (Integer.toString (j), jalview.util.ColorUtils.generateRandomColor (java.awt.Color.white));\r
-}\r
-}, "jalview.datamodel.AlignmentAnnotation");\r
-Clazz.defineMethod (c$, "findColour", \r
-function (c) {\r
-return jalview.schemes.ResidueProperties.purinepyrimidine[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]];\r
-}, "~S");\r
-Clazz.defineMethod (c$, "findColour", \r
-function (c, j) {\r
-var currentColour = java.awt.Color.white;\r
-var currentHelix = null;\r
-currentHelix = this.positionsToHelix.get (new Integer (j));\r
-if (currentHelix != null) {\r
-currentColour = this.helixcolorhash.get (currentHelix);\r
-}return currentColour;\r
-}, "~S,~N");\r
-});\r
+Clazz.declarePackage ("jalview.schemes");
+Clazz.load (["jalview.schemes.ResidueColourScheme", "java.util.Hashtable"], "jalview.schemes.CovariationColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.ColorUtils", "java.awt.Color"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.helixcolorhash = null;
+this.positionsToHelix = null;
+this.numHelix = 0;
+this.annotation = null;
+Clazz.instantialize (this, arguments);
+}, jalview.schemes, "CovariationColourScheme", jalview.schemes.ResidueColourScheme);
+Clazz.prepareFields (c$, function () {
+this.helixcolorhash =  new java.util.Hashtable ();
+this.positionsToHelix =  new java.util.Hashtable ();
+});
+Clazz.makeConstructor (c$, 
+function (annotation) {
+Clazz.superConstructor (this, jalview.schemes.CovariationColourScheme, []);
+this.annotation = annotation;
+for (var x = 0; x < this.annotation._rnasecstr.length; x++) {
+this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getBegin ()), this.annotation._rnasecstr[x].getFeatureGroup ());
+this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getEnd ()), this.annotation._rnasecstr[x].getFeatureGroup ());
+if (Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()) > this.numHelix) {
+this.numHelix = Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ());
+}}
+for (var j = 0; j <= this.numHelix; j++) {
+this.helixcolorhash.put (Integer.toString (j), jalview.util.ColorUtils.generateRandomColor (java.awt.Color.white));
+}
+}, "jalview.datamodel.AlignmentAnnotation");
+Clazz.defineMethod (c$, "findColour", 
+function (c) {
+return jalview.schemes.ResidueProperties.purinepyrimidine[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]];
+}, "~S");
+Clazz.defineMethod (c$, "findColour", 
+function (c, j) {
+var currentColour = java.awt.Color.white;
+var currentHelix = null;
+currentHelix = this.positionsToHelix.get (new Integer (j));
+if (currentHelix != null) {
+currentColour = this.helixcolorhash.get (currentHelix);
+}return currentColour;
+}, "~S,~N");
+});