JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / java / awt / GridBagConstraints.js
1 Clazz.declarePackage ("java.awt");\r
2 Clazz.load (null, "java.awt.GridBagConstraints", ["java.lang.InternalError", "java.awt.Insets"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.gridx = 0;\r
5 this.gridy = 0;\r
6 this.gridwidth = 0;\r
7 this.gridheight = 0;\r
8 this.weightx = 0;\r
9 this.weighty = 0;\r
10 this.anchor = 0;\r
11 this.fill = 0;\r
12 this.insets = null;\r
13 this.ipadx = 0;\r
14 this.ipady = 0;\r
15 this.tempX = 0;\r
16 this.tempY = 0;\r
17 this.tempWidth = 0;\r
18 this.tempHeight = 0;\r
19 this.minWidth = 0;\r
20 this.minHeight = 0;\r
21 this.ascent = 0;\r
22 this.descent = 0;\r
23 this.baselineResizeBehavior = null;\r
24 this.centerPadding = 0;\r
25 this.centerOffset = 0;\r
26 Clazz.instantialize (this, arguments);\r
27 }, java.awt, "GridBagConstraints", null, Cloneable);\r
28 Clazz.makeConstructor (c$, \r
29 function () {\r
30 this.gridx = -1;\r
31 this.gridy = -1;\r
32 this.gridwidth = 1;\r
33 this.gridheight = 1;\r
34 this.weightx = 0;\r
35 this.weighty = 0;\r
36 this.anchor = 10;\r
37 this.fill = 0;\r
38 this.insets =  new java.awt.Insets (0, 0, 0, 0);\r
39 this.ipadx = 0;\r
40 this.ipady = 0;\r
41 });\r
42 Clazz.makeConstructor (c$, \r
43 function (gridx, gridy, gridwidth, gridheight, weightx, weighty, anchor, fill, insets, ipadx, ipady) {\r
44 this.gridx = gridx;\r
45 this.gridy = gridy;\r
46 this.gridwidth = gridwidth;\r
47 this.gridheight = gridheight;\r
48 this.fill = fill;\r
49 this.ipadx = ipadx;\r
50 this.ipady = ipady;\r
51 this.insets = insets;\r
52 this.anchor = anchor;\r
53 this.weightx = weightx;\r
54 this.weighty = weighty;\r
55 }, "~N,~N,~N,~N,~N,~N,~N,~N,java.awt.Insets,~N,~N");\r
56 Clazz.overrideMethod (c$, "toString", \r
57 function () {\r
58 return "[" + this.gridx + "," + this.gridy + "," + this.gridwidth + "," + this.gridheight + "," + this.fill + "," + this.ipadx + "," + this.ipady + "," + this.insets + "," + this.anchor + "," + this.weightx + "," + this.weighty + "]";\r
59 });\r
60 Clazz.defineMethod (c$, "clone", \r
61 function () {\r
62 try {\r
63 var c = Clazz.superCall (this, java.awt.GridBagConstraints, "clone", []);\r
64 c.insets = this.insets.clone ();\r
65 return c;\r
66 } catch (e) {\r
67 if (Clazz.exceptionOf (e, CloneNotSupportedException)) {\r
68 throw  new InternalError ();\r
69 } else {\r
70 throw e;\r
71 }\r
72 }\r
73 });\r
74 Clazz.defineMethod (c$, "isVerticallyResizable", \r
75 function () {\r
76 return (this.fill == 1 || this.fill == 3);\r
77 });\r
78 Clazz.defineStatics (c$,\r
79 "RELATIVE", -1,\r
80 "REMAINDER", 0,\r
81 "NONE", 0,\r
82 "BOTH", 1,\r
83 "HORIZONTAL", 2,\r
84 "VERTICAL", 3,\r
85 "CENTER", 10,\r
86 "NORTH", 11,\r
87 "NORTHEAST", 12,\r
88 "EAST", 13,\r
89 "SOUTHEAST", 14,\r
90 "SOUTH", 15,\r
91 "SOUTHWEST", 16,\r
92 "WEST", 17,\r
93 "NORTHWEST", 18,\r
94 "PAGE_START", 19,\r
95 "PAGE_END", 20,\r
96 "LINE_START", 21,\r
97 "LINE_END", 22,\r
98 "FIRST_LINE_START", 23,\r
99 "FIRST_LINE_END", 24,\r
100 "LAST_LINE_START", 25,\r
101 "LAST_LINE_END", 26,\r
102 "BASELINE", 0x100,\r
103 "BASELINE_LEADING", 0x200,\r
104 "BASELINE_TRAILING", 0x300,\r
105 "ABOVE_BASELINE", 0x400,\r
106 "ABOVE_BASELINE_LEADING", 0x500,\r
107 "ABOVE_BASELINE_TRAILING", 0x600,\r
108 "BELOW_BASELINE", 0x700,\r
109 "BELOW_BASELINE_LEADING", 0x800,\r
110 "BELOW_BASELINE_TRAILING", 0x900);\r
111 });\r