Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / awt / BasicStroke.js
index 286474d..16d474f 100644 (file)
-Clazz.declarePackage ("java.awt");\r
-Clazz.load (["java.awt.Stroke"], "java.awt.BasicStroke", ["java.lang.Float", "$.IllegalArgumentException", "java.util.Arrays"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.width = 0;\r
-this.join = 0;\r
-this.cap = 0;\r
-this.miterlimit = 0;\r
-this.dash = null;\r
-this.dash_phase = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt, "BasicStroke", null, java.awt.Stroke);\r
-Clazz.makeConstructor (c$, \r
-function (width, cap, join, miterlimit, dash, dash_phase) {\r
-if (width < 0.0) {\r
-throw  new IllegalArgumentException ("negative width");\r
-}if (cap != 0 && cap != 1 && cap != 2) {\r
-throw  new IllegalArgumentException ("illegal end cap value");\r
-}if (join == 0) {\r
-if (miterlimit < 1.0) {\r
-throw  new IllegalArgumentException ("miter limit < 1");\r
-}} else if (join != 1 && join != 2) {\r
-throw  new IllegalArgumentException ("illegal line join value");\r
-}if (dash != null) {\r
-if (dash_phase < 0.0) {\r
-throw  new IllegalArgumentException ("negative dash phase");\r
-}var allzero = true;\r
-for (var i = 0; i < dash.length; i++) {\r
-var d = dash[i];\r
-if (d > 0.0) {\r
-allzero = false;\r
-} else if (d < 0.0) {\r
-throw  new IllegalArgumentException ("negative dash length");\r
-}}\r
-if (allzero) {\r
-throw  new IllegalArgumentException ("dash lengths all zero");\r
-}}this.width = width;\r
-this.cap = cap;\r
-this.join = join;\r
-this.miterlimit = miterlimit;\r
-if (dash != null) {\r
-this.dash = dash.clone ();\r
-}this.dash_phase = dash_phase;\r
-}, "~N,~N,~N,~N,~A,~N");\r
-Clazz.makeConstructor (c$, \r
-function (width, cap, join, miterlimit) {\r
-this.construct (width, cap, join, miterlimit, null, 0.0);\r
-}, "~N,~N,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (width, cap, join) {\r
-this.construct (width, cap, join, 10.0, null, 0.0);\r
-}, "~N,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (width) {\r
-this.construct (width, 2, 0, 10.0, null, 0.0);\r
-}, "~N");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.construct (1.0, 2, 0, 10.0, null, 0.0);\r
-});\r
-Clazz.overrideMethod (c$, "createStrokedShape", \r
-function (s) {\r
-return s;\r
-}, "java.awt.Shape");\r
-Clazz.defineMethod (c$, "getLineWidth", \r
-function () {\r
-return this.width;\r
-});\r
-Clazz.defineMethod (c$, "getEndCap", \r
-function () {\r
-return this.cap;\r
-});\r
-Clazz.defineMethod (c$, "getLineJoin", \r
-function () {\r
-return this.join;\r
-});\r
-Clazz.defineMethod (c$, "getMiterLimit", \r
-function () {\r
-return this.miterlimit;\r
-});\r
-Clazz.defineMethod (c$, "getDashArray", \r
-function () {\r
-if (this.dash == null) {\r
-return null;\r
-}return this.dash.clone ();\r
-});\r
-Clazz.defineMethod (c$, "getDashPhase", \r
-function () {\r
-return this.dash_phase;\r
-});\r
-Clazz.overrideMethod (c$, "hashCode", \r
-function () {\r
-var hash = Float.floatToIntBits (this.width);\r
-hash = hash * 31 + this.join;\r
-hash = hash * 31 + this.cap;\r
-hash = hash * 31 + Float.floatToIntBits (this.miterlimit);\r
-if (this.dash != null) {\r
-hash = hash * 31 + Float.floatToIntBits (this.dash_phase);\r
-for (var i = 0; i < this.dash.length; i++) {\r
-hash = hash * 31 + Float.floatToIntBits (this.dash[i]);\r
-}\r
-}return hash;\r
-});\r
-Clazz.overrideMethod (c$, "equals", \r
-function (obj) {\r
-if (!(Clazz.instanceOf (obj, java.awt.BasicStroke))) {\r
-return false;\r
-}var bs = obj;\r
-if (this.width != bs.width) {\r
-return false;\r
-}if (this.join != bs.join) {\r
-return false;\r
-}if (this.cap != bs.cap) {\r
-return false;\r
-}if (this.miterlimit != bs.miterlimit) {\r
-return false;\r
-}if (this.dash != null) {\r
-if (this.dash_phase != bs.dash_phase) {\r
-return false;\r
-}if (!java.util.Arrays.equals (this.dash, bs.dash)) {\r
-return false;\r
-}} else if (bs.dash != null) {\r
-return false;\r
-}return true;\r
-}, "~O");\r
-Clazz.defineStatics (c$,\r
-"JOIN_MITER", 0,\r
-"JOIN_ROUND", 1,\r
-"JOIN_BEVEL", 2,\r
-"CAP_BUTT", 0,\r
-"CAP_ROUND", 1,\r
-"CAP_SQUARE", 2);\r
-});\r
+Clazz.declarePackage ("java.awt");
+Clazz.load (["java.awt.Stroke"], "java.awt.BasicStroke", ["java.lang.Float", "$.IllegalArgumentException", "java.util.Arrays"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.width = 0;
+this.join = 0;
+this.cap = 0;
+this.miterlimit = 0;
+this.dash = null;
+this.dash_phase = 0;
+Clazz.instantialize (this, arguments);
+}, java.awt, "BasicStroke", null, java.awt.Stroke);
+Clazz.makeConstructor (c$, 
+function (width, cap, join, miterlimit, dash, dash_phase) {
+if (width < 0.0) {
+throw  new IllegalArgumentException ("negative width");
+}if (cap != 0 && cap != 1 && cap != 2) {
+throw  new IllegalArgumentException ("illegal end cap value");
+}if (join == 0) {
+if (miterlimit < 1.0) {
+throw  new IllegalArgumentException ("miter limit < 1");
+}} else if (join != 1 && join != 2) {
+throw  new IllegalArgumentException ("illegal line join value");
+}if (dash != null) {
+if (dash_phase < 0.0) {
+throw  new IllegalArgumentException ("negative dash phase");
+}var allzero = true;
+for (var i = 0; i < dash.length; i++) {
+var d = dash[i];
+if (d > 0.0) {
+allzero = false;
+} else if (d < 0.0) {
+throw  new IllegalArgumentException ("negative dash length");
+}}
+if (allzero) {
+throw  new IllegalArgumentException ("dash lengths all zero");
+}}this.width = width;
+this.cap = cap;
+this.join = join;
+this.miterlimit = miterlimit;
+if (dash != null) {
+this.dash = dash.clone ();
+}this.dash_phase = dash_phase;
+}, "~N,~N,~N,~N,~A,~N");
+Clazz.makeConstructor (c$, 
+function (width, cap, join, miterlimit) {
+this.construct (width, cap, join, miterlimit, null, 0.0);
+}, "~N,~N,~N,~N");
+Clazz.makeConstructor (c$, 
+function (width, cap, join) {
+this.construct (width, cap, join, 10.0, null, 0.0);
+}, "~N,~N,~N");
+Clazz.makeConstructor (c$, 
+function (width) {
+this.construct (width, 2, 0, 10.0, null, 0.0);
+}, "~N");
+Clazz.makeConstructor (c$, 
+function () {
+this.construct (1.0, 2, 0, 10.0, null, 0.0);
+});
+Clazz.overrideMethod (c$, "createStrokedShape", 
+function (s) {
+return s;
+}, "java.awt.Shape");
+Clazz.defineMethod (c$, "getLineWidth", 
+function () {
+return this.width;
+});
+Clazz.defineMethod (c$, "getEndCap", 
+function () {
+return this.cap;
+});
+Clazz.defineMethod (c$, "getLineJoin", 
+function () {
+return this.join;
+});
+Clazz.defineMethod (c$, "getMiterLimit", 
+function () {
+return this.miterlimit;
+});
+Clazz.defineMethod (c$, "getDashArray", 
+function () {
+if (this.dash == null) {
+return null;
+}return this.dash.clone ();
+});
+Clazz.defineMethod (c$, "getDashPhase", 
+function () {
+return this.dash_phase;
+});
+Clazz.overrideMethod (c$, "hashCode", 
+function () {
+var hash = Float.floatToIntBits (this.width);
+hash = hash * 31 + this.join;
+hash = hash * 31 + this.cap;
+hash = hash * 31 + Float.floatToIntBits (this.miterlimit);
+if (this.dash != null) {
+hash = hash * 31 + Float.floatToIntBits (this.dash_phase);
+for (var i = 0; i < this.dash.length; i++) {
+hash = hash * 31 + Float.floatToIntBits (this.dash[i]);
+}
+}return hash;
+});
+Clazz.overrideMethod (c$, "equals", 
+function (obj) {
+if (!(Clazz.instanceOf (obj, java.awt.BasicStroke))) {
+return false;
+}var bs = obj;
+if (this.width != bs.width) {
+return false;
+}if (this.join != bs.join) {
+return false;
+}if (this.cap != bs.cap) {
+return false;
+}if (this.miterlimit != bs.miterlimit) {
+return false;
+}if (this.dash != null) {
+if (this.dash_phase != bs.dash_phase) {
+return false;
+}if (!java.util.Arrays.equals (this.dash, bs.dash)) {
+return false;
+}} else if (bs.dash != null) {
+return false;
+}return true;
+}, "~O");
+Clazz.defineStatics (c$,
+"JOIN_MITER", 0,
+"JOIN_ROUND", 1,
+"JOIN_BEVEL", 2,
+"CAP_BUTT", 0,
+"CAP_ROUND", 1,
+"CAP_SQUARE", 2);
+});