Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / awt / color / ColorSpace.js
index 814fa02..92a71d2 100644 (file)
-Clazz.declarePackage ("java.awt.color");\r
-Clazz.load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.type = 0;\r
-this.numComponents = 0;\r
-this.compName = null;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt.color, "ColorSpace");\r
-Clazz.makeConstructor (c$, \r
-function (type, numcomponents) {\r
-this.type = type;\r
-this.numComponents = numcomponents;\r
-}, "~N,~N");\r
-c$.getInstance = Clazz.defineMethod (c$, "getInstance", \r
-function (colorspace) {\r
-var theColorSpace;\r
-switch (colorspace) {\r
-default:\r
-case 1000:\r
-if (java.awt.color.ColorSpace.sRGBspace == null) {\r
-java.awt.color.ColorSpace.sRGBspace =  new java.awt.color.ColorSpace (5, 3);\r
-}theColorSpace = java.awt.color.ColorSpace.sRGBspace;\r
-break;\r
-}\r
-return theColorSpace;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "isCS_sRGB", \r
-function () {\r
-return (this === java.awt.color.ColorSpace.sRGBspace);\r
-});\r
-Clazz.defineMethod (c$, "toRGB", \r
-function (colorvalue) {\r
-return colorvalue;\r
-}, "~A");\r
-Clazz.defineMethod (c$, "fromRGB", \r
-function (rgbvalue) {\r
-return rgbvalue;\r
-}, "~A");\r
-Clazz.defineMethod (c$, "getType", \r
-function () {\r
-return this.type;\r
-});\r
-Clazz.defineMethod (c$, "getNumComponents", \r
-function () {\r
-return this.numComponents;\r
-});\r
-Clazz.defineMethod (c$, "getName", \r
-function (idx) {\r
-if ((idx < 0) || (idx > this.numComponents - 1)) {\r
-throw  new IllegalArgumentException ("Component index out of range: " + idx);\r
-}if (this.compName == null) {\r
-switch (this.type) {\r
-case 0:\r
-this.compName =  Clazz.newArray (-1, ["X", "Y", "Z"]);\r
-break;\r
-case 1:\r
-this.compName =  Clazz.newArray (-1, ["L", "a", "b"]);\r
-break;\r
-case 2:\r
-this.compName =  Clazz.newArray (-1, ["L", "u", "v"]);\r
-break;\r
-case 3:\r
-this.compName =  Clazz.newArray (-1, ["Y", "Cb", "Cr"]);\r
-break;\r
-case 4:\r
-this.compName =  Clazz.newArray (-1, ["Y", "x", "y"]);\r
-break;\r
-case 5:\r
-this.compName =  Clazz.newArray (-1, ["Red", "Green", "Blue"]);\r
-break;\r
-case 6:\r
-this.compName =  Clazz.newArray (-1, ["Gray"]);\r
-break;\r
-case 7:\r
-this.compName =  Clazz.newArray (-1, ["Hue", "Saturation", "Value"]);\r
-break;\r
-case 8:\r
-this.compName =  Clazz.newArray (-1, ["Hue", "Lightness", "Saturation"]);\r
-break;\r
-case 9:\r
-this.compName =  Clazz.newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]);\r
-break;\r
-case 11:\r
-this.compName =  Clazz.newArray (-1, ["Cyan", "Magenta", "Yellow"]);\r
-break;\r
-default:\r
-var tmp =  new Array (this.numComponents);\r
-for (var i = 0; i < tmp.length; i++) {\r
-tmp[i] = "Unnamed color component(" + i + ")";\r
-}\r
-this.compName = tmp;\r
-}\r
-}return this.compName[idx];\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getMinValue", \r
-function (component) {\r
-if ((component < 0) || (component > this.numComponents - 1)) {\r
-throw  new IllegalArgumentException ("Component index out of range: " + component);\r
-}return 0.0;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getMaxValue", \r
-function (component) {\r
-if ((component < 0) || (component > this.numComponents - 1)) {\r
-throw  new IllegalArgumentException ("Component index out of range: " + component);\r
-}return 1.0;\r
-}, "~N");\r
-Clazz.defineStatics (c$,\r
-"sRGBspace", null,\r
-"TYPE_XYZ", 0,\r
-"TYPE_Lab", 1,\r
-"TYPE_Luv", 2,\r
-"TYPE_YCbCr", 3,\r
-"TYPE_Yxy", 4,\r
-"TYPE_RGB", 5,\r
-"TYPE_GRAY", 6,\r
-"TYPE_HSV", 7,\r
-"TYPE_HLS", 8,\r
-"TYPE_CMYK", 9,\r
-"TYPE_CMY", 11,\r
-"TYPE_2CLR", 12,\r
-"TYPE_3CLR", 13,\r
-"TYPE_4CLR", 14,\r
-"TYPE_5CLR", 15,\r
-"TYPE_6CLR", 16,\r
-"TYPE_7CLR", 17,\r
-"TYPE_8CLR", 18,\r
-"TYPE_9CLR", 19,\r
-"TYPE_ACLR", 20,\r
-"TYPE_BCLR", 21,\r
-"TYPE_CCLR", 22,\r
-"TYPE_DCLR", 23,\r
-"TYPE_ECLR", 24,\r
-"TYPE_FCLR", 25,\r
-"CS_sRGB", 1000,\r
-"CS_LINEAR_RGB", 1004,\r
-"CS_CIEXYZ", 1001,\r
-"CS_PYCC", 1002,\r
-"CS_GRAY", 1003);\r
-});\r
+Clazz.declarePackage ("java.awt.color");
+Clazz.load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.type = 0;
+this.numComponents = 0;
+this.compName = null;
+Clazz.instantialize (this, arguments);
+}, java.awt.color, "ColorSpace");
+Clazz.makeConstructor (c$, 
+function (type, numcomponents) {
+this.type = type;
+this.numComponents = numcomponents;
+}, "~N,~N");
+c$.getInstance = Clazz.defineMethod (c$, "getInstance", 
+function (colorspace) {
+var theColorSpace;
+switch (colorspace) {
+default:
+case 1000:
+if (java.awt.color.ColorSpace.sRGBspace == null) {
+java.awt.color.ColorSpace.sRGBspace =  new java.awt.color.ColorSpace (5, 3);
+}theColorSpace = java.awt.color.ColorSpace.sRGBspace;
+break;
+}
+return theColorSpace;
+}, "~N");
+Clazz.defineMethod (c$, "isCS_sRGB", 
+function () {
+return (this === java.awt.color.ColorSpace.sRGBspace);
+});
+Clazz.defineMethod (c$, "toRGB", 
+function (colorvalue) {
+return colorvalue;
+}, "~A");
+Clazz.defineMethod (c$, "fromRGB", 
+function (rgbvalue) {
+return rgbvalue;
+}, "~A");
+Clazz.defineMethod (c$, "getType", 
+function () {
+return this.type;
+});
+Clazz.defineMethod (c$, "getNumComponents", 
+function () {
+return this.numComponents;
+});
+Clazz.defineMethod (c$, "getName", 
+function (idx) {
+if ((idx < 0) || (idx > this.numComponents - 1)) {
+throw  new IllegalArgumentException ("Component index out of range: " + idx);
+}if (this.compName == null) {
+switch (this.type) {
+case 0:
+this.compName =  Clazz.newArray (-1, ["X", "Y", "Z"]);
+break;
+case 1:
+this.compName =  Clazz.newArray (-1, ["L", "a", "b"]);
+break;
+case 2:
+this.compName =  Clazz.newArray (-1, ["L", "u", "v"]);
+break;
+case 3:
+this.compName =  Clazz.newArray (-1, ["Y", "Cb", "Cr"]);
+break;
+case 4:
+this.compName =  Clazz.newArray (-1, ["Y", "x", "y"]);
+break;
+case 5:
+this.compName =  Clazz.newArray (-1, ["Red", "Green", "Blue"]);
+break;
+case 6:
+this.compName =  Clazz.newArray (-1, ["Gray"]);
+break;
+case 7:
+this.compName =  Clazz.newArray (-1, ["Hue", "Saturation", "Value"]);
+break;
+case 8:
+this.compName =  Clazz.newArray (-1, ["Hue", "Lightness", "Saturation"]);
+break;
+case 9:
+this.compName =  Clazz.newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]);
+break;
+case 11:
+this.compName =  Clazz.newArray (-1, ["Cyan", "Magenta", "Yellow"]);
+break;
+default:
+var tmp =  new Array (this.numComponents);
+for (var i = 0; i < tmp.length; i++) {
+tmp[i] = "Unnamed color component(" + i + ")";
+}
+this.compName = tmp;
+}
+}return this.compName[idx];
+}, "~N");
+Clazz.defineMethod (c$, "getMinValue", 
+function (component) {
+if ((component < 0) || (component > this.numComponents - 1)) {
+throw  new IllegalArgumentException ("Component index out of range: " + component);
+}return 0.0;
+}, "~N");
+Clazz.defineMethod (c$, "getMaxValue", 
+function (component) {
+if ((component < 0) || (component > this.numComponents - 1)) {
+throw  new IllegalArgumentException ("Component index out of range: " + component);
+}return 1.0;
+}, "~N");
+Clazz.defineStatics (c$,
+"sRGBspace", null,
+"TYPE_XYZ", 0,
+"TYPE_Lab", 1,
+"TYPE_Luv", 2,
+"TYPE_YCbCr", 3,
+"TYPE_Yxy", 4,
+"TYPE_RGB", 5,
+"TYPE_GRAY", 6,
+"TYPE_HSV", 7,
+"TYPE_HLS", 8,
+"TYPE_CMYK", 9,
+"TYPE_CMY", 11,
+"TYPE_2CLR", 12,
+"TYPE_3CLR", 13,
+"TYPE_4CLR", 14,
+"TYPE_5CLR", 15,
+"TYPE_6CLR", 16,
+"TYPE_7CLR", 17,
+"TYPE_8CLR", 18,
+"TYPE_9CLR", 19,
+"TYPE_ACLR", 20,
+"TYPE_BCLR", 21,
+"TYPE_CCLR", 22,
+"TYPE_DCLR", 23,
+"TYPE_ECLR", 24,
+"TYPE_FCLR", 25,
+"CS_sRGB", 1000,
+"CS_LINEAR_RGB", 1004,
+"CS_CIEXYZ", 1001,
+"CS_PYCC", 1002,
+"CS_GRAY", 1003);
+});