1 Clazz.declarePackage ("jssun.awt.geom");
2 Clazz.load (null, "jssun.awt.geom.ChainEnd", ["java.lang.InternalError"], function () {
3 c$ = Clazz.decorateAsClass (function () {
8 Clazz.instantialize (this, arguments);
9 }, jssun.awt.geom, "ChainEnd");
10 Clazz.makeConstructor (c$,
11 function (first, partner) {
14 this.partner = partner;
15 this.etag = first.getEdgeTag ();
16 }, "jssun.awt.geom.CurveLink,jssun.awt.geom.ChainEnd");
17 Clazz.defineMethod (c$, "getChain",
21 Clazz.defineMethod (c$, "setOtherEnd",
23 this.partner = partner;
24 }, "jssun.awt.geom.ChainEnd");
25 Clazz.defineMethod (c$, "getPartner",
29 Clazz.defineMethod (c$, "linkTo",
31 if (this.etag == 0 || that.etag == 0) {
32 throw new InternalError ("ChainEnd linked more than once!");
33 }if (this.etag == that.etag) {
34 throw new InternalError ("Linking chains of the same type!");
45 enter.tail.setNext (exit.head);
46 enter.tail = exit.tail;
47 if (this.partner === that) {
49 }var otherenter = exit.partner;
50 var otherexit = enter.partner;
51 otherenter.partner = otherexit;
52 otherexit.partner = otherenter;
53 if (enter.head.getYTop () < otherenter.head.getYTop ()) {
54 enter.tail.setNext (otherenter.head);
55 otherenter.head = enter.head;
57 otherexit.tail.setNext (enter.head);
58 otherexit.tail = enter.tail;
60 }, "jssun.awt.geom.ChainEnd");
61 Clazz.defineMethod (c$, "addLink",
64 this.tail.setNext (newlink);
67 newlink.setNext (this.head);
69 }}, "jssun.awt.geom.CurveLink");
70 Clazz.defineMethod (c$, "getX",
73 return this.tail.getXBot ();
75 return this.head.getXBot ();