1 Clazz.declarePackage ("java.awt");
2 Clazz.load (["java.awt.geom.Point2D"], "java.awt.Point", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
6 Clazz.instantialize (this, arguments);
7 }, java.awt, "Point", java.awt.geom.Point2D);
8 Clazz.makeConstructor (c$,
10 this.construct (0, 0);
12 Clazz.makeConstructor (c$,
14 this.construct (p.x, p.y);
16 Clazz.makeConstructor (c$,
18 Clazz.superConstructor (this, java.awt.Point, []);
22 Clazz.overrideMethod (c$, "getX",
26 Clazz.overrideMethod (c$, "getY",
30 Clazz.defineMethod (c$, "getLocation",
32 return new java.awt.Point (this.x, this.y);
34 Clazz.defineMethod (c$, "setLocation",
36 this.setLocation (p.x, p.y);
38 Clazz.defineMethod (c$, "setLocation",
40 this.x = Clazz.doubleToInt (Math.floor (x + 0.5));
41 this.y = Clazz.doubleToInt (Math.floor (y + 0.5));
43 Clazz.defineMethod (c$, "move",
48 Clazz.defineMethod (c$, "translate",
53 Clazz.defineMethod (c$, "equals",
55 if (Clazz.instanceOf (obj, java.awt.Point)) {
57 return (this.x == pt.x) && (this.y == pt.y);
58 }return Clazz.superCall (this, java.awt.Point, "equals", [obj]);
60 Clazz.overrideMethod (c$, "toString",
62 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + "]";