497f23faa6fc11dd168dfbb37a956108c0938bf7
[jalviewjs.git] / site / swingjs / j2s / javax / swing / border / EmptyBorder.js
1 Clazz.declarePackage ("javax.swing.border");
2 Clazz.load (["javax.swing.border.AbstractBorder"], "javax.swing.border.EmptyBorder", ["java.awt.Insets"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.left = 0;
5 this.right = 0;
6 this.top = 0;
7 this.bottom = 0;
8 Clazz.instantialize (this, arguments);
9 }, javax.swing.border, "EmptyBorder", javax.swing.border.AbstractBorder);
10 Clazz.makeConstructor (c$, 
11 function (top, left, bottom, right) {
12 Clazz.superConstructor (this, javax.swing.border.EmptyBorder, []);
13 this.top = top;
14 this.right = right;
15 this.bottom = bottom;
16 this.left = left;
17 }, "~N,~N,~N,~N");
18 Clazz.makeConstructor (c$, 
19 function (borderInsets) {
20 Clazz.superConstructor (this, javax.swing.border.EmptyBorder, []);
21 this.top = borderInsets.top;
22 this.right = borderInsets.right;
23 this.bottom = borderInsets.bottom;
24 this.left = borderInsets.left;
25 }, "java.awt.Insets");
26 Clazz.overrideMethod (c$, "paintBorder", 
27 function (c, g, x, y, width, height) {
28 }, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N");
29 Clazz.defineMethod (c$, "getBorderInsets", 
30 function (c) {
31 return this.getBorderInsets ();
32 }, "java.awt.Component");
33 Clazz.defineMethod (c$, "getBorderInsets", 
34 function (c, insets) {
35 insets.left = this.left;
36 insets.top = this.top;
37 insets.right = this.right;
38 insets.bottom = this.bottom;
39 return insets;
40 }, "java.awt.Component,java.awt.Insets");
41 Clazz.defineMethod (c$, "getBorderInsets", 
42 function () {
43 return  new java.awt.Insets (this.top, this.left, this.bottom, this.right);
44 });
45 Clazz.overrideMethod (c$, "isBorderOpaque", 
46 function () {
47 return false;
48 });
49 });