Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / javax / swing / GroupLayout.js
1 Clazz.declarePackage ("javax.swing");
2 Clazz.load (["java.lang.Enum", "java.awt.LayoutManager2"], "javax.swing.GroupLayout", ["java.lang.IllegalArgumentException", "$.IllegalStateException", "$.StringBuffer", "java.util.ArrayList", "$.Collections", "$.HashMap", "$.HashSet", "java.awt.Component", "$.Dimension", "javax.swing.JComponent", "$.LayoutStyle"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.autocreatePadding = false;
5 this.autocreateContainerPadding = false;
6 this.horizontalGroup = null;
7 this.verticalGroup = null;
8 this.componentInfos = null;
9 this.host = null;
10 this.tmpParallelSet = null;
11 this.springsChanged = false;
12 this.isValid = false;
13 this.hasPreferredPaddingSprings = false;
14 this.layoutStyle = null;
15 this.honorsVisibility = false;
16 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.Spring")) {
17 javax.swing.GroupLayout.$GroupLayout$Spring$ ();
18 }
19 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.Group")) {
20 javax.swing.GroupLayout.$GroupLayout$Group$ ();
21 }
22 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.SequentialGroup")) {
23 javax.swing.GroupLayout.$GroupLayout$SequentialGroup$ ();
24 }
25 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ParallelGroup")) {
26 javax.swing.GroupLayout.$GroupLayout$ParallelGroup$ ();
27 }
28 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.BaselineGroup")) {
29 javax.swing.GroupLayout.$GroupLayout$BaselineGroup$ ();
30 }
31 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ComponentSpring")) {
32 javax.swing.GroupLayout.$GroupLayout$ComponentSpring$ ();
33 }
34 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.PreferredGapSpring")) {
35 javax.swing.GroupLayout.$GroupLayout$PreferredGapSpring$ ();
36 }
37 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.GapSpring")) {
38 javax.swing.GroupLayout.$GroupLayout$GapSpring$ ();
39 }
40 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.AutoPreferredGapSpring")) {
41 javax.swing.GroupLayout.$GroupLayout$AutoPreferredGapSpring$ ();
42 }
43 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ContainerAutoPreferredGapSpring")) {
44 javax.swing.GroupLayout.$GroupLayout$ContainerAutoPreferredGapSpring$ ();
45 }
46 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ComponentInfo")) {
47 javax.swing.GroupLayout.$GroupLayout$ComponentInfo$ ();
48 }
49 Clazz.instantialize (this, arguments);
50 }, javax.swing, "GroupLayout", null, java.awt.LayoutManager2);
51 c$.checkSize = Clazz.defineMethod (c$, "checkSize", 
52  function (min, pref, max, isComponentSpring) {
53 javax.swing.GroupLayout.checkResizeType (min, isComponentSpring);
54 if (!isComponentSpring && pref < 0) {
55 throw  new IllegalArgumentException ("Pref must be >= 0");
56 } else if (isComponentSpring) {
57 javax.swing.GroupLayout.checkResizeType (pref, true);
58 }javax.swing.GroupLayout.checkResizeType (max, isComponentSpring);
59 javax.swing.GroupLayout.checkLessThan (min, pref);
60 javax.swing.GroupLayout.checkLessThan (pref, max);
61 }, "~N,~N,~N,~B");
62 c$.checkResizeType = Clazz.defineMethod (c$, "checkResizeType", 
63  function (type, isComponentSpring) {
64 if (type < 0 && ((isComponentSpring && type != -1 && type != -2) || (!isComponentSpring && type != -2))) {
65 throw  new IllegalArgumentException ("Invalid size");
66 }}, "~N,~B");
67 c$.checkLessThan = Clazz.defineMethod (c$, "checkLessThan", 
68  function (min, max) {
69 if (min >= 0 && max >= 0 && min > max) {
70 throw  new IllegalArgumentException ("Following is not met: min<=pref<=max");
71 }}, "~N,~N");
72 Clazz.makeConstructor (c$, 
73 function (host) {
74 if (host == null) {
75 throw  new IllegalArgumentException ("Container must be non-null");
76 }this.honorsVisibility = true;
77 this.host = host;
78 this.setHorizontalGroup (this.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING, true));
79 this.setVerticalGroup (this.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING, true));
80 this.componentInfos =  new java.util.HashMap ();
81 this.tmpParallelSet =  new java.util.HashSet ();
82 }, "java.awt.Container");
83 Clazz.defineMethod (c$, "setHonorsVisibility", 
84 function (honorsVisibility) {
85 if (this.honorsVisibility != honorsVisibility) {
86 this.honorsVisibility = honorsVisibility;
87 this.springsChanged = true;
88 this.isValid = false;
89 this.invalidateHost ();
90 }}, "~B");
91 Clazz.defineMethod (c$, "getHonorsVisibility", 
92 function () {
93 return this.honorsVisibility;
94 });
95 Clazz.defineMethod (c$, "setHonorsVisibility", 
96 function (component, honorsVisibility) {
97 if (component == null) {
98 throw  new IllegalArgumentException ("Component must be non-null");
99 }this.getComponentInfo (component).setHonorsVisibility (honorsVisibility);
100 this.springsChanged = true;
101 this.isValid = false;
102 this.invalidateHost ();
103 }, "java.awt.Component,Boolean");
104 Clazz.defineMethod (c$, "setAutoCreateGaps", 
105 function (autoCreatePadding) {
106 if (this.autocreatePadding != autoCreatePadding) {
107 this.autocreatePadding = autoCreatePadding;
108 this.invalidateHost ();
109 }}, "~B");
110 Clazz.defineMethod (c$, "getAutoCreateGaps", 
111 function () {
112 return this.autocreatePadding;
113 });
114 Clazz.defineMethod (c$, "setAutoCreateContainerGaps", 
115 function (autoCreateContainerPadding) {
116 if (this.autocreateContainerPadding != autoCreateContainerPadding) {
117 this.autocreateContainerPadding = autoCreateContainerPadding;
118 this.horizontalGroup = this.createTopLevelGroup (this.getHorizontalGroup ());
119 this.verticalGroup = this.createTopLevelGroup (this.getVerticalGroup ());
120 this.invalidateHost ();
121 }}, "~B");
122 Clazz.defineMethod (c$, "getAutoCreateContainerGaps", 
123 function () {
124 return this.autocreateContainerPadding;
125 });
126 Clazz.defineMethod (c$, "setHorizontalGroup", 
127 function (group) {
128 if (group == null) {
129 throw  new IllegalArgumentException ("Group must be non-null");
130 }this.horizontalGroup = this.createTopLevelGroup (group);
131 this.invalidateHost ();
132 }, "javax.swing.GroupLayout.Group");
133 Clazz.defineMethod (c$, "getHorizontalGroup", 
134  function () {
135 var index = 0;
136 if (this.horizontalGroup.springs.size () > 1) {
137 index = 1;
138 }return this.horizontalGroup.springs.get (index);
139 });
140 Clazz.defineMethod (c$, "setVerticalGroup", 
141 function (group) {
142 if (group == null) {
143 throw  new IllegalArgumentException ("Group must be non-null");
144 }this.verticalGroup = this.createTopLevelGroup (group);
145 this.invalidateHost ();
146 }, "javax.swing.GroupLayout.Group");
147 Clazz.defineMethod (c$, "getVerticalGroup", 
148  function () {
149 var index = 0;
150 if (this.verticalGroup.springs.size () > 1) {
151 index = 1;
152 }return this.verticalGroup.springs.get (index);
153 });
154 Clazz.defineMethod (c$, "createTopLevelGroup", 
155  function (specifiedGroup) {
156 var group = this.createSequentialGroup ();
157 if (this.getAutoCreateContainerGaps ()) {
158 group.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, this, null));
159 group.addGroup (specifiedGroup);
160 group.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, this, null));
161 } else {
162 group.addGroup (specifiedGroup);
163 }return group;
164 }, "javax.swing.GroupLayout.Group");
165 Clazz.defineMethod (c$, "createSequentialGroup", 
166 function () {
167 return Clazz.innerTypeInstance (javax.swing.GroupLayout.SequentialGroup, this, null);
168 });
169 Clazz.defineMethod (c$, "createParallelGroup", 
170 function () {
171 return this.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING);
172 });
173 Clazz.defineMethod (c$, "createParallelGroup", 
174 function (alignment) {
175 return this.createParallelGroup (alignment, true);
176 }, "javax.swing.GroupLayout.Alignment");
177 Clazz.defineMethod (c$, "createParallelGroup", 
178 function (alignment, resizable) {
179 if (alignment === javax.swing.GroupLayout.Alignment.BASELINE) {
180 return Clazz.innerTypeInstance (javax.swing.GroupLayout.BaselineGroup, this, null, resizable);
181 }return Clazz.innerTypeInstance (javax.swing.GroupLayout.ParallelGroup, this, null, alignment, resizable);
182 }, "javax.swing.GroupLayout.Alignment,~B");
183 Clazz.defineMethod (c$, "createBaselineGroup", 
184 function (resizable, anchorBaselineToTop) {
185 return Clazz.innerTypeInstance (javax.swing.GroupLayout.BaselineGroup, this, null, resizable, anchorBaselineToTop);
186 }, "~B,~B");
187 Clazz.defineMethod (c$, "linkSize", 
188 function (components) {
189 this.linkSize (0, components);
190 this.linkSize (1, components);
191 }, "~A");
192 Clazz.defineMethod (c$, "linkSize", 
193 function (axis, components) {
194 if (components == null) {
195 throw  new IllegalArgumentException ("Components must be non-null");
196 }for (var counter = components.length - 1; counter >= 0; counter--) {
197 var c = components[counter];
198 if (components[counter] == null) {
199 throw  new IllegalArgumentException ("Components must be non-null");
200 }this.getComponentInfo (c);
201 }
202 var glAxis;
203 if (axis == 0) {
204 glAxis = 0;
205 } else if (axis == 1) {
206 glAxis = 1;
207 } else {
208 throw  new IllegalArgumentException ("Axis must be one of SwingConstants.HORIZONTAL or SwingConstants.VERTICAL");
209 }var master = this.getComponentInfo (components[components.length - 1]).getLinkInfo (glAxis);
210 for (var counter = components.length - 2; counter >= 0; counter--) {
211 master.add (this.getComponentInfo (components[counter]));
212 }
213 this.invalidateHost ();
214 }, "~N,~A");
215 Clazz.defineMethod (c$, "replace", 
216 function (existingComponent, newComponent) {
217 if (existingComponent == null || newComponent == null) {
218 throw  new IllegalArgumentException ("Components must be non-null");
219 }if (this.springsChanged) {
220 this.registerComponents (this.horizontalGroup, 0);
221 this.registerComponents (this.verticalGroup, 1);
222 }var info = this.componentInfos.remove (existingComponent);
223 if (info == null) {
224 throw  new IllegalArgumentException ("Component must already exist");
225 }this.host.remove (existingComponent);
226 if (newComponent.getParent () !== this.host) {
227 this.host.add (newComponent);
228 }info.setComponent (newComponent);
229 this.componentInfos.put (newComponent, info);
230 this.invalidateHost ();
231 }, "java.awt.Component,java.awt.Component");
232 Clazz.defineMethod (c$, "setLayoutStyle", 
233 function (layoutStyle) {
234 this.layoutStyle = layoutStyle;
235 this.invalidateHost ();
236 }, "javax.swing.LayoutStyle");
237 Clazz.defineMethod (c$, "getLayoutStyle", 
238 function () {
239 return this.layoutStyle;
240 });
241 Clazz.defineMethod (c$, "getLayoutStyle0", 
242  function () {
243 var layoutStyle = this.getLayoutStyle ();
244 if (layoutStyle == null) {
245 layoutStyle = javax.swing.LayoutStyle.getInstance ();
246 }return layoutStyle;
247 });
248 Clazz.defineMethod (c$, "invalidateHost", 
249  function () {
250 if (Clazz.instanceOf (this.host, javax.swing.JComponent)) {
251 (this.host).revalidate ();
252 } else {
253 this.host.invalidate ();
254 }this.host.repaint ();
255 });
256 Clazz.defineMethod (c$, "addLayoutComponent", 
257 function (name, component) {
258 }, "~S,java.awt.Component");
259 Clazz.overrideMethod (c$, "removeLayoutComponent", 
260 function (component) {
261 var info = this.componentInfos.remove (component);
262 if (info != null) {
263 info.dispose ();
264 this.springsChanged = true;
265 this.isValid = false;
266 }}, "java.awt.Component");
267 Clazz.overrideMethod (c$, "preferredLayoutSize", 
268 function (parent) {
269 this.checkParent (parent);
270 this.prepare (1);
271 return this.adjustSize (this.horizontalGroup.getPreferredSize (0), this.verticalGroup.getPreferredSize (1));
272 }, "java.awt.Container");
273 Clazz.overrideMethod (c$, "minimumLayoutSize", 
274 function (parent) {
275 this.checkParent (parent);
276 this.prepare (0);
277 return this.adjustSize (this.horizontalGroup.getMinimumSize (0), this.verticalGroup.getMinimumSize (1));
278 }, "java.awt.Container");
279 Clazz.overrideMethod (c$, "layoutContainer", 
280 function (parent) {
281 this.prepare (3);
282 var insets = parent.getInsets ();
283 var width = parent.getWidth () - insets.left - insets.right;
284 var height = parent.getHeight () - insets.top - insets.bottom;
285 var ltr = this.isLeftToRight ();
286 if (this.getAutoCreateGaps () || this.getAutoCreateContainerGaps () || this.hasPreferredPaddingSprings) {
287 this.calculateAutopadding (this.horizontalGroup, 0, 3, 0, width);
288 this.calculateAutopadding (this.verticalGroup, 1, 3, 0, height);
289 }this.horizontalGroup.setSize (0, 0, width);
290 this.verticalGroup.setSize (1, 0, height);
291 for (var info, $info = this.componentInfos.values ().iterator (); $info.hasNext () && ((info = $info.next ()) || true);) {
292 info.setBounds (insets, width, ltr);
293 }
294 }, "java.awt.Container");
295 Clazz.defineMethod (c$, "addLayoutComponent", 
296 function (component, constraints) {
297 }, "java.awt.Component,~O");
298 Clazz.overrideMethod (c$, "maximumLayoutSize", 
299 function (parent) {
300 this.checkParent (parent);
301 this.prepare (2);
302 return this.adjustSize (this.horizontalGroup.getMaximumSize (0), this.verticalGroup.getMaximumSize (1));
303 }, "java.awt.Container");
304 Clazz.overrideMethod (c$, "getLayoutAlignmentX", 
305 function (parent) {
306 this.checkParent (parent);
307 return .5;
308 }, "java.awt.Container");
309 Clazz.overrideMethod (c$, "getLayoutAlignmentY", 
310 function (parent) {
311 this.checkParent (parent);
312 return .5;
313 }, "java.awt.Container");
314 Clazz.overrideMethod (c$, "invalidateLayout", 
315 function (parent) {
316 this.checkParent (parent);
317 {
318 this.isValid = false;
319 }}, "java.awt.Container");
320 Clazz.defineMethod (c$, "prepare", 
321  function (sizeType) {
322 var visChanged = false;
323 if (!this.isValid) {
324 this.isValid = true;
325 this.horizontalGroup.setSize (0, -2147483648, -2147483648);
326 this.verticalGroup.setSize (1, -2147483648, -2147483648);
327 for (var ci, $ci = this.componentInfos.values ().iterator (); $ci.hasNext () && ((ci = $ci.next ()) || true);) {
328 if (ci.updateVisibility ()) {
329 visChanged = true;
330 }ci.clearCachedSize ();
331 }
332 }if (this.springsChanged) {
333 this.registerComponents (this.horizontalGroup, 0);
334 this.registerComponents (this.verticalGroup, 1);
335 }if (this.springsChanged || visChanged) {
336 this.checkComponents ();
337 this.horizontalGroup.removeAutopadding ();
338 this.verticalGroup.removeAutopadding ();
339 if (this.getAutoCreateGaps ()) {
340 this.insertAutopadding (true);
341 } else if (this.hasPreferredPaddingSprings || this.getAutoCreateContainerGaps ()) {
342 this.insertAutopadding (false);
343 }this.springsChanged = false;
344 }if (sizeType != 3 && (this.getAutoCreateGaps () || this.getAutoCreateContainerGaps () || this.hasPreferredPaddingSprings)) {
345 this.calculateAutopadding (this.horizontalGroup, 0, sizeType, 0, 0);
346 this.calculateAutopadding (this.verticalGroup, 1, sizeType, 0, 0);
347 }}, "~N");
348 Clazz.defineMethod (c$, "calculateAutopadding", 
349  function (group, axis, sizeType, origin, size) {
350 group.unsetAutopadding ();
351 switch (sizeType) {
352 case 0:
353 size = group.getMinimumSize (axis);
354 break;
355 case 1:
356 size = group.getPreferredSize (axis);
357 break;
358 case 2:
359 size = group.getMaximumSize (axis);
360 break;
361 default:
362 break;
363 }
364 group.setSize (axis, origin, size);
365 group.calculateAutopadding (axis);
366 }, "javax.swing.GroupLayout.Group,~N,~N,~N,~N");
367 Clazz.defineMethod (c$, "checkComponents", 
368  function () {
369 for (var info, $info = this.componentInfos.values ().iterator (); $info.hasNext () && ((info = $info.next ()) || true);) {
370 if (info.horizontalSpring == null) {
371 throw  new IllegalStateException (info.component + " is not attached to a horizontal group");
372 }if (info.verticalSpring == null) {
373 throw  new IllegalStateException (info.component + " is not attached to a vertical group");
374 }}
375 });
376 Clazz.defineMethod (c$, "registerComponents", 
377  function (group, axis) {
378 var springs = group.springs;
379 for (var counter = springs.size () - 1; counter >= 0; counter--) {
380 var spring = springs.get (counter);
381 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.ComponentSpring)) {
382 (spring).installIfNecessary (axis);
383 } else if (Clazz.instanceOf (spring, javax.swing.GroupLayout.Group)) {
384 this.registerComponents (spring, axis);
385 }}
386 }, "javax.swing.GroupLayout.Group,~N");
387 Clazz.defineMethod (c$, "adjustSize", 
388  function (width, height) {
389 var insets = this.host.getInsets ();
390 return  new java.awt.Dimension (width + insets.left + insets.right, height + insets.top + insets.bottom);
391 }, "~N,~N");
392 Clazz.defineMethod (c$, "checkParent", 
393  function (parent) {
394 if (parent !== this.host) {
395 throw  new IllegalArgumentException ("GroupLayout can only be used with one Container at a time");
396 }}, "java.awt.Container");
397 Clazz.defineMethod (c$, "getComponentInfo", 
398  function (component) {
399 var info = this.componentInfos.get (component);
400 if (info == null) {
401 info = Clazz.innerTypeInstance (javax.swing.GroupLayout.ComponentInfo, this, null, component);
402 this.componentInfos.put (component, info);
403 if (component.getParent () !== this.host) {
404 this.host.add (component);
405 }}return info;
406 }, "java.awt.Component");
407 Clazz.defineMethod (c$, "insertAutopadding", 
408  function (insert) {
409 this.horizontalGroup.insertAutopadding (0,  new java.util.ArrayList (1),  new java.util.ArrayList (1),  new java.util.ArrayList (1),  new java.util.ArrayList (1), insert);
410 this.verticalGroup.insertAutopadding (1,  new java.util.ArrayList (1),  new java.util.ArrayList (1),  new java.util.ArrayList (1),  new java.util.ArrayList (1), insert);
411 }, "~B");
412 Clazz.defineMethod (c$, "areParallelSiblings", 
413  function (source, target, axis) {
414 var sourceInfo = this.getComponentInfo (source);
415 var targetInfo = this.getComponentInfo (target);
416 var sourceSpring;
417 var targetSpring;
418 if (axis == 0) {
419 sourceSpring = sourceInfo.horizontalSpring;
420 targetSpring = targetInfo.horizontalSpring;
421 } else {
422 sourceSpring = sourceInfo.verticalSpring;
423 targetSpring = targetInfo.verticalSpring;
424 }var sourcePath = this.tmpParallelSet;
425 sourcePath.clear ();
426 var spring = sourceSpring.getParent ();
427 while (spring != null) {
428 sourcePath.add (spring);
429 spring = spring.getParent ();
430 }
431 spring = targetSpring.getParent ();
432 while (spring != null) {
433 if (sourcePath.contains (spring)) {
434 sourcePath.clear ();
435 while (spring != null) {
436 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.ParallelGroup)) {
437 return true;
438 }spring = spring.getParent ();
439 }
440 return false;
441 }spring = spring.getParent ();
442 }
443 sourcePath.clear ();
444 return false;
445 }, "java.awt.Component,java.awt.Component,~N");
446 Clazz.defineMethod (c$, "isLeftToRight", 
447  function () {
448 return this.host.getComponentOrientation ().isLeftToRight ();
449 });
450 Clazz.defineMethod (c$, "toString", 
451 function () {
452 if (this.springsChanged) {
453 this.registerComponents (this.horizontalGroup, 0);
454 this.registerComponents (this.verticalGroup, 1);
455 }var buffer =  new StringBuffer ();
456 buffer.append ("HORIZONTAL\n");
457 this.createSpringDescription (buffer, this.horizontalGroup, "  ", 0);
458 buffer.append ("\nVERTICAL\n");
459 this.createSpringDescription (buffer, this.verticalGroup, "  ", 1);
460 return buffer.toString ();
461 });
462 Clazz.defineMethod (c$, "createSpringDescription", 
463  function (buffer, spring, indent, axis) {
464 var origin = "";
465 var padding = "";
466 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.ComponentSpring)) {
467 var cSpring = spring;
468 origin = Integer.toString (cSpring.getOrigin ()) + " ";
469 var name = cSpring.getComponent ().getName ();
470 if (name != null) {
471 origin = "name=" + name + ", ";
472 }}if (Clazz.instanceOf (spring, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
473 var paddingSpring = spring;
474 padding = ", userCreated=" + paddingSpring.getUserCreated () + ", matches=" + paddingSpring.getMatchDescription ();
475 }buffer.append (indent + spring.getClass ().getName () + " " + Integer.toHexString (spring.hashCode ()) + " " + origin + ", size=" + spring.getSize () + ", alignment=" + spring.getAlignment () + " prefs=[" + spring.getMinimumSize (axis) + " " + spring.getPreferredSize (axis) + " " + spring.getMaximumSize (axis) + padding + "]\n");
476 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.Group)) {
477 var springs = (spring).springs;
478 indent += "  ";
479 for (var counter = 0; counter < springs.size (); counter++) {
480 this.createSpringDescription (buffer, springs.get (counter), indent, axis);
481 }
482 }}, "StringBuffer,javax.swing.GroupLayout.Spring,~S,~N");
483 c$.$GroupLayout$Spring$ = function () {
484 Clazz.pu$h(self.c$);
485 c$ = Clazz.decorateAsClass (function () {
486 Clazz.prepareCallback (this, arguments);
487 this.size = 0;
488 this.min = 0;
489 this.max = 0;
490 this.pref = 0;
491 this.parent = null;
492 this.alignment = null;
493 Clazz.instantialize (this, arguments);
494 }, javax.swing.GroupLayout, "Spring");
495 Clazz.makeConstructor (c$, 
496 function () {
497 this.min = this.pref = this.max = -2147483648;
498 });
499 Clazz.defineMethod (c$, "setParent", 
500 function (a) {
501 this.parent = a;
502 }, "javax.swing.GroupLayout.Spring");
503 Clazz.defineMethod (c$, "getParent", 
504 function () {
505 return this.parent;
506 });
507 Clazz.defineMethod (c$, "setAlignment", 
508 function (a) {
509 this.alignment = a;
510 }, "javax.swing.GroupLayout.Alignment");
511 Clazz.defineMethod (c$, "getAlignment", 
512 function () {
513 return this.alignment;
514 });
515 Clazz.defineMethod (c$, "getMinimumSize", 
516 function (a) {
517 if (this.min == -2147483648) {
518 this.min = this.constrain (this.calculateMinimumSize (a));
519 }return this.min;
520 }, "~N");
521 Clazz.defineMethod (c$, "getPreferredSize", 
522 function (a) {
523 if (this.pref == -2147483648) {
524 this.pref = this.constrain (this.calculatePreferredSize (a));
525 }return this.pref;
526 }, "~N");
527 Clazz.defineMethod (c$, "getMaximumSize", 
528 function (a) {
529 if (this.max == -2147483648) {
530 this.max = this.constrain (this.calculateMaximumSize (a));
531 }return this.max;
532 }, "~N");
533 Clazz.defineMethod (c$, "setSize", 
534 function (a, b, c) {
535 this.size = c;
536 if (c == -2147483648) {
537 this.unset ();
538 }}, "~N,~N,~N");
539 Clazz.defineMethod (c$, "unset", 
540 function () {
541 this.size = this.min = this.pref = this.max = -2147483648;
542 });
543 Clazz.defineMethod (c$, "getSize", 
544 function () {
545 return this.size;
546 });
547 Clazz.defineMethod (c$, "constrain", 
548 function (a) {
549 return Math.min (a, 32767);
550 }, "~N");
551 Clazz.defineMethod (c$, "getBaseline", 
552 function () {
553 return -1;
554 });
555 Clazz.defineMethod (c$, "getBaselineResizeBehavior", 
556 function () {
557 return java.awt.Component.BaselineResizeBehavior.OTHER;
558 });
559 Clazz.defineMethod (c$, "isResizable", 
560 function (a) {
561 var b = this.getMinimumSize (a);
562 var c = this.getPreferredSize (a);
563 return (b != c || c != this.getMaximumSize (a));
564 }, "~N");
565 c$ = Clazz.p0p ();
566 };
567 c$.$GroupLayout$Group$ = function () {
568 Clazz.pu$h(self.c$);
569 c$ = Clazz.decorateAsClass (function () {
570 Clazz.prepareCallback (this, arguments);
571 this.springs = null;
572 Clazz.instantialize (this, arguments);
573 }, javax.swing.GroupLayout, "Group", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
574 Clazz.makeConstructor (c$, 
575 function () {
576 Clazz.superConstructor (this, javax.swing.GroupLayout.Group, []);
577 this.springs =  new java.util.ArrayList ();
578 });
579 Clazz.defineMethod (c$, "addGroup", 
580 function (a) {
581 return this.addSpring (a);
582 }, "javax.swing.GroupLayout.Group");
583 Clazz.defineMethod (c$, "addComponent", 
584 function (a) {
585 return this.addComponent (a, -1, -1, -1);
586 }, "java.awt.Component");
587 Clazz.defineMethod (c$, "addComponent", 
588 function (a, b, c, d) {
589 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.ComponentSpring, this, null, a, b, c, d));
590 }, "java.awt.Component,~N,~N,~N");
591 Clazz.defineMethod (c$, "addGap", 
592 function (a) {
593 return this.addGap (a, a, a);
594 }, "~N");
595 Clazz.defineMethod (c$, "addGap", 
596 function (a, b, c) {
597 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.GapSpring, this, null, a, b, c));
598 }, "~N,~N,~N");
599 Clazz.defineMethod (c$, "getSpring", 
600 function (a) {
601 return this.springs.get (a);
602 }, "~N");
603 Clazz.defineMethod (c$, "indexOf", 
604 function (a) {
605 return this.springs.indexOf (a);
606 }, "javax.swing.GroupLayout.Spring");
607 Clazz.defineMethod (c$, "addSpring", 
608 function (a) {
609 this.springs.add (a);
610 a.setParent (this);
611 if (!(Clazz.instanceOf (a, javax.swing.GroupLayout.AutoPreferredGapSpring)) || !(a).getUserCreated ()) {
612 this.b$["javax.swing.GroupLayout"].springsChanged = true;
613 }return this;
614 }, "javax.swing.GroupLayout.Spring");
615 Clazz.defineMethod (c$, "setSize", 
616 function (a, b, c) {
617 Clazz.superCall (this, javax.swing.GroupLayout.Group, "setSize", [a, b, c]);
618 if (c == -2147483648) {
619 for (var d = this.springs.size () - 1; d >= 0; d--) {
620 this.getSpring (d).setSize (a, b, c);
621 }
622 } else {
623 this.setValidSize (a, b, c);
624 }}, "~N,~N,~N");
625 Clazz.overrideMethod (c$, "calculateMinimumSize", 
626 function (a) {
627 return this.calculateSize (a, 0);
628 }, "~N");
629 Clazz.overrideMethod (c$, "calculatePreferredSize", 
630 function (a) {
631 return this.calculateSize (a, 1);
632 }, "~N");
633 Clazz.overrideMethod (c$, "calculateMaximumSize", 
634 function (a) {
635 return this.calculateSize (a, 2);
636 }, "~N");
637 Clazz.defineMethod (c$, "calculateSize", 
638 function (a, b) {
639 var c = this.springs.size ();
640 if (c == 0) {
641 return 0;
642 }if (c == 1) {
643 return this.getSpringSize (this.getSpring (0), a, b);
644 }var d = this.constrain (this.operator (this.getSpringSize (this.getSpring (0), a, b), this.getSpringSize (this.getSpring (1), a, b)));
645 for (var e = 2; e < c; e++) {
646 d = this.constrain (this.operator (d, this.getSpringSize (this.getSpring (e), a, b)));
647 }
648 return d;
649 }, "~N,~N");
650 Clazz.defineMethod (c$, "getSpringSize", 
651 function (a, b, c) {
652 switch (c) {
653 case 0:
654 return a.getMinimumSize (b);
655 case 1:
656 return a.getPreferredSize (b);
657 case 2:
658 return a.getMaximumSize (b);
659 }
660 return 0;
661 }, "javax.swing.GroupLayout.Spring,~N,~N");
662 Clazz.defineMethod (c$, "removeAutopadding", 
663 function () {
664 this.unset ();
665 for (var a = this.springs.size () - 1; a >= 0; a--) {
666 var b = this.springs.get (a);
667 if (Clazz.instanceOf (b, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
668 if ((b).getUserCreated ()) {
669 (b).reset ();
670 } else {
671 this.springs.remove (a);
672 }} else if (Clazz.instanceOf (b, javax.swing.GroupLayout.Group)) {
673 (b).removeAutopadding ();
674 }}
675 });
676 Clazz.defineMethod (c$, "unsetAutopadding", 
677 function () {
678 this.unset ();
679 for (var a = this.springs.size () - 1; a >= 0; a--) {
680 var b = this.springs.get (a);
681 if (Clazz.instanceOf (b, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
682 (b).unset ();
683 } else if (Clazz.instanceOf (b, javax.swing.GroupLayout.Group)) {
684 (b).unsetAutopadding ();
685 }}
686 });
687 Clazz.defineMethod (c$, "calculateAutopadding", 
688 function (a) {
689 for (var b = this.springs.size () - 1; b >= 0; b--) {
690 var c = this.springs.get (b);
691 if (Clazz.instanceOf (c, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
692 c.unset ();
693 (c).calculatePadding (a);
694 } else if (Clazz.instanceOf (c, javax.swing.GroupLayout.Group)) {
695 (c).calculateAutopadding (a);
696 }}
697 this.unset ();
698 }, "~N");
699 Clazz.defineMethod (c$, "willHaveZeroSize", 
700 function (a) {
701 for (var b = this.springs.size () - 1; b >= 0; b--) {
702 var c = this.springs.get (b);
703 if (!c.willHaveZeroSize (a)) {
704 return false;
705 }}
706 return true;
707 }, "~B");
708 c$ = Clazz.p0p ();
709 };
710 c$.$GroupLayout$SequentialGroup$ = function () {
711 Clazz.pu$h(self.c$);
712 c$ = Clazz.decorateAsClass (function () {
713 Clazz.prepareCallback (this, arguments);
714 this.baselineSpring = null;
715 Clazz.instantialize (this, arguments);
716 }, javax.swing.GroupLayout, "SequentialGroup", javax.swing.GroupLayout.Group, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Group, this, null, Clazz.inheritArgs));
717 Clazz.makeConstructor (c$, 
718 function () {
719 Clazz.superConstructor (this, javax.swing.GroupLayout.SequentialGroup, []);
720 });
721 Clazz.defineMethod (c$, "addGroup", 
722 function (a) {
723 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGroup", [a]);
724 }, "javax.swing.GroupLayout.Group");
725 Clazz.defineMethod (c$, "addGroup", 
726 function (a, b) {
727 Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGroup", [b]);
728 if (a) {
729 this.baselineSpring = b;
730 }return this;
731 }, "~B,javax.swing.GroupLayout.Group");
732 Clazz.defineMethod (c$, "addComponent", 
733 function (a) {
734 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [a]);
735 }, "java.awt.Component");
736 Clazz.defineMethod (c$, "addComponent", 
737 function (a, b) {
738 Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [b]);
739 if (a) {
740 this.baselineSpring = this.springs.get (this.springs.size () - 1);
741 }return this;
742 }, "~B,java.awt.Component");
743 Clazz.defineMethod (c$, "addComponent", 
744 function (a, b, c, d) {
745 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [a, b, c, d]);
746 }, "java.awt.Component,~N,~N,~N");
747 Clazz.defineMethod (c$, "addComponent", 
748 function (a, b, c, d, e) {
749 Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [b, c, d, e]);
750 if (a) {
751 this.baselineSpring = this.springs.get (this.springs.size () - 1);
752 }return this;
753 }, "~B,java.awt.Component,~N,~N,~N");
754 Clazz.defineMethod (c$, "addGap", 
755 function (a) {
756 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGap", [a]);
757 }, "~N");
758 Clazz.defineMethod (c$, "addGap", 
759 function (a, b, c) {
760 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGap", [a, b, c]);
761 }, "~N,~N,~N");
762 Clazz.defineMethod (c$, "addPreferredGap", 
763 function (a, b, c) {
764 return this.addPreferredGap (a, b, c, -1, -2);
765 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement");
766 Clazz.defineMethod (c$, "addPreferredGap", 
767 function (a, b, c, d, e) {
768 if (c == null) {
769 throw  new IllegalArgumentException ("Type must be non-null");
770 }if (a == null || b == null) {
771 throw  new IllegalArgumentException ("Components must be non-null");
772 }this.checkPreferredGapValues (d, e);
773 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.PreferredGapSpring, this, null, a, b, c, d, e));
774 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,~N");
775 Clazz.defineMethod (c$, "addPreferredGap", 
776 function (a) {
777 return this.addPreferredGap (a, -1, -1);
778 }, "javax.swing.LayoutStyle.ComponentPlacement");
779 Clazz.defineMethod (c$, "addPreferredGap", 
780 function (a, b, c) {
781 if (a !== javax.swing.LayoutStyle.ComponentPlacement.RELATED && a !== javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) {
782 throw  new IllegalArgumentException ("Type must be one of LayoutStyle.ComponentPlacement.RELATED or LayoutStyle.ComponentPlacement.UNRELATED");
783 }this.checkPreferredGapValues (b, c);
784 this.b$["javax.swing.GroupLayout"].hasPreferredPaddingSprings = true;
785 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.AutoPreferredGapSpring, this, null, a, b, c));
786 }, "javax.swing.LayoutStyle.ComponentPlacement,~N,~N");
787 Clazz.defineMethod (c$, "addContainerGap", 
788 function () {
789 return this.addContainerGap (-1, -1);
790 });
791 Clazz.defineMethod (c$, "addContainerGap", 
792 function (a, b) {
793 if ((a < 0 && a != -1) || (b < 0 && b != -1 && b != -2) || (a >= 0 && b >= 0 && a > b)) {
794 throw  new IllegalArgumentException ("Pref and max must be either DEFAULT_VALUE or >= 0 and pref <= max");
795 }this.b$["javax.swing.GroupLayout"].hasPreferredPaddingSprings = true;
796 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, this, null, a, b));
797 }, "~N,~N");
798 Clazz.overrideMethod (c$, "operator", 
799 function (a, b) {
800 return this.constrain (a) + this.constrain (b);
801 }, "~N,~N");
802 Clazz.overrideMethod (c$, "setValidSize", 
803 function (a, b, c) {
804 var d = this.getPreferredSize (a);
805 if (c == d) {
806 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
807 var e = spring.getPreferredSize (a);
808 spring.setSize (a, b, e);
809 b += e;
810 }
811 } else if (this.springs.size () == 1) {
812 var e = this.getSpring (0);
813 e.setSize (a, b, Math.min (Math.max (c, e.getMinimumSize (a)), e.getMaximumSize (a)));
814 } else if (this.springs.size () > 1) {
815 this.setValidSizeNotPreferred (a, b, c);
816 }}, "~N,~N,~N");
817 Clazz.defineMethod (c$, "setValidSizeNotPreferred", 
818  function (a, b, c) {
819 var d = c - this.getPreferredSize (a);
820 var e = (d < 0);
821 var f = this.springs.size ();
822 if (e) {
823 d *= -1;
824 }var g = this.buildResizableList (a, e);
825 var h = g.size ();
826 if (h > 0) {
827 var i = Clazz.doubleToInt (d / h);
828 var j = d - i * h;
829 var k =  Clazz.newIntArray (f, 0);
830 var l = e ? -1 : 1;
831 for (var m = 0; m < h; m++) {
832 var n = g.get (m);
833 if ((m + 1) == h) {
834 i += j;
835 }n.delta = Math.min (i, n.delta);
836 d -= n.delta;
837 if (n.delta != i && m + 1 < h) {
838 i = Clazz.doubleToInt (d / (h - m - 1));
839 j = d - i * (h - m - 1);
840 }k[n.index] = l * n.delta;
841 }
842 for (var n = 0; n < f; n++) {
843 var o = this.getSpring (n);
844 var p = o.getPreferredSize (a) + k[n];
845 o.setSize (a, b, p);
846 b += p;
847 }
848 } else {
849 for (var i = 0; i < f; i++) {
850 var j = this.getSpring (i);
851 var k;
852 if (e) {
853 k = j.getMinimumSize (a);
854 } else {
855 k = j.getMaximumSize (a);
856 }j.setSize (a, b, k);
857 b += k;
858 }
859 }}, "~N,~N,~N");
860 Clazz.defineMethod (c$, "buildResizableList", 
861  function (a, b) {
862 var c = this.springs.size ();
863 var d =  new java.util.ArrayList (c);
864 for (var e = 0; e < c; e++) {
865 var f = this.getSpring (e);
866 var g;
867 if (b) {
868 g = f.getPreferredSize (a) - f.getMinimumSize (a);
869 } else {
870 g = f.getMaximumSize (a) - f.getPreferredSize (a);
871 }if (g > 0) {
872 d.add ( new javax.swing.GroupLayout.SpringDelta (e, g));
873 }}
874 java.util.Collections.sort (d);
875 return d;
876 }, "~N,~B");
877 Clazz.defineMethod (c$, "indexOfNextNonZeroSpring", 
878  function (a, b) {
879 while (a < this.springs.size ()) {
880 var c = this.springs.get (a);
881 if (!c.willHaveZeroSize (b)) {
882 return a;
883 }a++;
884 }
885 return a;
886 }, "~N,~B");
887 Clazz.defineMethod (c$, "insertAutopadding", 
888 function (a, b, c, d, e, f) {
889 var g =  new java.util.ArrayList (b);
890 var h =  new java.util.ArrayList (1);
891 var i =  new java.util.ArrayList (d);
892 var j = null;
893 var k = 0;
894 while (k < this.springs.size ()) {
895 var l = this.getSpring (k);
896 if (Clazz.instanceOf (l, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
897 if (g.size () == 0) {
898 var m = l;
899 m.setSources (i);
900 i.clear ();
901 k = this.indexOfNextNonZeroSpring (k + 1, true);
902 if (k == this.springs.size ()) {
903 if (!(Clazz.instanceOf (m, javax.swing.GroupLayout.ContainerAutoPreferredGapSpring))) {
904 c.add (m);
905 }} else {
906 g.clear ();
907 g.add (m);
908 }} else {
909 k = this.indexOfNextNonZeroSpring (k + 1, true);
910 }} else {
911 if (i.size () > 0 && f) {
912 var m = Clazz.innerTypeInstance (javax.swing.GroupLayout.AutoPreferredGapSpring, this, null);
913 this.springs.add (k, m);
914 continue;
915 }if (Clazz.instanceOf (l, javax.swing.GroupLayout.ComponentSpring)) {
916 var m = l;
917 if (!m.isVisible ()) {
918 k++;
919 continue;
920 }for (var gapSpring, $gapSpring = g.iterator (); $gapSpring.hasNext () && ((gapSpring = $gapSpring.next ()) || true);) {
921 gapSpring.addTarget (m, a);
922 }
923 i.clear ();
924 g.clear ();
925 k = this.indexOfNextNonZeroSpring (k + 1, false);
926 if (k == this.springs.size ()) {
927 e.add (m);
928 } else {
929 i.add (m);
930 }} else if (Clazz.instanceOf (l, javax.swing.GroupLayout.Group)) {
931 if (j == null) {
932 j =  new java.util.ArrayList (1);
933 } else {
934 j.clear ();
935 }h.clear ();
936 (l).insertAutopadding (a, g, h, i, j, f);
937 i.clear ();
938 g.clear ();
939 k = this.indexOfNextNonZeroSpring (k + 1, (j.size () == 0));
940 if (k == this.springs.size ()) {
941 e.addAll (j);
942 c.addAll (h);
943 } else {
944 i.addAll (j);
945 g.addAll (h);
946 }} else {
947 g.clear ();
948 i.clear ();
949 k++;
950 }}}
951 }, "~N,java.util.List,java.util.List,java.util.List,java.util.List,~B");
952 Clazz.defineMethod (c$, "getBaseline", 
953 function () {
954 if (this.baselineSpring != null) {
955 var a = this.baselineSpring.getBaseline ();
956 if (a >= 0) {
957 var b = 0;
958 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
959 if (spring === this.baselineSpring) {
960 return b + a;
961 } else {
962 b += spring.getPreferredSize (1);
963 }}
964 }}return -1;
965 });
966 Clazz.defineMethod (c$, "getBaselineResizeBehavior", 
967 function () {
968 if (this.isResizable (1)) {
969 if (!this.baselineSpring.isResizable (1)) {
970 var a = false;
971 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
972 if (spring === this.baselineSpring) {
973 break;
974 } else if (spring.isResizable (1)) {
975 a = true;
976 break;
977 }}
978 var b = false;
979 for (var c = this.springs.size () - 1; c >= 0; c--) {
980 var d = this.springs.get (c);
981 if (d === this.baselineSpring) {
982 break;
983 }if (d.isResizable (1)) {
984 b = true;
985 break;
986 }}
987 if (a && !b) {
988 return java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT;
989 } else if (!a && b) {
990 return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
991 }} else {
992 var a = this.baselineSpring.getBaselineResizeBehavior ();
993 if (a === java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT) {
994 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
995 if (spring === this.baselineSpring) {
996 return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
997 }if (spring.isResizable (1)) {
998 return java.awt.Component.BaselineResizeBehavior.OTHER;
999 }}
1000 } else if (a === java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT) {
1001 for (var b = this.springs.size () - 1; b >= 0; b--) {
1002 var c = this.springs.get (b);
1003 if (c === this.baselineSpring) {
1004 return java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT;
1005 }if (c.isResizable (1)) {
1006 return java.awt.Component.BaselineResizeBehavior.OTHER;
1007 }}
1008 }}return java.awt.Component.BaselineResizeBehavior.OTHER;
1009 }return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
1010 });
1011 Clazz.defineMethod (c$, "checkPreferredGapValues", 
1012  function (a, b) {
1013 if ((a < 0 && a != -1 && a != -2) || (b < 0 && b != -1 && b != -2) || (a >= 0 && b >= 0 && a > b)) {
1014 throw  new IllegalArgumentException ("Pref and max must be either DEFAULT_SIZE, PREFERRED_SIZE, or >= 0 and pref <= max");
1015 }}, "~N,~N");
1016 c$ = Clazz.p0p ();
1017 };
1018 c$.$GroupLayout$ParallelGroup$ = function () {
1019 Clazz.pu$h(self.c$);
1020 c$ = Clazz.decorateAsClass (function () {
1021 Clazz.prepareCallback (this, arguments);
1022 this.childAlignment = null;
1023 this.resizable = false;
1024 Clazz.instantialize (this, arguments);
1025 }, javax.swing.GroupLayout, "ParallelGroup", javax.swing.GroupLayout.Group, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Group, this, null, Clazz.inheritArgs));
1026 Clazz.makeConstructor (c$, 
1027 function (a, b) {
1028 Clazz.superConstructor (this, javax.swing.GroupLayout.ParallelGroup, []);
1029 this.childAlignment = a;
1030 this.resizable = b;
1031 }, "javax.swing.GroupLayout.Alignment,~B");
1032 Clazz.defineMethod (c$, "addGroup", 
1033 function (a) {
1034 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addGroup", [a]);
1035 }, "javax.swing.GroupLayout.Group");
1036 Clazz.defineMethod (c$, "addComponent", 
1037 function (a) {
1038 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addComponent", [a]);
1039 }, "java.awt.Component");
1040 Clazz.defineMethod (c$, "addComponent", 
1041 function (a, b, c, d) {
1042 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addComponent", [a, b, c, d]);
1043 }, "java.awt.Component,~N,~N,~N");
1044 Clazz.defineMethod (c$, "addGap", 
1045 function (a) {
1046 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addGap", [a]);
1047 }, "~N");
1048 Clazz.defineMethod (c$, "addGap", 
1049 function (a, b, c) {
1050 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addGap", [a, b, c]);
1051 }, "~N,~N,~N");
1052 Clazz.defineMethod (c$, "addGroup", 
1053 function (a, b) {
1054 this.checkChildAlignment (a);
1055 b.setAlignment (a);
1056 return this.addSpring (b);
1057 }, "javax.swing.GroupLayout.Alignment,javax.swing.GroupLayout.Group");
1058 Clazz.defineMethod (c$, "addComponent", 
1059 function (a, b) {
1060 return this.addComponent (a, b, -1, -1, -1);
1061 }, "java.awt.Component,javax.swing.GroupLayout.Alignment");
1062 Clazz.defineMethod (c$, "addComponent", 
1063 function (a, b, c, d, e) {
1064 this.checkChildAlignment (b);
1065 var f = Clazz.innerTypeInstance (javax.swing.GroupLayout.ComponentSpring, this, null, a, c, d, e);
1066 f.setAlignment (b);
1067 return this.addSpring (f);
1068 }, "java.awt.Component,javax.swing.GroupLayout.Alignment,~N,~N,~N");
1069 Clazz.defineMethod (c$, "isResizable", 
1070 function () {
1071 return this.resizable;
1072 });
1073 Clazz.overrideMethod (c$, "operator", 
1074 function (a, b) {
1075 return Math.max (a, b);
1076 }, "~N,~N");
1077 Clazz.defineMethod (c$, "calculateMinimumSize", 
1078 function (a) {
1079 if (!this.isResizable ()) {
1080 return this.getPreferredSize (a);
1081 }return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "calculateMinimumSize", [a]);
1082 }, "~N");
1083 Clazz.defineMethod (c$, "calculateMaximumSize", 
1084 function (a) {
1085 if (!this.isResizable ()) {
1086 return this.getPreferredSize (a);
1087 }return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "calculateMaximumSize", [a]);
1088 }, "~N");
1089 Clazz.overrideMethod (c$, "setValidSize", 
1090 function (a, b, c) {
1091 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
1092 this.setChildSize (spring, a, b, c);
1093 }
1094 }, "~N,~N,~N");
1095 Clazz.defineMethod (c$, "setChildSize", 
1096 function (a, b, c, d) {
1097 var e = a.getAlignment ();
1098 var f = Math.min (Math.max (a.getMinimumSize (b), d), a.getMaximumSize (b));
1099 if (e == null) {
1100 e = this.childAlignment;
1101 }switch (e) {
1102 case javax.swing.GroupLayout.Alignment.TRAILING:
1103 a.setSize (b, c + d - f, f);
1104 break;
1105 case javax.swing.GroupLayout.Alignment.CENTER:
1106 a.setSize (b, c + Clazz.doubleToInt ((d - f) / 2), f);
1107 break;
1108 default:
1109 a.setSize (b, c, f);
1110 break;
1111 }
1112 }, "javax.swing.GroupLayout.Spring,~N,~N,~N");
1113 Clazz.defineMethod (c$, "insertAutopadding", 
1114 function (a, b, c, d, e, f) {
1115 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
1116 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.ComponentSpring)) {
1117 if ((spring).isVisible ()) {
1118 for (var gapSpring, $gapSpring = b.iterator (); $gapSpring.hasNext () && ((gapSpring = $gapSpring.next ()) || true);) {
1119 gapSpring.addTarget (spring, a);
1120 }
1121 e.add (spring);
1122 }} else if (Clazz.instanceOf (spring, javax.swing.GroupLayout.Group)) {
1123 (spring).insertAutopadding (a, b, c, d, e, f);
1124 } else if (Clazz.instanceOf (spring, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
1125 (spring).setSources (d);
1126 c.add (spring);
1127 }}
1128 }, "~N,java.util.List,java.util.List,java.util.List,java.util.List,~B");
1129 Clazz.defineMethod (c$, "checkChildAlignment", 
1130  function (a) {
1131 this.checkChildAlignment (a, (Clazz.instanceOf (this, javax.swing.GroupLayout.BaselineGroup)));
1132 }, "javax.swing.GroupLayout.Alignment");
1133 Clazz.defineMethod (c$, "checkChildAlignment", 
1134  function (a, b) {
1135 if (a == null) {
1136 throw  new IllegalArgumentException ("Alignment must be non-null");
1137 }if (!b && a === javax.swing.GroupLayout.Alignment.BASELINE) {
1138 throw  new IllegalArgumentException ("Alignment must be one of:LEADING, TRAILING or CENTER");
1139 }}, "javax.swing.GroupLayout.Alignment,~B");
1140 c$ = Clazz.p0p ();
1141 };
1142 c$.$GroupLayout$BaselineGroup$ = function () {
1143 Clazz.pu$h(self.c$);
1144 c$ = Clazz.decorateAsClass (function () {
1145 Clazz.prepareCallback (this, arguments);
1146 this.allSpringsHaveBaseline = false;
1147 this.prefAscent = 0;
1148 this.prefDescent = 0;
1149 this.baselineAnchorSet = false;
1150 this.baselineAnchoredToTop = false;
1151 this.calcedBaseline = false;
1152 Clazz.instantialize (this, arguments);
1153 }, javax.swing.GroupLayout, "BaselineGroup", javax.swing.GroupLayout.ParallelGroup, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.ParallelGroup, this, null, Clazz.inheritArgs));
1154 Clazz.makeConstructor (c$, 
1155 function (a) {
1156 Clazz.superConstructor (this, javax.swing.GroupLayout.BaselineGroup, [javax.swing.GroupLayout.Alignment.LEADING, a]);
1157 this.prefAscent = this.prefDescent = -1;
1158 this.calcedBaseline = false;
1159 }, "~B");
1160 Clazz.makeConstructor (c$, 
1161 function (a, b) {
1162 this.construct (a);
1163 this.baselineAnchoredToTop = b;
1164 this.baselineAnchorSet = true;
1165 }, "~B,~B");
1166 Clazz.defineMethod (c$, "unset", 
1167 function () {
1168 Clazz.superCall (this, javax.swing.GroupLayout.BaselineGroup, "unset", []);
1169 this.prefAscent = this.prefDescent = -1;
1170 this.calcedBaseline = false;
1171 });
1172 Clazz.defineMethod (c$, "setValidSize", 
1173 function (a, b, c) {
1174 this.checkAxis (a);
1175 if (this.prefAscent == -1) {
1176 Clazz.superCall (this, javax.swing.GroupLayout.BaselineGroup, "setValidSize", [a, b, c]);
1177 } else {
1178 this.baselineLayout (b, c);
1179 }}, "~N,~N,~N");
1180 Clazz.defineMethod (c$, "calculateSize", 
1181 function (a, b) {
1182 this.checkAxis (a);
1183 if (!this.calcedBaseline) {
1184 this.calculateBaselineAndResizeBehavior ();
1185 }if (b == 0) {
1186 return this.calculateMinSize ();
1187 }if (b == 2) {
1188 return this.calculateMaxSize ();
1189 }if (this.allSpringsHaveBaseline) {
1190 return this.prefAscent + this.prefDescent;
1191 }return Math.max (this.prefAscent + this.prefDescent, Clazz.superCall (this, javax.swing.GroupLayout.BaselineGroup, "calculateSize", [a, b]));
1192 }, "~N,~N");
1193 Clazz.defineMethod (c$, "calculateBaselineAndResizeBehavior", 
1194  function () {
1195 this.prefAscent = 0;
1196 this.prefDescent = 0;
1197 var a = 0;
1198 var b = null;
1199 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
1200 if (spring.getAlignment () == null || spring.getAlignment () === javax.swing.GroupLayout.Alignment.BASELINE) {
1201 var c = spring.getBaseline ();
1202 if (c >= 0) {
1203 if (spring.isResizable (1)) {
1204 var d = spring.getBaselineResizeBehavior ();
1205 if (b == null) {
1206 b = d;
1207 } else if (d !== b) {
1208 b = java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
1209 }}this.prefAscent = Math.max (this.prefAscent, c);
1210 this.prefDescent = Math.max (this.prefDescent, spring.getPreferredSize (1) - c);
1211 a++;
1212 }}}
1213 if (!this.baselineAnchorSet) {
1214 if (b === java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT) {
1215 this.baselineAnchoredToTop = false;
1216 } else {
1217 this.baselineAnchoredToTop = true;
1218 }}this.allSpringsHaveBaseline = (a == this.springs.size ());
1219 this.calcedBaseline = true;
1220 });
1221 Clazz.defineMethod (c$, "calculateMaxSize", 
1222  function () {
1223 var a = this.prefAscent;
1224 var b = this.prefDescent;
1225 var c = 0;
1226 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
1227 var d;
1228 var e = spring.getMaximumSize (1);
1229 if ((spring.getAlignment () == null || spring.getAlignment () === javax.swing.GroupLayout.Alignment.BASELINE) && (d = spring.getBaseline ()) >= 0) {
1230 var f = spring.getPreferredSize (1);
1231 if (f != e) {
1232 switch (spring.getBaselineResizeBehavior ()) {
1233 case java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT:
1234 if (this.baselineAnchoredToTop) {
1235 b = Math.max (b, e - d);
1236 }break;
1237 case java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT:
1238 if (!this.baselineAnchoredToTop) {
1239 a = Math.max (a, e - f + d);
1240 }break;
1241 default:
1242 break;
1243 }
1244 }} else {
1245 c = Math.max (c, e);
1246 }}
1247 return Math.max (c, a + b);
1248 });
1249 Clazz.defineMethod (c$, "calculateMinSize", 
1250  function () {
1251 var a = 0;
1252 var b = 0;
1253 var c = 0;
1254 if (this.baselineAnchoredToTop) {
1255 a = this.prefAscent;
1256 } else {
1257 b = this.prefDescent;
1258 }for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
1259 var d = spring.getMinimumSize (1);
1260 var e;
1261 if ((spring.getAlignment () == null || spring.getAlignment () === javax.swing.GroupLayout.Alignment.BASELINE) && (e = spring.getBaseline ()) >= 0) {
1262 var f = spring.getPreferredSize (1);
1263 var g = spring.getBaselineResizeBehavior ();
1264 switch (g) {
1265 case java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT:
1266 if (this.baselineAnchoredToTop) {
1267 b = Math.max (d - e, b);
1268 } else {
1269 a = Math.max (e, a);
1270 }break;
1271 case java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT:
1272 if (!this.baselineAnchoredToTop) {
1273 a = Math.max (e - (f - d), a);
1274 } else {
1275 b = Math.max (f - e, b);
1276 }break;
1277 default:
1278 a = Math.max (e, a);
1279 b = Math.max (f - e, b);
1280 break;
1281 }
1282 } else {
1283 c = Math.max (c, d);
1284 }}
1285 return Math.max (c, a + b);
1286 });
1287 Clazz.defineMethod (c$, "baselineLayout", 
1288  function (a, b) {
1289 var c;
1290 var d;
1291 if (this.baselineAnchoredToTop) {
1292 c = this.prefAscent;
1293 d = b - c;
1294 } else {
1295 c = b - this.prefDescent;
1296 d = this.prefDescent;
1297 }for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
1298 var e = spring.getAlignment ();
1299 if (e == null || e === javax.swing.GroupLayout.Alignment.BASELINE) {
1300 var f = spring.getBaseline ();
1301 if (f >= 0) {
1302 var g = spring.getMaximumSize (1);
1303 var h = spring.getPreferredSize (1);
1304 var i = h;
1305 var j;
1306 switch (spring.getBaselineResizeBehavior ()) {
1307 case java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT:
1308 j = a + c - f;
1309 i = Math.min (d, g - f) + f;
1310 break;
1311 case java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT:
1312 i = Math.min (c, g - h + f) + (h - f);
1313 j = a + c + (h - f) - i;
1314 break;
1315 default:
1316 j = a + c - f;
1317 break;
1318 }
1319 spring.setSize (1, j, i);
1320 } else {
1321 this.setChildSize (spring, 1, a, b);
1322 }} else {
1323 this.setChildSize (spring, 1, a, b);
1324 }}
1325 }, "~N,~N");
1326 Clazz.defineMethod (c$, "getBaseline", 
1327 function () {
1328 if (this.springs.size () > 1) {
1329 this.getPreferredSize (1);
1330 return this.prefAscent;
1331 } else if (this.springs.size () == 1) {
1332 return this.springs.get (0).getBaseline ();
1333 }return -1;
1334 });
1335 Clazz.defineMethod (c$, "getBaselineResizeBehavior", 
1336 function () {
1337 if (this.springs.size () == 1) {
1338 return this.springs.get (0).getBaselineResizeBehavior ();
1339 }if (this.baselineAnchoredToTop) {
1340 return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
1341 }return java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT;
1342 });
1343 Clazz.defineMethod (c$, "checkAxis", 
1344  function (a) {
1345 if (a == 0) {
1346 throw  new IllegalStateException ("Baseline must be used along vertical axis");
1347 }}, "~N");
1348 c$ = Clazz.p0p ();
1349 };
1350 c$.$GroupLayout$ComponentSpring$ = function () {
1351 Clazz.pu$h(self.c$);
1352 c$ = Clazz.decorateAsClass (function () {
1353 Clazz.prepareCallback (this, arguments);
1354 this.component = null;
1355 this.origin = 0;
1356 this.$min = 0;
1357 this.$pref = 0;
1358 this.$max = 0;
1359 this.baseline = -1;
1360 this.installed = false;
1361 Clazz.instantialize (this, arguments);
1362 }, javax.swing.GroupLayout, "ComponentSpring", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
1363 Clazz.makeConstructor (c$, 
1364  function (a, b, c, d) {
1365 Clazz.superConstructor (this, javax.swing.GroupLayout.ComponentSpring, []);
1366 this.component = a;
1367 if (a == null) {
1368 throw  new IllegalArgumentException ("Component must be non-null");
1369 }javax.swing.GroupLayout.checkSize (b, c, d, true);
1370 this.$min = b;
1371 this.$max = d;
1372 this.$pref = c;
1373 this.b$["javax.swing.GroupLayout"].getComponentInfo (a);
1374 }, "java.awt.Component,~N,~N,~N");
1375 Clazz.overrideMethod (c$, "calculateMinimumSize", 
1376 function (a) {
1377 if (this.isLinked (a)) {
1378 return this.getLinkSize (a, 0);
1379 }return this.calculateNonlinkedMinimumSize (a);
1380 }, "~N");
1381 Clazz.overrideMethod (c$, "calculatePreferredSize", 
1382 function (a) {
1383 if (this.isLinked (a)) {
1384 return this.getLinkSize (a, 1);
1385 }var b = this.getMinimumSize (a);
1386 var c = this.calculateNonlinkedPreferredSize (a);
1387 var d = this.getMaximumSize (a);
1388 return Math.min (d, Math.max (b, c));
1389 }, "~N");
1390 Clazz.overrideMethod (c$, "calculateMaximumSize", 
1391 function (a) {
1392 if (this.isLinked (a)) {
1393 return this.getLinkSize (a, 2);
1394 }return Math.max (this.getMinimumSize (a), this.calculateNonlinkedMaximumSize (a));
1395 }, "~N");
1396 Clazz.defineMethod (c$, "isVisible", 
1397 function () {
1398 return this.b$["javax.swing.GroupLayout"].getComponentInfo (this.getComponent ()).isVisible ();
1399 });
1400 Clazz.defineMethod (c$, "calculateNonlinkedMinimumSize", 
1401 function (a) {
1402 if (!this.isVisible ()) {
1403 return 0;
1404 }if (this.$min >= 0) {
1405 return this.$min;
1406 }if (this.$min == -2) {
1407 return this.calculateNonlinkedPreferredSize (a);
1408 }return this.getSizeAlongAxis (a, this.component.getMinimumSize ());
1409 }, "~N");
1410 Clazz.defineMethod (c$, "calculateNonlinkedPreferredSize", 
1411 function (a) {
1412 if (!this.isVisible ()) {
1413 return 0;
1414 }if (this.$pref >= 0) {
1415 return this.$pref;
1416 }return this.getSizeAlongAxis (a, this.component.getPreferredSize ());
1417 }, "~N");
1418 Clazz.defineMethod (c$, "calculateNonlinkedMaximumSize", 
1419 function (a) {
1420 if (!this.isVisible ()) {
1421 return 0;
1422 }if (this.$max >= 0) {
1423 return this.$max;
1424 }if (this.$max == -2) {
1425 return this.calculateNonlinkedPreferredSize (a);
1426 }return this.getSizeAlongAxis (a, this.component.getMaximumSize ());
1427 }, "~N");
1428 Clazz.defineMethod (c$, "getSizeAlongAxis", 
1429  function (a, b) {
1430 return (a == 0) ? b.width : b.height;
1431 }, "~N,java.awt.Dimension");
1432 Clazz.defineMethod (c$, "getLinkSize", 
1433  function (a, b) {
1434 if (!this.isVisible ()) {
1435 return 0;
1436 }var c = this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component);
1437 return c.getLinkSize (a, b);
1438 }, "~N,~N");
1439 Clazz.defineMethod (c$, "setSize", 
1440 function (a, b, c) {
1441 Clazz.superCall (this, javax.swing.GroupLayout.ComponentSpring, "setSize", [a, b, c]);
1442 this.origin = b;
1443 if (c == -2147483648) {
1444 this.baseline = -1;
1445 }}, "~N,~N,~N");
1446 Clazz.defineMethod (c$, "getOrigin", 
1447 function () {
1448 return this.origin;
1449 });
1450 Clazz.defineMethod (c$, "setComponent", 
1451 function (a) {
1452 this.component = a;
1453 }, "java.awt.Component");
1454 Clazz.defineMethod (c$, "getComponent", 
1455 function () {
1456 return this.component;
1457 });
1458 Clazz.overrideMethod (c$, "getBaseline", 
1459 function () {
1460 if (this.baseline == -1) {
1461 var a = this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).horizontalSpring;
1462 var b = a.getPreferredSize (0);
1463 var c = this.getPreferredSize (1);
1464 if (b > 0 && c > 0) {
1465 this.baseline = this.component.getBaseline (b, c);
1466 }}return this.baseline;
1467 });
1468 Clazz.overrideMethod (c$, "getBaselineResizeBehavior", 
1469 function () {
1470 return this.getComponent ().getBaselineResizeBehavior ();
1471 });
1472 Clazz.defineMethod (c$, "isLinked", 
1473  function (a) {
1474 return this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).isLinked (a);
1475 }, "~N");
1476 Clazz.defineMethod (c$, "installIfNecessary", 
1477 function (a) {
1478 if (!this.installed) {
1479 this.installed = true;
1480 if (a == 0) {
1481 this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).horizontalSpring = this;
1482 } else {
1483 this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).verticalSpring = this;
1484 }}}, "~N");
1485 Clazz.overrideMethod (c$, "willHaveZeroSize", 
1486 function (a) {
1487 return !this.isVisible ();
1488 }, "~B");
1489 c$ = Clazz.p0p ();
1490 };
1491 c$.$GroupLayout$PreferredGapSpring$ = function () {
1492 Clazz.pu$h(self.c$);
1493 c$ = Clazz.decorateAsClass (function () {
1494 Clazz.prepareCallback (this, arguments);
1495 this.source = null;
1496 this.target = null;
1497 this.type = null;
1498 this.$pref = 0;
1499 this.$max = 0;
1500 Clazz.instantialize (this, arguments);
1501 }, javax.swing.GroupLayout, "PreferredGapSpring", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
1502 Clazz.makeConstructor (c$, 
1503 function (a, b, c, d, e) {
1504 Clazz.superConstructor (this, javax.swing.GroupLayout.PreferredGapSpring, []);
1505 this.source = a;
1506 this.target = b;
1507 this.type = c;
1508 this.$pref = d;
1509 this.$max = e;
1510 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,~N");
1511 Clazz.overrideMethod (c$, "calculateMinimumSize", 
1512 function (a) {
1513 return this.getPadding (a);
1514 }, "~N");
1515 Clazz.overrideMethod (c$, "calculatePreferredSize", 
1516 function (a) {
1517 if (this.$pref == -1 || this.$pref == -2) {
1518 return this.getMinimumSize (a);
1519 }var b = this.getMinimumSize (a);
1520 var c = this.getMaximumSize (a);
1521 return Math.min (c, Math.max (b, this.$pref));
1522 }, "~N");
1523 Clazz.overrideMethod (c$, "calculateMaximumSize", 
1524 function (a) {
1525 if (this.$max == -2 || this.$max == -1) {
1526 return this.getPadding (a);
1527 }return Math.max (this.getMinimumSize (a), this.$max);
1528 }, "~N");
1529 Clazz.defineMethod (c$, "getPadding", 
1530  function (a) {
1531 var b;
1532 if (a == 0) {
1533 b = 3;
1534 } else {
1535 b = 5;
1536 }return this.b$["javax.swing.GroupLayout"].getLayoutStyle0 ().getPreferredGap (this.source, this.target, this.type, b, this.b$["javax.swing.GroupLayout"].host);
1537 }, "~N");
1538 Clazz.overrideMethod (c$, "willHaveZeroSize", 
1539 function (a) {
1540 return false;
1541 }, "~B");
1542 c$ = Clazz.p0p ();
1543 };
1544 c$.$GroupLayout$GapSpring$ = function () {
1545 Clazz.pu$h(self.c$);
1546 c$ = Clazz.decorateAsClass (function () {
1547 Clazz.prepareCallback (this, arguments);
1548 this.$min = 0;
1549 this.$pref = 0;
1550 this.$max = 0;
1551 Clazz.instantialize (this, arguments);
1552 }, javax.swing.GroupLayout, "GapSpring", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
1553 Clazz.makeConstructor (c$, 
1554 function (a, b, c) {
1555 Clazz.superConstructor (this, javax.swing.GroupLayout.GapSpring, []);
1556 javax.swing.GroupLayout.checkSize (a, b, c, false);
1557 this.$min = a;
1558 this.$pref = b;
1559 this.$max = c;
1560 }, "~N,~N,~N");
1561 Clazz.overrideMethod (c$, "calculateMinimumSize", 
1562 function (a) {
1563 if (this.$min == -2) {
1564 return this.getPreferredSize (a);
1565 }return this.$min;
1566 }, "~N");
1567 Clazz.overrideMethod (c$, "calculatePreferredSize", 
1568 function (a) {
1569 return this.$pref;
1570 }, "~N");
1571 Clazz.overrideMethod (c$, "calculateMaximumSize", 
1572 function (a) {
1573 if (this.$max == -2) {
1574 return this.getPreferredSize (a);
1575 }return this.$max;
1576 }, "~N");
1577 Clazz.overrideMethod (c$, "willHaveZeroSize", 
1578 function (a) {
1579 return false;
1580 }, "~B");
1581 c$ = Clazz.p0p ();
1582 };
1583 c$.$GroupLayout$AutoPreferredGapSpring$ = function () {
1584 Clazz.pu$h(self.c$);
1585 c$ = Clazz.decorateAsClass (function () {
1586 Clazz.prepareCallback (this, arguments);
1587 this.sources = null;
1588 this.source = null;
1589 this.matches = null;
1590 this.$size = 0;
1591 this.lastSize = 0;
1592 this.$pref = 0;
1593 this.$max = 0;
1594 this.type = null;
1595 this.userCreated = false;
1596 Clazz.instantialize (this, arguments);
1597 }, javax.swing.GroupLayout, "AutoPreferredGapSpring", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
1598 Clazz.makeConstructor (c$, 
1599  function () {
1600 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);
1601 this.$pref = -2;
1602 this.$max = -2;
1603 this.type = javax.swing.LayoutStyle.ComponentPlacement.RELATED;
1604 });
1605 Clazz.makeConstructor (c$, 
1606 function (a, b) {
1607 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);
1608 this.$pref = a;
1609 this.$max = b;
1610 }, "~N,~N");
1611 Clazz.makeConstructor (c$, 
1612 function (a, b, c) {
1613 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);
1614 this.type = a;
1615 this.$pref = b;
1616 this.$max = c;
1617 this.userCreated = true;
1618 }, "javax.swing.LayoutStyle.ComponentPlacement,~N,~N");
1619 Clazz.defineMethod (c$, "setSources", 
1620 function (a) {
1621 this.sources =  new java.util.ArrayList (a);
1622 }, "java.util.List");
1623 Clazz.defineMethod (c$, "setUserCreated", 
1624 function (a) {
1625 this.userCreated = a;
1626 }, "~B");
1627 Clazz.defineMethod (c$, "getUserCreated", 
1628 function () {
1629 return this.userCreated;
1630 });
1631 Clazz.defineMethod (c$, "unset", 
1632 function () {
1633 this.lastSize = this.getSize ();
1634 Clazz.superCall (this, javax.swing.GroupLayout.AutoPreferredGapSpring, "unset", []);
1635 this.$size = 0;
1636 });
1637 Clazz.defineMethod (c$, "reset", 
1638 function () {
1639 this.$size = 0;
1640 this.sources = null;
1641 this.source = null;
1642 this.matches = null;
1643 });
1644 Clazz.defineMethod (c$, "calculatePadding", 
1645 function (a) {
1646 this.$size = -2147483648;
1647 var b = -2147483648;
1648 if (this.matches != null) {
1649 var c = this.b$["javax.swing.GroupLayout"].getLayoutStyle0 ();
1650 var d;
1651 if (a == 0) {
1652 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {
1653 d = 3;
1654 } else {
1655 d = 7;
1656 }} else {
1657 d = 5;
1658 }for (var e = this.matches.size () - 1; e >= 0; e--) {
1659 var f = this.matches.get (e);
1660 b = Math.max (b, this.calculatePadding (c, d, f.source, f.target));
1661 }
1662 }if (this.$size == -2147483648) {
1663 this.$size = 0;
1664 }if (b == -2147483648) {
1665 b = 0;
1666 }if (this.lastSize != -2147483648) {
1667 this.$size += Math.min (b, this.lastSize);
1668 }}, "~N");
1669 Clazz.defineMethod (c$, "calculatePadding", 
1670  function (a, b, c, d) {
1671 var e = d.getOrigin () - (c.getOrigin () + c.getSize ());
1672 if (e >= 0) {
1673 var f;
1674 if ((Clazz.instanceOf (c.getComponent (), javax.swing.JComponent)) && (Clazz.instanceOf (d.getComponent (), javax.swing.JComponent))) {
1675 f = a.getPreferredGap (c.getComponent (), d.getComponent (), this.type, b, this.b$["javax.swing.GroupLayout"].host);
1676 } else {
1677 f = 10;
1678 }if (f > e) {
1679 this.$size = Math.max (this.$size, f - e);
1680 }return f;
1681 }return 0;
1682 }, "javax.swing.LayoutStyle,~N,javax.swing.GroupLayout.ComponentSpring,javax.swing.GroupLayout.ComponentSpring");
1683 Clazz.defineMethod (c$, "addTarget", 
1684 function (a, b) {
1685 var c = (b == 0) ? 1 : 0;
1686 if (this.source != null) {
1687 if (this.b$["javax.swing.GroupLayout"].areParallelSiblings (this.source.getComponent (), a.getComponent (), c)) {
1688 this.addValidTarget (this.source, a);
1689 }} else {
1690 var d = a.getComponent ();
1691 for (var e = this.sources.size () - 1; e >= 0; e--) {
1692 var f = this.sources.get (e);
1693 if (this.b$["javax.swing.GroupLayout"].areParallelSiblings (f.getComponent (), d, c)) {
1694 this.addValidTarget (f, a);
1695 }}
1696 }}, "javax.swing.GroupLayout.ComponentSpring,~N");
1697 Clazz.defineMethod (c$, "addValidTarget", 
1698  function (a, b) {
1699 if (this.matches == null) {
1700 this.matches =  new java.util.ArrayList (1);
1701 }this.matches.add ( new javax.swing.GroupLayout.AutoPreferredGapMatch (a, b));
1702 }, "javax.swing.GroupLayout.ComponentSpring,javax.swing.GroupLayout.ComponentSpring");
1703 Clazz.overrideMethod (c$, "calculateMinimumSize", 
1704 function (a) {
1705 return this.$size;
1706 }, "~N");
1707 Clazz.overrideMethod (c$, "calculatePreferredSize", 
1708 function (a) {
1709 if (this.$pref == -2 || this.$pref == -1) {
1710 return this.$size;
1711 }return Math.max (this.$size, this.$pref);
1712 }, "~N");
1713 Clazz.overrideMethod (c$, "calculateMaximumSize", 
1714 function (a) {
1715 if (this.$max >= 0) {
1716 return Math.max (this.getPreferredSize (a), this.$max);
1717 }return this.$size;
1718 }, "~N");
1719 Clazz.defineMethod (c$, "getMatchDescription", 
1720 function () {
1721 return (this.matches == null) ? "" : this.matches.toString ();
1722 });
1723 Clazz.defineMethod (c$, "toString", 
1724 function () {
1725 return Clazz.superCall (this, javax.swing.GroupLayout.AutoPreferredGapSpring, "toString", []) + this.getMatchDescription ();
1726 });
1727 Clazz.overrideMethod (c$, "willHaveZeroSize", 
1728 function (a) {
1729 return a;
1730 }, "~B");
1731 c$ = Clazz.p0p ();
1732 };
1733 c$.$GroupLayout$ContainerAutoPreferredGapSpring$ = function () {
1734 Clazz.pu$h(self.c$);
1735 c$ = Clazz.decorateAsClass (function () {
1736 Clazz.prepareCallback (this, arguments);
1737 this.targets = null;
1738 Clazz.instantialize (this, arguments);
1739 }, javax.swing.GroupLayout, "ContainerAutoPreferredGapSpring", javax.swing.GroupLayout.AutoPreferredGapSpring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.AutoPreferredGapSpring, this, null, Clazz.inheritArgs));
1740 Clazz.makeConstructor (c$, 
1741 function () {
1742 Clazz.superConstructor (this, javax.swing.GroupLayout.ContainerAutoPreferredGapSpring);
1743 this.setUserCreated (true);
1744 });
1745 Clazz.makeConstructor (c$, 
1746 function (a, b) {
1747 Clazz.superConstructor (this, javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, [a, b]);
1748 this.setUserCreated (true);
1749 }, "~N,~N");
1750 Clazz.overrideMethod (c$, "addTarget", 
1751 function (a, b) {
1752 if (this.targets == null) {
1753 this.targets =  new java.util.ArrayList (1);
1754 }this.targets.add (a);
1755 }, "javax.swing.GroupLayout.ComponentSpring,~N");
1756 Clazz.defineMethod (c$, "calculatePadding", 
1757 function (a) {
1758 var $private = Clazz.checkPrivateMethod (arguments);
1759 if ($private != null) {
1760 return $private.apply (this, arguments);
1761 }
1762 var b = this.b$["javax.swing.GroupLayout"].getLayoutStyle0 ();
1763 var c = 0;
1764 var d;
1765 this.$size = 0;
1766 if (this.targets != null) {
1767 if (a == 0) {
1768 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {
1769 d = 7;
1770 } else {
1771 d = 3;
1772 }} else {
1773 d = 5;
1774 }for (var e = this.targets.size () - 1; e >= 0; e--) {
1775 var f = this.targets.get (e);
1776 var g = 10;
1777 if (Clazz.instanceOf (f.getComponent (), javax.swing.JComponent)) {
1778 g = b.getContainerGap (f.getComponent (), d, this.b$["javax.swing.GroupLayout"].host);
1779 c = Math.max (g, c);
1780 g -= f.getOrigin ();
1781 } else {
1782 c = Math.max (g, c);
1783 }this.$size = Math.max (this.$size, g);
1784 }
1785 } else {
1786 if (a == 0) {
1787 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {
1788 d = 3;
1789 } else {
1790 d = 7;
1791 }} else {
1792 d = 5;
1793 }if (this.sources != null) {
1794 for (var e = this.sources.size () - 1; e >= 0; e--) {
1795 var f = this.sources.get (e);
1796 c = Math.max (c, this.updateSize (b, f, d));
1797 }
1798 } else if (this.source != null) {
1799 c = this.updateSize (b, this.source, d);
1800 }}if (this.lastSize != -2147483648) {
1801 this.$size += Math.min (c, this.lastSize);
1802 }}, "~N");
1803 Clazz.defineMethod (c$, "updateSize", 
1804  function (a, b, c) {
1805 var d = 10;
1806 if (Clazz.instanceOf (b.getComponent (), javax.swing.JComponent)) {
1807 d = a.getContainerGap (b.getComponent (), c, this.b$["javax.swing.GroupLayout"].host);
1808 }var e = Math.max (0, this.getParent ().getSize () - b.getSize () - b.getOrigin ());
1809 this.$size = Math.max (this.$size, d - e);
1810 return d;
1811 }, "javax.swing.LayoutStyle,javax.swing.GroupLayout.ComponentSpring,~N");
1812 Clazz.overrideMethod (c$, "getMatchDescription", 
1813 function () {
1814 if (this.targets != null) {
1815 return "leading: " + this.targets.toString ();
1816 }if (this.sources != null) {
1817 return "trailing: " + this.sources.toString ();
1818 }return "--";
1819 });
1820 c$ = Clazz.p0p ();
1821 };
1822 c$.$GroupLayout$ComponentInfo$ = function () {
1823 Clazz.pu$h(self.c$);
1824 c$ = Clazz.decorateAsClass (function () {
1825 Clazz.prepareCallback (this, arguments);
1826 this.component = null;
1827 this.horizontalSpring = null;
1828 this.verticalSpring = null;
1829 this.horizontalMaster = null;
1830 this.verticalMaster = null;
1831 this.visible = false;
1832 this.honorsVisibility = null;
1833 Clazz.instantialize (this, arguments);
1834 }, javax.swing.GroupLayout, "ComponentInfo");
1835 Clazz.makeConstructor (c$, 
1836 function (a) {
1837 this.component = a;
1838 this.updateVisibility ();
1839 }, "java.awt.Component");
1840 Clazz.defineMethod (c$, "dispose", 
1841 function () {
1842 this.removeSpring (this.horizontalSpring);
1843 this.horizontalSpring = null;
1844 this.removeSpring (this.verticalSpring);
1845 this.verticalSpring = null;
1846 if (this.horizontalMaster != null) {
1847 this.horizontalMaster.remove (this);
1848 }if (this.verticalMaster != null) {
1849 this.verticalMaster.remove (this);
1850 }});
1851 Clazz.defineMethod (c$, "setHonorsVisibility", 
1852 function (a) {
1853 this.honorsVisibility = a;
1854 }, "Boolean");
1855 Clazz.defineMethod (c$, "removeSpring", 
1856  function (a) {
1857 if (a != null) {
1858 (a.getParent ()).springs.remove (a);
1859 }}, "javax.swing.GroupLayout.Spring");
1860 Clazz.defineMethod (c$, "isVisible", 
1861 function () {
1862 return this.visible;
1863 });
1864 Clazz.defineMethod (c$, "updateVisibility", 
1865 function () {
1866 var a;
1867 if (this.honorsVisibility == null) {
1868 a = this.b$["javax.swing.GroupLayout"].getHonorsVisibility ();
1869 } else {
1870 a = (this.honorsVisibility).booleanValue ();
1871 }var b = (a) ? this.component.isVisible () : true;
1872 if (this.visible != b) {
1873 this.visible = b;
1874 return true;
1875 }return false;
1876 });
1877 Clazz.defineMethod (c$, "setBounds", 
1878 function (a, b, c) {
1879 var d = this.horizontalSpring.getOrigin ();
1880 var e = this.horizontalSpring.getSize ();
1881 var f = this.verticalSpring.getOrigin ();
1882 var g = this.verticalSpring.getSize ();
1883 if (!c) {
1884 d = b - d - e;
1885 }this.component.setBounds (d + a.left, f + a.top, e, g);
1886 }, "java.awt.Insets,~N,~B");
1887 Clazz.defineMethod (c$, "setComponent", 
1888 function (a) {
1889 this.component = a;
1890 if (this.horizontalSpring != null) {
1891 this.horizontalSpring.setComponent (a);
1892 }if (this.verticalSpring != null) {
1893 this.verticalSpring.setComponent (a);
1894 }}, "java.awt.Component");
1895 Clazz.defineMethod (c$, "isLinked", 
1896 function (a) {
1897 if (a == 0) {
1898 return this.horizontalMaster != null;
1899 }return (this.verticalMaster != null);
1900 }, "~N");
1901 Clazz.defineMethod (c$, "setLinkInfo", 
1902  function (a, b) {
1903 if (a == 0) {
1904 this.horizontalMaster = b;
1905 } else {
1906 this.verticalMaster = b;
1907 }}, "~N,javax.swing.GroupLayout.LinkInfo");
1908 Clazz.defineMethod (c$, "getLinkInfo", 
1909 function (a) {
1910 return this.getLinkInfo (a, true);
1911 }, "~N");
1912 Clazz.defineMethod (c$, "getLinkInfo", 
1913  function (a, b) {
1914 if (a == 0) {
1915 if (this.horizontalMaster == null && b) {
1916  new javax.swing.GroupLayout.LinkInfo (0).add (this);
1917 }return this.horizontalMaster;
1918 } else {
1919 if (this.verticalMaster == null && b) {
1920  new javax.swing.GroupLayout.LinkInfo (1).add (this);
1921 }return this.verticalMaster;
1922 }}, "~N,~B");
1923 Clazz.defineMethod (c$, "clearCachedSize", 
1924 function () {
1925 if (this.horizontalMaster != null) {
1926 this.horizontalMaster.clearCachedSize ();
1927 }if (this.verticalMaster != null) {
1928 this.verticalMaster.clearCachedSize ();
1929 }});
1930 Clazz.defineMethod (c$, "getLinkSize", 
1931 function (a, b) {
1932 if (a == 0) {
1933 return this.horizontalMaster.getSize (a);
1934 } else {
1935 return this.verticalMaster.getSize (a);
1936 }}, "~N,~N");
1937 c$ = Clazz.p0p ();
1938 };
1939 Clazz.pu$h(self.c$);
1940 c$ = Clazz.declareType (javax.swing.GroupLayout, "Alignment", Enum);
1941 Clazz.defineEnumConstant (c$, "LEADING", 0, []);
1942 Clazz.defineEnumConstant (c$, "TRAILING", 1, []);
1943 Clazz.defineEnumConstant (c$, "CENTER", 2, []);
1944 Clazz.defineEnumConstant (c$, "BASELINE", 3, []);
1945 c$ = Clazz.p0p ();
1946 Clazz.pu$h(self.c$);
1947 c$ = Clazz.decorateAsClass (function () {
1948 this.index = 0;
1949 this.delta = 0;
1950 Clazz.instantialize (this, arguments);
1951 }, javax.swing.GroupLayout, "SpringDelta", null, Comparable);
1952 Clazz.makeConstructor (c$, 
1953 function (a, b) {
1954 this.index = a;
1955 this.delta = b;
1956 }, "~N,~N");
1957 Clazz.overrideMethod (c$, "compareTo", 
1958 function (a) {
1959 return this.delta - a.delta;
1960 }, "javax.swing.GroupLayout.SpringDelta");
1961 Clazz.defineMethod (c$, "toString", 
1962 function () {
1963 return Clazz.superCall (this, javax.swing.GroupLayout.SpringDelta, "toString", []) + "[index=" + this.index + ", delta=" + this.delta + "]";
1964 });
1965 c$ = Clazz.p0p ();
1966 Clazz.pu$h(self.c$);
1967 c$ = Clazz.decorateAsClass (function () {
1968 this.source = null;
1969 this.target = null;
1970 Clazz.instantialize (this, arguments);
1971 }, javax.swing.GroupLayout, "AutoPreferredGapMatch");
1972 Clazz.makeConstructor (c$, 
1973 function (a, b) {
1974 this.source = a;
1975 this.target = b;
1976 }, "javax.swing.GroupLayout.ComponentSpring,javax.swing.GroupLayout.ComponentSpring");
1977 Clazz.defineMethod (c$, "toString", 
1978  function (a) {
1979 return a.getComponent ().getName ();
1980 }, "javax.swing.GroupLayout.ComponentSpring");
1981 Clazz.defineMethod (c$, "toString", 
1982 function () {
1983 return "[" + this.toString (this.source) + "-" + this.toString (this.target) + "]";
1984 });
1985 c$ = Clazz.p0p ();
1986 Clazz.pu$h(self.c$);
1987 c$ = Clazz.decorateAsClass (function () {
1988 this.axis = 0;
1989 this.linked = null;
1990 this.size = 0;
1991 Clazz.instantialize (this, arguments);
1992 }, javax.swing.GroupLayout, "LinkInfo");
1993 Clazz.makeConstructor (c$, 
1994 function (a) {
1995 this.linked =  new java.util.ArrayList ();
1996 this.size = -2147483648;
1997 this.axis = a;
1998 }, "~N");
1999 Clazz.defineMethod (c$, "add", 
2000 function (a) {
2001 var b = a.getLinkInfo (this.axis, false);
2002 if (b == null) {
2003 this.linked.add (a);
2004 a.setLinkInfo (this.axis, this);
2005 } else if (b !== this) {
2006 this.linked.addAll (b.linked);
2007 for (var childInfo, $childInfo = b.linked.iterator (); $childInfo.hasNext () && ((childInfo = $childInfo.next ()) || true);) {
2008 childInfo.setLinkInfo (this.axis, this);
2009 }
2010 }this.clearCachedSize ();
2011 }, "javax.swing.GroupLayout.ComponentInfo");
2012 Clazz.defineMethod (c$, "remove", 
2013 function (a) {
2014 this.linked.remove (a);
2015 a.setLinkInfo (this.axis, null);
2016 if (this.linked.size () == 1) {
2017 this.linked.get (0).setLinkInfo (this.axis, null);
2018 }this.clearCachedSize ();
2019 }, "javax.swing.GroupLayout.ComponentInfo");
2020 Clazz.defineMethod (c$, "clearCachedSize", 
2021 function () {
2022 this.size = -2147483648;
2023 });
2024 Clazz.defineMethod (c$, "getSize", 
2025 function (a) {
2026 if (this.size == -2147483648) {
2027 this.size = this.calculateLinkedSize (a);
2028 }return this.size;
2029 }, "~N");
2030 Clazz.defineMethod (c$, "calculateLinkedSize", 
2031  function (a) {
2032 var b = 0;
2033 for (var info, $info = this.linked.iterator (); $info.hasNext () && ((info = $info.next ()) || true);) {
2034 var c;
2035 if (a == 0) {
2036 c = info.horizontalSpring;
2037 } else {
2038 c = info.verticalSpring;
2039 }b = Math.max (b, c.calculateNonlinkedPreferredSize (a));
2040 }
2041 return b;
2042 }, "~N");
2043 c$ = Clazz.p0p ();
2044 Clazz.defineStatics (c$,
2045 "MIN_SIZE", 0,
2046 "PREF_SIZE", 1,
2047 "MAX_SIZE", 2,
2048 "SPECIFIC_SIZE", 3,
2049 "UNSET", -2147483648,
2050 "DEFAULT_SIZE", -1,
2051 "PREFERRED_SIZE", -2);
2052 });