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