1 Clazz.declarePackage ("javax.swing.border");
2 Clazz.load (["javax.swing.border.Border"], "javax.swing.border.AbstractBorder", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Component", "$.Insets", "$.Rectangle"], function () {
3 c$ = Clazz.declareType (javax.swing.border, "AbstractBorder", null, javax.swing.border.Border);
4 Clazz.overrideMethod (c$, "paintBorder",
5 function (c, g, x, y, width, height) {
6 }, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N");
7 Clazz.defineMethod (c$, "getBorderInsets",
9 return new java.awt.Insets (0, 0, 0, 0);
10 }, "java.awt.Component");
11 Clazz.defineMethod (c$, "getBorderInsets",
12 function (c, insets) {
13 insets.left = insets.top = insets.right = insets.bottom = 0;
15 }, "java.awt.Component,java.awt.Insets");
16 Clazz.overrideMethod (c$, "isBorderOpaque",
20 Clazz.defineMethod (c$, "getInteriorRectangle",
21 function (c, x, y, width, height) {
22 return javax.swing.border.AbstractBorder.getInteriorRectangle (c, this, x, y, width, height);
23 }, "java.awt.Component,~N,~N,~N,~N");
24 c$.getInteriorRectangle = Clazz.defineMethod (c$, "getInteriorRectangle",
25 function (c, b, x, y, width, height) {
27 if (b != null) insets = b.getBorderInsets (c);
28 else insets = new java.awt.Insets (0, 0, 0, 0);
29 return new java.awt.Rectangle (x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom);
30 }, "java.awt.Component,javax.swing.border.Border,~N,~N,~N,~N");
31 Clazz.defineMethod (c$, "getBaseline",
32 function (c, width, height) {
33 if (width < 0 || height < 0) {
34 throw new IllegalArgumentException ("Width and height must be >= 0");
36 }, "java.awt.Component,~N,~N");
37 Clazz.defineMethod (c$, "getBaselineResizeBehavior",
40 throw new NullPointerException ("Component must be non-null");
41 }return java.awt.Component.BaselineResizeBehavior.OTHER;
42 }, "java.awt.Component");
43 c$.isLeftToRight = Clazz.defineMethod (c$, "isLeftToRight",
45 return c.getComponentOrientation ().isLeftToRight ();
46 }, "java.awt.Component");