Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / java / awt / geom / Ellipse2D.js
index 6dcd7c8..3ec64e2 100644 (file)
-Clazz.declarePackage ("java.awt.geom");\r
-Clazz.load (["java.awt.geom.RectangularShape"], "java.awt.geom.Ellipse2D", ["java.lang.Double", "java.awt.geom.EllipseIterator", "$.Rectangle2D"], function () {\r
-c$ = Clazz.declareType (java.awt.geom, "Ellipse2D", java.awt.geom.RectangularShape);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-Clazz.superConstructor (this, java.awt.geom.Ellipse2D, []);\r
-});\r
-Clazz.defineMethod (c$, "contains", \r
-function (x, y) {\r
-var ellw = this.getWidth ();\r
-if (ellw <= 0.0) {\r
-return false;\r
-}var normx = (x - this.getX ()) / ellw - 0.5;\r
-var ellh = this.getHeight ();\r
-if (ellh <= 0.0) {\r
-return false;\r
-}var normy = (y - this.getY ()) / ellh - 0.5;\r
-return (normx * normx + normy * normy) < 0.25;\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "intersects", \r
-function (x, y, w, h) {\r
-if (w <= 0.0 || h <= 0.0) {\r
-return false;\r
-}var ellw = this.getWidth ();\r
-if (ellw <= 0.0) {\r
-return false;\r
-}var normx0 = (x - this.getX ()) / ellw - 0.5;\r
-var normx1 = normx0 + w / ellw;\r
-var ellh = this.getHeight ();\r
-if (ellh <= 0.0) {\r
-return false;\r
-}var normy0 = (y - this.getY ()) / ellh - 0.5;\r
-var normy1 = normy0 + h / ellh;\r
-var nearx;\r
-var neary;\r
-if (normx0 > 0.0) {\r
-nearx = normx0;\r
-} else if (normx1 < 0.0) {\r
-nearx = normx1;\r
-} else {\r
-nearx = 0.0;\r
-}if (normy0 > 0.0) {\r
-neary = normy0;\r
-} else if (normy1 < 0.0) {\r
-neary = normy1;\r
-} else {\r
-neary = 0.0;\r
-}return (nearx * nearx + neary * neary) < 0.25;\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "contains", \r
-function (x, y, w, h) {\r
-return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x, y + h) && this.contains (x + w, y + h));\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "getPathIterator", \r
-function (at) {\r
-return  new java.awt.geom.EllipseIterator (this, at);\r
-}, "java.awt.geom.AffineTransform");\r
-Clazz.overrideMethod (c$, "hashCode", \r
-function () {\r
-var bits = java.lang.Double.doubleToLongBits (this.getX ());\r
-bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;\r
-bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;\r
-bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;\r
-return ((bits) ^ ((bits >> 32)));\r
-});\r
-Clazz.overrideMethod (c$, "equals", \r
-function (obj) {\r
-if (obj === this) {\r
-return true;\r
-}if (Clazz.instanceOf (obj, java.awt.geom.Ellipse2D)) {\r
-var e2d = obj;\r
-return ((this.getX () == e2d.getX ()) && (this.getY () == e2d.getY ()) && (this.getWidth () == e2d.getWidth ()) && (this.getHeight () == e2d.getHeight ()));\r
-}return false;\r
-}, "~O");\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.x = 0;\r
-this.y = 0;\r
-this.width = 0;\r
-this.height = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt.geom.Ellipse2D, "Float", java.awt.geom.Ellipse2D);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-Clazz.superConstructor (this, java.awt.geom.Ellipse2D.Float, []);\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c, d) {\r
-Clazz.superConstructor (this, java.awt.geom.Ellipse2D.Float, []);\r
-this.setFrame (a, b, c, d);\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getX", \r
-function () {\r
-return this.x;\r
-});\r
-Clazz.overrideMethod (c$, "getY", \r
-function () {\r
-return this.y;\r
-});\r
-Clazz.overrideMethod (c$, "getWidth", \r
-function () {\r
-return this.width;\r
-});\r
-Clazz.overrideMethod (c$, "getHeight", \r
-function () {\r
-return this.height;\r
-});\r
-Clazz.overrideMethod (c$, "isEmpty", \r
-function () {\r
-return (this.width <= 0.0 || this.height <= 0.0);\r
-});\r
-Clazz.defineMethod (c$, "setFrame", \r
-function (a, b, c, d) {\r
-this.x = a;\r
-this.y = b;\r
-this.width = c;\r
-this.height = d;\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "setFrame", \r
-function (a, b, c, d) {\r
-this.x = a;\r
-this.y = b;\r
-this.width = c;\r
-this.height = d;\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getBounds2D", \r
-function () {\r
-return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);\r
-});\r
-c$ = Clazz.p0p ();\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.x = 0;\r
-this.y = 0;\r
-this.width = 0;\r
-this.height = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt.geom.Ellipse2D, "Double", java.awt.geom.Ellipse2D);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-Clazz.superConstructor (this, java.awt.geom.Ellipse2D.Double, []);\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c, d) {\r
-Clazz.superConstructor (this, java.awt.geom.Ellipse2D.Double, []);\r
-this.setFrame (a, b, c, d);\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getX", \r
-function () {\r
-return this.x;\r
-});\r
-Clazz.overrideMethod (c$, "getY", \r
-function () {\r
-return this.y;\r
-});\r
-Clazz.overrideMethod (c$, "getWidth", \r
-function () {\r
-return this.width;\r
-});\r
-Clazz.overrideMethod (c$, "getHeight", \r
-function () {\r
-return this.height;\r
-});\r
-Clazz.overrideMethod (c$, "isEmpty", \r
-function () {\r
-return (this.width <= 0.0 || this.height <= 0.0);\r
-});\r
-Clazz.defineMethod (c$, "setFrame", \r
-function (a, b, c, d) {\r
-this.x = a;\r
-this.y = b;\r
-this.width = c;\r
-this.height = d;\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getBounds2D", \r
-function () {\r
-return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);\r
-});\r
-c$ = Clazz.p0p ();\r
-});\r
+Clazz.declarePackage ("java.awt.geom");
+Clazz.load (["java.awt.geom.RectangularShape"], "java.awt.geom.Ellipse2D", ["java.lang.Double", "java.awt.geom.EllipseIterator", "$.Rectangle2D"], function () {
+c$ = Clazz.declareType (java.awt.geom, "Ellipse2D", java.awt.geom.RectangularShape);
+Clazz.makeConstructor (c$, 
+function () {
+Clazz.superConstructor (this, java.awt.geom.Ellipse2D, []);
+});
+Clazz.defineMethod (c$, "contains", 
+function (x, y) {
+var ellw = this.getWidth ();
+if (ellw <= 0.0) {
+return false;
+}var normx = (x - this.getX ()) / ellw - 0.5;
+var ellh = this.getHeight ();
+if (ellh <= 0.0) {
+return false;
+}var normy = (y - this.getY ()) / ellh - 0.5;
+return (normx * normx + normy * normy) < 0.25;
+}, "~N,~N");
+Clazz.defineMethod (c$, "intersects", 
+function (x, y, w, h) {
+if (w <= 0.0 || h <= 0.0) {
+return false;
+}var ellw = this.getWidth ();
+if (ellw <= 0.0) {
+return false;
+}var normx0 = (x - this.getX ()) / ellw - 0.5;
+var normx1 = normx0 + w / ellw;
+var ellh = this.getHeight ();
+if (ellh <= 0.0) {
+return false;
+}var normy0 = (y - this.getY ()) / ellh - 0.5;
+var normy1 = normy0 + h / ellh;
+var nearx;
+var neary;
+if (normx0 > 0.0) {
+nearx = normx0;
+} else if (normx1 < 0.0) {
+nearx = normx1;
+} else {
+nearx = 0.0;
+}if (normy0 > 0.0) {
+neary = normy0;
+} else if (normy1 < 0.0) {
+neary = normy1;
+} else {
+neary = 0.0;
+}return (nearx * nearx + neary * neary) < 0.25;
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "contains", 
+function (x, y, w, h) {
+return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x, y + h) && this.contains (x + w, y + h));
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "getPathIterator", 
+function (at) {
+return  new java.awt.geom.EllipseIterator (this, at);
+}, "java.awt.geom.AffineTransform");
+Clazz.overrideMethod (c$, "hashCode", 
+function () {
+var bits = java.lang.Double.doubleToLongBits (this.getX ());
+bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;
+bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;
+bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;
+return ((bits) ^ ((bits >> 32)));
+});
+Clazz.overrideMethod (c$, "equals", 
+function (obj) {
+if (obj === this) {
+return true;
+}if (Clazz.instanceOf (obj, java.awt.geom.Ellipse2D)) {
+var e2d = obj;
+return ((this.getX () == e2d.getX ()) && (this.getY () == e2d.getY ()) && (this.getWidth () == e2d.getWidth ()) && (this.getHeight () == e2d.getHeight ()));
+}return false;
+}, "~O");
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+this.x = 0;
+this.y = 0;
+this.width = 0;
+this.height = 0;
+Clazz.instantialize (this, arguments);
+}, java.awt.geom.Ellipse2D, "Float", java.awt.geom.Ellipse2D);
+Clazz.makeConstructor (c$, 
+function () {
+Clazz.superConstructor (this, java.awt.geom.Ellipse2D.Float, []);
+});
+Clazz.makeConstructor (c$, 
+function (a, b, c, d) {
+Clazz.superConstructor (this, java.awt.geom.Ellipse2D.Float, []);
+this.setFrame (a, b, c, d);
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "getX", 
+function () {
+return this.x;
+});
+Clazz.overrideMethod (c$, "getY", 
+function () {
+return this.y;
+});
+Clazz.overrideMethod (c$, "getWidth", 
+function () {
+return this.width;
+});
+Clazz.overrideMethod (c$, "getHeight", 
+function () {
+return this.height;
+});
+Clazz.overrideMethod (c$, "isEmpty", 
+function () {
+return (this.width <= 0.0 || this.height <= 0.0);
+});
+Clazz.defineMethod (c$, "setFrame", 
+function (a, b, c, d) {
+this.x = a;
+this.y = b;
+this.width = c;
+this.height = d;
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "setFrame", 
+function (a, b, c, d) {
+this.x = a;
+this.y = b;
+this.width = c;
+this.height = d;
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "getBounds2D", 
+function () {
+return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);
+});
+c$ = Clazz.p0p ();
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+this.x = 0;
+this.y = 0;
+this.width = 0;
+this.height = 0;
+Clazz.instantialize (this, arguments);
+}, java.awt.geom.Ellipse2D, "Double", java.awt.geom.Ellipse2D);
+Clazz.makeConstructor (c$, 
+function () {
+Clazz.superConstructor (this, java.awt.geom.Ellipse2D.Double, []);
+});
+Clazz.makeConstructor (c$, 
+function (a, b, c, d) {
+Clazz.superConstructor (this, java.awt.geom.Ellipse2D.Double, []);
+this.setFrame (a, b, c, d);
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "getX", 
+function () {
+return this.x;
+});
+Clazz.overrideMethod (c$, "getY", 
+function () {
+return this.y;
+});
+Clazz.overrideMethod (c$, "getWidth", 
+function () {
+return this.width;
+});
+Clazz.overrideMethod (c$, "getHeight", 
+function () {
+return this.height;
+});
+Clazz.overrideMethod (c$, "isEmpty", 
+function () {
+return (this.width <= 0.0 || this.height <= 0.0);
+});
+Clazz.defineMethod (c$, "setFrame", 
+function (a, b, c, d) {
+this.x = a;
+this.y = b;
+this.width = c;
+this.height = d;
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "getBounds2D", 
+function () {
+return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);
+});
+c$ = Clazz.p0p ();
+});