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