1 Clazz.declarePackage ("javax.swing.border");
2 Clazz.load (["javax.swing.border.AbstractBorder"], "javax.swing.border.CompoundBorder", ["java.awt.Insets"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.outsideBorder = null;
5 this.insideBorder = null;
6 Clazz.instantialize (this, arguments);
7 }, javax.swing.border, "CompoundBorder", javax.swing.border.AbstractBorder);
8 Clazz.makeConstructor (c$,
10 Clazz.superConstructor (this, javax.swing.border.CompoundBorder, []);
11 this.outsideBorder = null;
12 this.insideBorder = null;
14 Clazz.makeConstructor (c$,
15 function (outsideBorder, insideBorder) {
16 Clazz.superConstructor (this, javax.swing.border.CompoundBorder, []);
17 this.outsideBorder = outsideBorder;
18 this.insideBorder = insideBorder;
19 }, "javax.swing.border.Border,javax.swing.border.Border");
20 Clazz.overrideMethod (c$, "isBorderOpaque",
22 return (this.outsideBorder == null || this.outsideBorder.isBorderOpaque ()) && (this.insideBorder == null || this.insideBorder.isBorderOpaque ());
24 Clazz.overrideMethod (c$, "paintBorder",
25 function (c, g, x, y, width, height) {
35 if (this.outsideBorder != null) {
36 this.outsideBorder.paintBorder (c, g, px, py, pw, ph);
37 nextInsets = this.outsideBorder.getBorderInsets (c);
38 px += nextInsets.left;
40 pw = pw - nextInsets.right - nextInsets.left;
41 ph = ph - nextInsets.bottom - nextInsets.top;
42 }if (this.insideBorder != null) this.insideBorder.paintBorder (c, g, px, py, pw, ph);
43 }, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N");
44 Clazz.defineMethod (c$, "getBorderInsets",
45 function (c, insets) {
47 insets.top = insets.left = insets.right = insets.bottom = 0;
48 if (this.outsideBorder != null) {
49 nextInsets = this.outsideBorder.getBorderInsets (c);
50 insets.top += nextInsets.top;
51 insets.left += nextInsets.left;
52 insets.right += nextInsets.right;
53 insets.bottom += nextInsets.bottom;
54 }if (this.insideBorder != null) {
55 nextInsets = this.insideBorder.getBorderInsets (c);
56 insets.top += nextInsets.top;
57 insets.left += nextInsets.left;
58 insets.right += nextInsets.right;
59 insets.bottom += nextInsets.bottom;
61 }, "java.awt.Component,java.awt.Insets");
62 Clazz.defineMethod (c$, "getBorderInsets",
64 return this.getBorderInsets (c, new java.awt.Insets (0, 0, 0, 0));
65 }, "java.awt.Component");
66 Clazz.defineMethod (c$, "getOutsideBorder",
68 return this.outsideBorder;
70 Clazz.defineMethod (c$, "getInsideBorder",
72 return this.insideBorder;