1 Clazz.declarePackage ("java.awt");
2 Clazz.load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () {
3 c$ = Clazz.declareType (java.awt, "Graphics2D", java.awt.Graphics);
4 Clazz.makeConstructor (c$,
6 Clazz.superConstructor (this, java.awt.Graphics2D, []);
8 Clazz.overrideMethod (c$, "draw3DRect",
9 function (x, y, width, height, raised) {
10 var p = this.getPaint ();
11 var c = this.getColor ();
12 var brighter = c.brighter ();
13 var darker = c.darker ();
14 this.setColor (raised ? brighter : darker);
15 this.fillRect (x, y, 1, height + 1);
16 this.fillRect (x + 1, y, width - 1, 1);
17 this.setColor (raised ? darker : brighter);
18 this.fillRect (x + 1, y + height, width, 1);
19 this.fillRect (x + width, y, 1, height);
22 Clazz.overrideMethod (c$, "fill3DRect",
23 function (x, y, width, height, raised) {
24 var p = this.getPaint ();
25 var c = this.getColor ();
26 var brighter = c.brighter ();
27 var darker = c.darker ();
29 this.setColor (darker);
32 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
33 this.setColor (raised ? brighter : darker);
34 this.fillRect (x, y, 1, height);
35 this.fillRect (x + 1, y, width - 2, 1);
36 this.setColor (raised ? darker : brighter);
37 this.fillRect (x + 1, y + height - 1, width - 1, 1);
38 this.fillRect (x + width - 1, y, 1, height - 1);