1 Clazz.declarePackage ("javax.swing");
\r
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 () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
4 this.autocreatePadding = false;
\r
5 this.autocreateContainerPadding = false;
\r
6 this.horizontalGroup = null;
\r
7 this.verticalGroup = null;
\r
8 this.componentInfos = null;
\r
10 this.tmpParallelSet = null;
\r
11 this.springsChanged = false;
\r
12 this.isValid = false;
\r
13 this.hasPreferredPaddingSprings = false;
\r
14 this.layoutStyle = null;
\r
15 this.honorsVisibility = false;
\r
16 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.Spring")) {
\r
17 javax.swing.GroupLayout.$GroupLayout$Spring$ ();
\r
19 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.Group")) {
\r
20 javax.swing.GroupLayout.$GroupLayout$Group$ ();
\r
22 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.SequentialGroup")) {
\r
23 javax.swing.GroupLayout.$GroupLayout$SequentialGroup$ ();
\r
25 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ParallelGroup")) {
\r
26 javax.swing.GroupLayout.$GroupLayout$ParallelGroup$ ();
\r
28 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.BaselineGroup")) {
\r
29 javax.swing.GroupLayout.$GroupLayout$BaselineGroup$ ();
\r
31 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ComponentSpring")) {
\r
32 javax.swing.GroupLayout.$GroupLayout$ComponentSpring$ ();
\r
34 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.PreferredGapSpring")) {
\r
35 javax.swing.GroupLayout.$GroupLayout$PreferredGapSpring$ ();
\r
37 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.GapSpring")) {
\r
38 javax.swing.GroupLayout.$GroupLayout$GapSpring$ ();
\r
40 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.AutoPreferredGapSpring")) {
\r
41 javax.swing.GroupLayout.$GroupLayout$AutoPreferredGapSpring$ ();
\r
43 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ContainerAutoPreferredGapSpring")) {
\r
44 javax.swing.GroupLayout.$GroupLayout$ContainerAutoPreferredGapSpring$ ();
\r
46 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ComponentInfo")) {
\r
47 javax.swing.GroupLayout.$GroupLayout$ComponentInfo$ ();
\r
49 Clazz.instantialize (this, arguments);
\r
50 }, javax.swing, "GroupLayout", null, java.awt.LayoutManager2);
\r
51 c$.checkSize = Clazz.defineMethod (c$, "checkSize",
\r
52 function (min, pref, max, isComponentSpring) {
\r
53 javax.swing.GroupLayout.checkResizeType (min, isComponentSpring);
\r
54 if (!isComponentSpring && pref < 0) {
\r
55 throw new IllegalArgumentException ("Pref must be >= 0");
\r
56 } else if (isComponentSpring) {
\r
57 javax.swing.GroupLayout.checkResizeType (pref, true);
\r
58 }javax.swing.GroupLayout.checkResizeType (max, isComponentSpring);
\r
59 javax.swing.GroupLayout.checkLessThan (min, pref);
\r
60 javax.swing.GroupLayout.checkLessThan (pref, max);
\r
62 c$.checkResizeType = Clazz.defineMethod (c$, "checkResizeType",
\r
63 function (type, isComponentSpring) {
\r
64 if (type < 0 && ((isComponentSpring && type != -1 && type != -2) || (!isComponentSpring && type != -2))) {
\r
65 throw new IllegalArgumentException ("Invalid size");
\r
67 c$.checkLessThan = Clazz.defineMethod (c$, "checkLessThan",
\r
68 function (min, max) {
\r
69 if (min >= 0 && max >= 0 && min > max) {
\r
70 throw new IllegalArgumentException ("Following is not met: min<=pref<=max");
\r
72 Clazz.makeConstructor (c$,
\r
75 throw new IllegalArgumentException ("Container must be non-null");
\r
76 }this.honorsVisibility = true;
\r
78 this.setHorizontalGroup (this.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING, true));
\r
79 this.setVerticalGroup (this.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING, true));
\r
80 this.componentInfos = new java.util.HashMap ();
\r
81 this.tmpParallelSet = new java.util.HashSet ();
\r
82 }, "java.awt.Container");
\r
83 Clazz.defineMethod (c$, "setHonorsVisibility",
\r
84 function (honorsVisibility) {
\r
85 if (this.honorsVisibility != honorsVisibility) {
\r
86 this.honorsVisibility = honorsVisibility;
\r
87 this.springsChanged = true;
\r
88 this.isValid = false;
\r
89 this.invalidateHost ();
\r
91 Clazz.defineMethod (c$, "getHonorsVisibility",
\r
93 return this.honorsVisibility;
\r
95 Clazz.defineMethod (c$, "setHonorsVisibility",
\r
96 function (component, honorsVisibility) {
\r
97 if (component == null) {
\r
98 throw new IllegalArgumentException ("Component must be non-null");
\r
99 }this.getComponentInfo (component).setHonorsVisibility (honorsVisibility);
\r
100 this.springsChanged = true;
\r
101 this.isValid = false;
\r
102 this.invalidateHost ();
\r
103 }, "java.awt.Component,Boolean");
\r
104 Clazz.defineMethod (c$, "setAutoCreateGaps",
\r
105 function (autoCreatePadding) {
\r
106 if (this.autocreatePadding != autoCreatePadding) {
\r
107 this.autocreatePadding = autoCreatePadding;
\r
108 this.invalidateHost ();
\r
110 Clazz.defineMethod (c$, "getAutoCreateGaps",
\r
112 return this.autocreatePadding;
\r
114 Clazz.defineMethod (c$, "setAutoCreateContainerGaps",
\r
115 function (autoCreateContainerPadding) {
\r
116 if (this.autocreateContainerPadding != autoCreateContainerPadding) {
\r
117 this.autocreateContainerPadding = autoCreateContainerPadding;
\r
118 this.horizontalGroup = this.createTopLevelGroup (this.getHorizontalGroup ());
\r
119 this.verticalGroup = this.createTopLevelGroup (this.getVerticalGroup ());
\r
120 this.invalidateHost ();
\r
122 Clazz.defineMethod (c$, "getAutoCreateContainerGaps",
\r
124 return this.autocreateContainerPadding;
\r
126 Clazz.defineMethod (c$, "setHorizontalGroup",
\r
128 if (group == null) {
\r
129 throw new IllegalArgumentException ("Group must be non-null");
\r
130 }this.horizontalGroup = this.createTopLevelGroup (group);
\r
131 this.invalidateHost ();
\r
132 }, "javax.swing.GroupLayout.Group");
\r
133 Clazz.defineMethod (c$, "getHorizontalGroup",
\r
136 if (this.horizontalGroup.springs.size () > 1) {
\r
138 }return this.horizontalGroup.springs.get (index);
\r
140 Clazz.defineMethod (c$, "setVerticalGroup",
\r
142 if (group == null) {
\r
143 throw new IllegalArgumentException ("Group must be non-null");
\r
144 }this.verticalGroup = this.createTopLevelGroup (group);
\r
145 this.invalidateHost ();
\r
146 }, "javax.swing.GroupLayout.Group");
\r
147 Clazz.defineMethod (c$, "getVerticalGroup",
\r
150 if (this.verticalGroup.springs.size () > 1) {
\r
152 }return this.verticalGroup.springs.get (index);
\r
154 Clazz.defineMethod (c$, "createTopLevelGroup",
\r
155 function (specifiedGroup) {
\r
156 var group = this.createSequentialGroup ();
\r
157 if (this.getAutoCreateContainerGaps ()) {
\r
158 group.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, this, null));
\r
159 group.addGroup (specifiedGroup);
\r
160 group.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, this, null));
\r
162 group.addGroup (specifiedGroup);
\r
164 }, "javax.swing.GroupLayout.Group");
\r
165 Clazz.defineMethod (c$, "createSequentialGroup",
\r
167 return Clazz.innerTypeInstance (javax.swing.GroupLayout.SequentialGroup, this, null);
\r
169 Clazz.defineMethod (c$, "createParallelGroup",
\r
171 return this.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING);
\r
173 Clazz.defineMethod (c$, "createParallelGroup",
\r
174 function (alignment) {
\r
175 return this.createParallelGroup (alignment, true);
\r
176 }, "javax.swing.GroupLayout.Alignment");
\r
177 Clazz.defineMethod (c$, "createParallelGroup",
\r
178 function (alignment, resizable) {
\r
179 if (alignment === javax.swing.GroupLayout.Alignment.BASELINE) {
\r
180 return Clazz.innerTypeInstance (javax.swing.GroupLayout.BaselineGroup, this, null, resizable);
\r
181 }return Clazz.innerTypeInstance (javax.swing.GroupLayout.ParallelGroup, this, null, alignment, resizable);
\r
182 }, "javax.swing.GroupLayout.Alignment,~B");
\r
183 Clazz.defineMethod (c$, "createBaselineGroup",
\r
184 function (resizable, anchorBaselineToTop) {
\r
185 return Clazz.innerTypeInstance (javax.swing.GroupLayout.BaselineGroup, this, null, resizable, anchorBaselineToTop);
\r
187 Clazz.defineMethod (c$, "linkSize",
\r
188 function (components) {
\r
189 this.linkSize (0, components);
\r
190 this.linkSize (1, components);
\r
192 Clazz.defineMethod (c$, "linkSize",
\r
193 function (axis, components) {
\r
194 if (components == null) {
\r
195 throw new IllegalArgumentException ("Components must be non-null");
\r
196 }for (var counter = components.length - 1; counter >= 0; counter--) {
\r
197 var c = components[counter];
\r
198 if (components[counter] == null) {
\r
199 throw new IllegalArgumentException ("Components must be non-null");
\r
200 }this.getComponentInfo (c);
\r
205 } else if (axis == 1) {
\r
208 throw new IllegalArgumentException ("Axis must be one of SwingConstants.HORIZONTAL or SwingConstants.VERTICAL");
\r
209 }var master = this.getComponentInfo (components[components.length - 1]).getLinkInfo (glAxis);
\r
210 for (var counter = components.length - 2; counter >= 0; counter--) {
\r
211 master.add (this.getComponentInfo (components[counter]));
\r
213 this.invalidateHost ();
\r
215 Clazz.defineMethod (c$, "replace",
\r
216 function (existingComponent, newComponent) {
\r
217 if (existingComponent == null || newComponent == null) {
\r
218 throw new IllegalArgumentException ("Components must be non-null");
\r
219 }if (this.springsChanged) {
\r
220 this.registerComponents (this.horizontalGroup, 0);
\r
221 this.registerComponents (this.verticalGroup, 1);
\r
222 }var info = this.componentInfos.remove (existingComponent);
\r
223 if (info == null) {
\r
224 throw new IllegalArgumentException ("Component must already exist");
\r
225 }this.host.remove (existingComponent);
\r
226 if (newComponent.getParent () !== this.host) {
\r
227 this.host.add (newComponent);
\r
228 }info.setComponent (newComponent);
\r
229 this.componentInfos.put (newComponent, info);
\r
230 this.invalidateHost ();
\r
231 }, "java.awt.Component,java.awt.Component");
\r
232 Clazz.defineMethod (c$, "setLayoutStyle",
\r
233 function (layoutStyle) {
\r
234 this.layoutStyle = layoutStyle;
\r
235 this.invalidateHost ();
\r
236 }, "javax.swing.LayoutStyle");
\r
237 Clazz.defineMethod (c$, "getLayoutStyle",
\r
239 return this.layoutStyle;
\r
241 Clazz.defineMethod (c$, "getLayoutStyle0",
\r
243 var layoutStyle = this.getLayoutStyle ();
\r
244 if (layoutStyle == null) {
\r
245 layoutStyle = javax.swing.LayoutStyle.getInstance ();
\r
246 }return layoutStyle;
\r
248 Clazz.defineMethod (c$, "invalidateHost",
\r
250 if (Clazz.instanceOf (this.host, javax.swing.JComponent)) {
\r
251 (this.host).revalidate ();
\r
253 this.host.invalidate ();
\r
254 }this.host.repaint ();
\r
256 Clazz.defineMethod (c$, "addLayoutComponent",
\r
257 function (name, component) {
\r
258 }, "~S,java.awt.Component");
\r
259 Clazz.overrideMethod (c$, "removeLayoutComponent",
\r
260 function (component) {
\r
261 var info = this.componentInfos.remove (component);
\r
262 if (info != null) {
\r
264 this.springsChanged = true;
\r
265 this.isValid = false;
\r
266 }}, "java.awt.Component");
\r
267 Clazz.overrideMethod (c$, "preferredLayoutSize",
\r
268 function (parent) {
\r
269 this.checkParent (parent);
\r
271 return this.adjustSize (this.horizontalGroup.getPreferredSize (0), this.verticalGroup.getPreferredSize (1));
\r
272 }, "java.awt.Container");
\r
273 Clazz.overrideMethod (c$, "minimumLayoutSize",
\r
274 function (parent) {
\r
275 this.checkParent (parent);
\r
277 return this.adjustSize (this.horizontalGroup.getMinimumSize (0), this.verticalGroup.getMinimumSize (1));
\r
278 }, "java.awt.Container");
\r
279 Clazz.overrideMethod (c$, "layoutContainer",
\r
280 function (parent) {
\r
282 var insets = parent.getInsets ();
\r
283 var width = parent.getWidth () - insets.left - insets.right;
\r
284 var height = parent.getHeight () - insets.top - insets.bottom;
\r
285 var ltr = this.isLeftToRight ();
\r
286 if (this.getAutoCreateGaps () || this.getAutoCreateContainerGaps () || this.hasPreferredPaddingSprings) {
\r
287 this.calculateAutopadding (this.horizontalGroup, 0, 3, 0, width);
\r
288 this.calculateAutopadding (this.verticalGroup, 1, 3, 0, height);
\r
289 }this.horizontalGroup.setSize (0, 0, width);
\r
290 this.verticalGroup.setSize (1, 0, height);
\r
291 for (var info, $info = this.componentInfos.values ().iterator (); $info.hasNext () && ((info = $info.next ()) || true);) {
\r
292 info.setBounds (insets, width, ltr);
\r
294 }, "java.awt.Container");
\r
295 Clazz.defineMethod (c$, "addLayoutComponent",
\r
296 function (component, constraints) {
\r
297 }, "java.awt.Component,~O");
\r
298 Clazz.overrideMethod (c$, "maximumLayoutSize",
\r
299 function (parent) {
\r
300 this.checkParent (parent);
\r
302 return this.adjustSize (this.horizontalGroup.getMaximumSize (0), this.verticalGroup.getMaximumSize (1));
\r
303 }, "java.awt.Container");
\r
304 Clazz.overrideMethod (c$, "getLayoutAlignmentX",
\r
305 function (parent) {
\r
306 this.checkParent (parent);
\r
308 }, "java.awt.Container");
\r
309 Clazz.overrideMethod (c$, "getLayoutAlignmentY",
\r
310 function (parent) {
\r
311 this.checkParent (parent);
\r
313 }, "java.awt.Container");
\r
314 Clazz.overrideMethod (c$, "invalidateLayout",
\r
315 function (parent) {
\r
316 this.checkParent (parent);
\r
318 this.isValid = false;
\r
319 }}, "java.awt.Container");
\r
320 Clazz.defineMethod (c$, "prepare",
\r
321 function (sizeType) {
\r
322 var visChanged = false;
\r
323 if (!this.isValid) {
\r
324 this.isValid = true;
\r
325 this.horizontalGroup.setSize (0, -2147483648, -2147483648);
\r
326 this.verticalGroup.setSize (1, -2147483648, -2147483648);
\r
327 for (var ci, $ci = this.componentInfos.values ().iterator (); $ci.hasNext () && ((ci = $ci.next ()) || true);) {
\r
328 if (ci.updateVisibility ()) {
\r
330 }ci.clearCachedSize ();
\r
332 }if (this.springsChanged) {
\r
333 this.registerComponents (this.horizontalGroup, 0);
\r
334 this.registerComponents (this.verticalGroup, 1);
\r
335 }if (this.springsChanged || visChanged) {
\r
336 this.checkComponents ();
\r
337 this.horizontalGroup.removeAutopadding ();
\r
338 this.verticalGroup.removeAutopadding ();
\r
339 if (this.getAutoCreateGaps ()) {
\r
340 this.insertAutopadding (true);
\r
341 } else if (this.hasPreferredPaddingSprings || this.getAutoCreateContainerGaps ()) {
\r
342 this.insertAutopadding (false);
\r
343 }this.springsChanged = false;
\r
344 }if (sizeType != 3 && (this.getAutoCreateGaps () || this.getAutoCreateContainerGaps () || this.hasPreferredPaddingSprings)) {
\r
345 this.calculateAutopadding (this.horizontalGroup, 0, sizeType, 0, 0);
\r
346 this.calculateAutopadding (this.verticalGroup, 1, sizeType, 0, 0);
\r
348 Clazz.defineMethod (c$, "calculateAutopadding",
\r
349 function (group, axis, sizeType, origin, size) {
\r
350 group.unsetAutopadding ();
\r
351 switch (sizeType) {
\r
353 size = group.getMinimumSize (axis);
\r
356 size = group.getPreferredSize (axis);
\r
359 size = group.getMaximumSize (axis);
\r
364 group.setSize (axis, origin, size);
\r
365 group.calculateAutopadding (axis);
\r
366 }, "javax.swing.GroupLayout.Group,~N,~N,~N,~N");
\r
367 Clazz.defineMethod (c$, "checkComponents",
\r
369 for (var info, $info = this.componentInfos.values ().iterator (); $info.hasNext () && ((info = $info.next ()) || true);) {
\r
370 if (info.horizontalSpring == null) {
\r
371 throw new IllegalStateException (info.component + " is not attached to a horizontal group");
\r
372 }if (info.verticalSpring == null) {
\r
373 throw new IllegalStateException (info.component + " is not attached to a vertical group");
\r
376 Clazz.defineMethod (c$, "registerComponents",
\r
377 function (group, axis) {
\r
378 var springs = group.springs;
\r
379 for (var counter = springs.size () - 1; counter >= 0; counter--) {
\r
380 var spring = springs.get (counter);
\r
381 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.ComponentSpring)) {
\r
382 (spring).installIfNecessary (axis);
\r
383 } else if (Clazz.instanceOf (spring, javax.swing.GroupLayout.Group)) {
\r
384 this.registerComponents (spring, axis);
\r
386 }, "javax.swing.GroupLayout.Group,~N");
\r
387 Clazz.defineMethod (c$, "adjustSize",
\r
388 function (width, height) {
\r
389 var insets = this.host.getInsets ();
\r
390 return new java.awt.Dimension (width + insets.left + insets.right, height + insets.top + insets.bottom);
\r
392 Clazz.defineMethod (c$, "checkParent",
\r
393 function (parent) {
\r
394 if (parent !== this.host) {
\r
395 throw new IllegalArgumentException ("GroupLayout can only be used with one Container at a time");
\r
396 }}, "java.awt.Container");
\r
397 Clazz.defineMethod (c$, "getComponentInfo",
\r
398 function (component) {
\r
399 var info = this.componentInfos.get (component);
\r
400 if (info == null) {
\r
401 info = Clazz.innerTypeInstance (javax.swing.GroupLayout.ComponentInfo, this, null, component);
\r
402 this.componentInfos.put (component, info);
\r
403 if (component.getParent () !== this.host) {
\r
404 this.host.add (component);
\r
406 }, "java.awt.Component");
\r
407 Clazz.defineMethod (c$, "insertAutopadding",
\r
408 function (insert) {
\r
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);
\r
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);
\r
412 Clazz.defineMethod (c$, "areParallelSiblings",
\r
413 function (source, target, axis) {
\r
414 var sourceInfo = this.getComponentInfo (source);
\r
415 var targetInfo = this.getComponentInfo (target);
\r
419 sourceSpring = sourceInfo.horizontalSpring;
\r
420 targetSpring = targetInfo.horizontalSpring;
\r
422 sourceSpring = sourceInfo.verticalSpring;
\r
423 targetSpring = targetInfo.verticalSpring;
\r
424 }var sourcePath = this.tmpParallelSet;
\r
425 sourcePath.clear ();
\r
426 var spring = sourceSpring.getParent ();
\r
427 while (spring != null) {
\r
428 sourcePath.add (spring);
\r
429 spring = spring.getParent ();
\r
431 spring = targetSpring.getParent ();
\r
432 while (spring != null) {
\r
433 if (sourcePath.contains (spring)) {
\r
434 sourcePath.clear ();
\r
435 while (spring != null) {
\r
436 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.ParallelGroup)) {
\r
438 }spring = spring.getParent ();
\r
441 }spring = spring.getParent ();
\r
443 sourcePath.clear ();
\r
445 }, "java.awt.Component,java.awt.Component,~N");
\r
446 Clazz.defineMethod (c$, "isLeftToRight",
\r
448 return this.host.getComponentOrientation ().isLeftToRight ();
\r
450 Clazz.defineMethod (c$, "toString",
\r
452 if (this.springsChanged) {
\r
453 this.registerComponents (this.horizontalGroup, 0);
\r
454 this.registerComponents (this.verticalGroup, 1);
\r
455 }var buffer = new StringBuffer ();
\r
456 buffer.append ("HORIZONTAL\n");
\r
457 this.createSpringDescription (buffer, this.horizontalGroup, " ", 0);
\r
458 buffer.append ("\nVERTICAL\n");
\r
459 this.createSpringDescription (buffer, this.verticalGroup, " ", 1);
\r
460 return buffer.toString ();
\r
462 Clazz.defineMethod (c$, "createSpringDescription",
\r
463 function (buffer, spring, indent, axis) {
\r
466 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.ComponentSpring)) {
\r
467 var cSpring = spring;
\r
468 origin = Integer.toString (cSpring.getOrigin ()) + " ";
\r
469 var name = cSpring.getComponent ().getName ();
\r
470 if (name != null) {
\r
471 origin = "name=" + name + ", ";
\r
472 }}if (Clazz.instanceOf (spring, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
\r
473 var paddingSpring = spring;
\r
474 padding = ", userCreated=" + paddingSpring.getUserCreated () + ", matches=" + paddingSpring.getMatchDescription ();
\r
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");
\r
476 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.Group)) {
\r
477 var springs = (spring).springs;
\r
479 for (var counter = 0; counter < springs.size (); counter++) {
\r
480 this.createSpringDescription (buffer, springs.get (counter), indent, axis);
\r
482 }}, "StringBuffer,javax.swing.GroupLayout.Spring,~S,~N");
\r
483 c$.$GroupLayout$Spring$ = function () {
\r
484 Clazz.pu$h(self.c$);
\r
485 c$ = Clazz.decorateAsClass (function () {
\r
486 Clazz.prepareCallback (this, arguments);
\r
491 this.parent = null;
\r
492 this.alignment = null;
\r
493 Clazz.instantialize (this, arguments);
\r
494 }, javax.swing.GroupLayout, "Spring");
\r
495 Clazz.makeConstructor (c$,
\r
497 this.min = this.pref = this.max = -2147483648;
\r
499 Clazz.defineMethod (c$, "setParent",
\r
502 }, "javax.swing.GroupLayout.Spring");
\r
503 Clazz.defineMethod (c$, "getParent",
\r
505 return this.parent;
\r
507 Clazz.defineMethod (c$, "setAlignment",
\r
509 this.alignment = a;
\r
510 }, "javax.swing.GroupLayout.Alignment");
\r
511 Clazz.defineMethod (c$, "getAlignment",
\r
513 return this.alignment;
\r
515 Clazz.defineMethod (c$, "getMinimumSize",
\r
517 if (this.min == -2147483648) {
\r
518 this.min = this.constrain (this.calculateMinimumSize (a));
\r
521 Clazz.defineMethod (c$, "getPreferredSize",
\r
523 if (this.pref == -2147483648) {
\r
524 this.pref = this.constrain (this.calculatePreferredSize (a));
\r
527 Clazz.defineMethod (c$, "getMaximumSize",
\r
529 if (this.max == -2147483648) {
\r
530 this.max = this.constrain (this.calculateMaximumSize (a));
\r
533 Clazz.defineMethod (c$, "setSize",
\r
534 function (a, b, c) {
\r
536 if (c == -2147483648) {
\r
539 Clazz.defineMethod (c$, "unset",
\r
541 this.size = this.min = this.pref = this.max = -2147483648;
\r
543 Clazz.defineMethod (c$, "getSize",
\r
547 Clazz.defineMethod (c$, "constrain",
\r
549 return Math.min (a, 32767);
\r
551 Clazz.defineMethod (c$, "getBaseline",
\r
555 Clazz.defineMethod (c$, "getBaselineResizeBehavior",
\r
557 return java.awt.Component.BaselineResizeBehavior.OTHER;
\r
559 Clazz.defineMethod (c$, "isResizable",
\r
561 var b = this.getMinimumSize (a);
\r
562 var c = this.getPreferredSize (a);
\r
563 return (b != c || c != this.getMaximumSize (a));
\r
567 c$.$GroupLayout$Group$ = function () {
\r
568 Clazz.pu$h(self.c$);
\r
569 c$ = Clazz.decorateAsClass (function () {
\r
570 Clazz.prepareCallback (this, arguments);
\r
571 this.springs = null;
\r
572 Clazz.instantialize (this, arguments);
\r
573 }, javax.swing.GroupLayout, "Group", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
\r
574 Clazz.makeConstructor (c$,
\r
576 Clazz.superConstructor (this, javax.swing.GroupLayout.Group, []);
\r
577 this.springs = new java.util.ArrayList ();
\r
579 Clazz.defineMethod (c$, "addGroup",
\r
581 return this.addSpring (a);
\r
582 }, "javax.swing.GroupLayout.Group");
\r
583 Clazz.defineMethod (c$, "addComponent",
\r
585 return this.addComponent (a, -1, -1, -1);
\r
586 }, "java.awt.Component");
\r
587 Clazz.defineMethod (c$, "addComponent",
\r
588 function (a, b, c, d) {
\r
589 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.ComponentSpring, this, null, a, b, c, d));
\r
590 }, "java.awt.Component,~N,~N,~N");
\r
591 Clazz.defineMethod (c$, "addGap",
\r
593 return this.addGap (a, a, a);
\r
595 Clazz.defineMethod (c$, "addGap",
\r
596 function (a, b, c) {
\r
597 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.GapSpring, this, null, a, b, c));
\r
599 Clazz.defineMethod (c$, "getSpring",
\r
601 return this.springs.get (a);
\r
603 Clazz.defineMethod (c$, "indexOf",
\r
605 return this.springs.indexOf (a);
\r
606 }, "javax.swing.GroupLayout.Spring");
\r
607 Clazz.defineMethod (c$, "addSpring",
\r
609 this.springs.add (a);
\r
610 a.setParent (this);
\r
611 if (!(Clazz.instanceOf (a, javax.swing.GroupLayout.AutoPreferredGapSpring)) || !(a).getUserCreated ()) {
\r
612 this.b$["javax.swing.GroupLayout"].springsChanged = true;
\r
614 }, "javax.swing.GroupLayout.Spring");
\r
615 Clazz.defineMethod (c$, "setSize",
\r
616 function (a, b, c) {
\r
617 Clazz.superCall (this, javax.swing.GroupLayout.Group, "setSize", [a, b, c]);
\r
618 if (c == -2147483648) {
\r
619 for (var d = this.springs.size () - 1; d >= 0; d--) {
\r
620 this.getSpring (d).setSize (a, b, c);
\r
623 this.setValidSize (a, b, c);
\r
625 Clazz.overrideMethod (c$, "calculateMinimumSize",
\r
627 return this.calculateSize (a, 0);
\r
629 Clazz.overrideMethod (c$, "calculatePreferredSize",
\r
631 return this.calculateSize (a, 1);
\r
633 Clazz.overrideMethod (c$, "calculateMaximumSize",
\r
635 return this.calculateSize (a, 2);
\r
637 Clazz.defineMethod (c$, "calculateSize",
\r
639 var c = this.springs.size ();
\r
643 return this.getSpringSize (this.getSpring (0), a, b);
\r
644 }var d = this.constrain (this.operator (this.getSpringSize (this.getSpring (0), a, b), this.getSpringSize (this.getSpring (1), a, b)));
\r
645 for (var e = 2; e < c; e++) {
\r
646 d = this.constrain (this.operator (d, this.getSpringSize (this.getSpring (e), a, b)));
\r
650 Clazz.defineMethod (c$, "getSpringSize",
\r
651 function (a, b, c) {
\r
654 return a.getMinimumSize (b);
\r
656 return a.getPreferredSize (b);
\r
658 return a.getMaximumSize (b);
\r
661 }, "javax.swing.GroupLayout.Spring,~N,~N");
\r
662 Clazz.defineMethod (c$, "removeAutopadding",
\r
665 for (var a = this.springs.size () - 1; a >= 0; a--) {
\r
666 var b = this.springs.get (a);
\r
667 if (Clazz.instanceOf (b, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
\r
668 if ((b).getUserCreated ()) {
\r
671 this.springs.remove (a);
\r
672 }} else if (Clazz.instanceOf (b, javax.swing.GroupLayout.Group)) {
\r
673 (b).removeAutopadding ();
\r
676 Clazz.defineMethod (c$, "unsetAutopadding",
\r
679 for (var a = this.springs.size () - 1; a >= 0; a--) {
\r
680 var b = this.springs.get (a);
\r
681 if (Clazz.instanceOf (b, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
\r
683 } else if (Clazz.instanceOf (b, javax.swing.GroupLayout.Group)) {
\r
684 (b).unsetAutopadding ();
\r
687 Clazz.defineMethod (c$, "calculateAutopadding",
\r
689 for (var b = this.springs.size () - 1; b >= 0; b--) {
\r
690 var c = this.springs.get (b);
\r
691 if (Clazz.instanceOf (c, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
\r
693 (c).calculatePadding (a);
\r
694 } else if (Clazz.instanceOf (c, javax.swing.GroupLayout.Group)) {
\r
695 (c).calculateAutopadding (a);
\r
699 Clazz.defineMethod (c$, "willHaveZeroSize",
\r
701 for (var b = this.springs.size () - 1; b >= 0; b--) {
\r
702 var c = this.springs.get (b);
\r
703 if (!c.willHaveZeroSize (a)) {
\r
710 c$.$GroupLayout$SequentialGroup$ = function () {
\r
711 Clazz.pu$h(self.c$);
\r
712 c$ = Clazz.decorateAsClass (function () {
\r
713 Clazz.prepareCallback (this, arguments);
\r
714 this.baselineSpring = null;
\r
715 Clazz.instantialize (this, arguments);
\r
716 }, javax.swing.GroupLayout, "SequentialGroup", javax.swing.GroupLayout.Group, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Group, this, null, Clazz.inheritArgs));
\r
717 Clazz.makeConstructor (c$,
\r
719 Clazz.superConstructor (this, javax.swing.GroupLayout.SequentialGroup, []);
\r
721 Clazz.defineMethod (c$, "addGroup",
\r
723 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGroup", [a]);
\r
724 }, "javax.swing.GroupLayout.Group");
\r
725 Clazz.defineMethod (c$, "addGroup",
\r
727 Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGroup", [b]);
\r
729 this.baselineSpring = b;
\r
731 }, "~B,javax.swing.GroupLayout.Group");
\r
732 Clazz.defineMethod (c$, "addComponent",
\r
734 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [a]);
\r
735 }, "java.awt.Component");
\r
736 Clazz.defineMethod (c$, "addComponent",
\r
738 Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [b]);
\r
740 this.baselineSpring = this.springs.get (this.springs.size () - 1);
\r
742 }, "~B,java.awt.Component");
\r
743 Clazz.defineMethod (c$, "addComponent",
\r
744 function (a, b, c, d) {
\r
745 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [a, b, c, d]);
\r
746 }, "java.awt.Component,~N,~N,~N");
\r
747 Clazz.defineMethod (c$, "addComponent",
\r
748 function (a, b, c, d, e) {
\r
749 Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [b, c, d, e]);
\r
751 this.baselineSpring = this.springs.get (this.springs.size () - 1);
\r
753 }, "~B,java.awt.Component,~N,~N,~N");
\r
754 Clazz.defineMethod (c$, "addGap",
\r
756 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGap", [a]);
\r
758 Clazz.defineMethod (c$, "addGap",
\r
759 function (a, b, c) {
\r
760 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGap", [a, b, c]);
\r
762 Clazz.defineMethod (c$, "addPreferredGap",
\r
763 function (a, b, c) {
\r
764 return this.addPreferredGap (a, b, c, -1, -2);
\r
765 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement");
\r
766 Clazz.defineMethod (c$, "addPreferredGap",
\r
767 function (a, b, c, d, e) {
\r
769 throw new IllegalArgumentException ("Type must be non-null");
\r
770 }if (a == null || b == null) {
\r
771 throw new IllegalArgumentException ("Components must be non-null");
\r
772 }this.checkPreferredGapValues (d, e);
\r
773 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.PreferredGapSpring, this, null, a, b, c, d, e));
\r
774 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,~N");
\r
775 Clazz.defineMethod (c$, "addPreferredGap",
\r
777 return this.addPreferredGap (a, -1, -1);
\r
778 }, "javax.swing.LayoutStyle.ComponentPlacement");
\r
779 Clazz.defineMethod (c$, "addPreferredGap",
\r
780 function (a, b, c) {
\r
781 if (a !== javax.swing.LayoutStyle.ComponentPlacement.RELATED && a !== javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) {
\r
782 throw new IllegalArgumentException ("Type must be one of LayoutStyle.ComponentPlacement.RELATED or LayoutStyle.ComponentPlacement.UNRELATED");
\r
783 }this.checkPreferredGapValues (b, c);
\r
784 this.b$["javax.swing.GroupLayout"].hasPreferredPaddingSprings = true;
\r
785 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.AutoPreferredGapSpring, this, null, a, b, c));
\r
786 }, "javax.swing.LayoutStyle.ComponentPlacement,~N,~N");
\r
787 Clazz.defineMethod (c$, "addContainerGap",
\r
789 return this.addContainerGap (-1, -1);
\r
791 Clazz.defineMethod (c$, "addContainerGap",
\r
793 if ((a < 0 && a != -1) || (b < 0 && b != -1 && b != -2) || (a >= 0 && b >= 0 && a > b)) {
\r
794 throw new IllegalArgumentException ("Pref and max must be either DEFAULT_VALUE or >= 0 and pref <= max");
\r
795 }this.b$["javax.swing.GroupLayout"].hasPreferredPaddingSprings = true;
\r
796 return this.addSpring (Clazz.innerTypeInstance (javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, this, null, a, b));
\r
798 Clazz.overrideMethod (c$, "operator",
\r
800 return this.constrain (a) + this.constrain (b);
\r
802 Clazz.overrideMethod (c$, "setValidSize",
\r
803 function (a, b, c) {
\r
804 var d = this.getPreferredSize (a);
\r
806 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
807 var e = spring.getPreferredSize (a);
\r
808 spring.setSize (a, b, e);
\r
811 } else if (this.springs.size () == 1) {
\r
812 var e = this.getSpring (0);
\r
813 e.setSize (a, b, Math.min (Math.max (c, e.getMinimumSize (a)), e.getMaximumSize (a)));
\r
814 } else if (this.springs.size () > 1) {
\r
815 this.setValidSizeNotPreferred (a, b, c);
\r
817 Clazz.defineMethod (c$, "setValidSizeNotPreferred",
\r
818 function (a, b, c) {
\r
819 var d = c - this.getPreferredSize (a);
\r
821 var f = this.springs.size ();
\r
824 }var g = this.buildResizableList (a, e);
\r
827 var i = Clazz.doubleToInt (d / h);
\r
829 var k = Clazz.newIntArray (f, 0);
\r
830 var l = e ? -1 : 1;
\r
831 for (var m = 0; m < h; m++) {
\r
833 if ((m + 1) == h) {
\r
835 }n.delta = Math.min (i, n.delta);
\r
837 if (n.delta != i && m + 1 < h) {
\r
838 i = Clazz.doubleToInt (d / (h - m - 1));
\r
839 j = d - i * (h - m - 1);
\r
840 }k[n.index] = l * n.delta;
\r
842 for (var n = 0; n < f; n++) {
\r
843 var o = this.getSpring (n);
\r
844 var p = o.getPreferredSize (a) + k[n];
\r
845 o.setSize (a, b, p);
\r
849 for (var i = 0; i < f; i++) {
\r
850 var j = this.getSpring (i);
\r
853 k = j.getMinimumSize (a);
\r
855 k = j.getMaximumSize (a);
\r
856 }j.setSize (a, b, k);
\r
860 Clazz.defineMethod (c$, "buildResizableList",
\r
862 var c = this.springs.size ();
\r
863 var d = new java.util.ArrayList (c);
\r
864 for (var e = 0; e < c; e++) {
\r
865 var f = this.getSpring (e);
\r
868 g = f.getPreferredSize (a) - f.getMinimumSize (a);
\r
870 g = f.getMaximumSize (a) - f.getPreferredSize (a);
\r
872 d.add ( new javax.swing.GroupLayout.SpringDelta (e, g));
\r
874 java.util.Collections.sort (d);
\r
877 Clazz.defineMethod (c$, "indexOfNextNonZeroSpring",
\r
879 while (a < this.springs.size ()) {
\r
880 var c = this.springs.get (a);
\r
881 if (!c.willHaveZeroSize (b)) {
\r
887 Clazz.defineMethod (c$, "insertAutopadding",
\r
888 function (a, b, c, d, e, f) {
\r
889 var g = new java.util.ArrayList (b);
\r
890 var h = new java.util.ArrayList (1);
\r
891 var i = new java.util.ArrayList (d);
\r
894 while (k < this.springs.size ()) {
\r
895 var l = this.getSpring (k);
\r
896 if (Clazz.instanceOf (l, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
\r
897 if (g.size () == 0) {
\r
901 k = this.indexOfNextNonZeroSpring (k + 1, true);
\r
902 if (k == this.springs.size ()) {
\r
903 if (!(Clazz.instanceOf (m, javax.swing.GroupLayout.ContainerAutoPreferredGapSpring))) {
\r
909 k = this.indexOfNextNonZeroSpring (k + 1, true);
\r
911 if (i.size () > 0 && f) {
\r
912 var m = Clazz.innerTypeInstance (javax.swing.GroupLayout.AutoPreferredGapSpring, this, null);
\r
913 this.springs.add (k, m);
\r
915 }if (Clazz.instanceOf (l, javax.swing.GroupLayout.ComponentSpring)) {
\r
917 if (!m.isVisible ()) {
\r
920 }for (var gapSpring, $gapSpring = g.iterator (); $gapSpring.hasNext () && ((gapSpring = $gapSpring.next ()) || true);) {
\r
921 gapSpring.addTarget (m, a);
\r
925 k = this.indexOfNextNonZeroSpring (k + 1, false);
\r
926 if (k == this.springs.size ()) {
\r
930 }} else if (Clazz.instanceOf (l, javax.swing.GroupLayout.Group)) {
\r
932 j = new java.util.ArrayList (1);
\r
936 (l).insertAutopadding (a, g, h, i, j, f);
\r
939 k = this.indexOfNextNonZeroSpring (k + 1, (j.size () == 0));
\r
940 if (k == this.springs.size ()) {
\r
951 }, "~N,java.util.List,java.util.List,java.util.List,java.util.List,~B");
\r
952 Clazz.defineMethod (c$, "getBaseline",
\r
954 if (this.baselineSpring != null) {
\r
955 var a = this.baselineSpring.getBaseline ();
\r
958 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
959 if (spring === this.baselineSpring) {
\r
962 b += spring.getPreferredSize (1);
\r
966 Clazz.defineMethod (c$, "getBaselineResizeBehavior",
\r
968 if (this.isResizable (1)) {
\r
969 if (!this.baselineSpring.isResizable (1)) {
\r
971 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
972 if (spring === this.baselineSpring) {
\r
974 } else if (spring.isResizable (1)) {
\r
979 for (var c = this.springs.size () - 1; c >= 0; c--) {
\r
980 var d = this.springs.get (c);
\r
981 if (d === this.baselineSpring) {
\r
983 }if (d.isResizable (1)) {
\r
988 return java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT;
\r
989 } else if (!a && b) {
\r
990 return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
\r
992 var a = this.baselineSpring.getBaselineResizeBehavior ();
\r
993 if (a === java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT) {
\r
994 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
995 if (spring === this.baselineSpring) {
\r
996 return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
\r
997 }if (spring.isResizable (1)) {
\r
998 return java.awt.Component.BaselineResizeBehavior.OTHER;
\r
1000 } else if (a === java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT) {
\r
1001 for (var b = this.springs.size () - 1; b >= 0; b--) {
\r
1002 var c = this.springs.get (b);
\r
1003 if (c === this.baselineSpring) {
\r
1004 return java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT;
\r
1005 }if (c.isResizable (1)) {
\r
1006 return java.awt.Component.BaselineResizeBehavior.OTHER;
\r
1008 }}return java.awt.Component.BaselineResizeBehavior.OTHER;
\r
1009 }return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
\r
1011 Clazz.defineMethod (c$, "checkPreferredGapValues",
\r
1013 if ((a < 0 && a != -1 && a != -2) || (b < 0 && b != -1 && b != -2) || (a >= 0 && b >= 0 && a > b)) {
\r
1014 throw new IllegalArgumentException ("Pref and max must be either DEFAULT_SIZE, PREFERRED_SIZE, or >= 0 and pref <= max");
\r
1016 c$ = Clazz.p0p ();
\r
1018 c$.$GroupLayout$ParallelGroup$ = function () {
\r
1019 Clazz.pu$h(self.c$);
\r
1020 c$ = Clazz.decorateAsClass (function () {
\r
1021 Clazz.prepareCallback (this, arguments);
\r
1022 this.childAlignment = null;
\r
1023 this.resizable = false;
\r
1024 Clazz.instantialize (this, arguments);
\r
1025 }, javax.swing.GroupLayout, "ParallelGroup", javax.swing.GroupLayout.Group, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Group, this, null, Clazz.inheritArgs));
\r
1026 Clazz.makeConstructor (c$,
\r
1028 Clazz.superConstructor (this, javax.swing.GroupLayout.ParallelGroup, []);
\r
1029 this.childAlignment = a;
\r
1030 this.resizable = b;
\r
1031 }, "javax.swing.GroupLayout.Alignment,~B");
\r
1032 Clazz.defineMethod (c$, "addGroup",
\r
1034 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addGroup", [a]);
\r
1035 }, "javax.swing.GroupLayout.Group");
\r
1036 Clazz.defineMethod (c$, "addComponent",
\r
1038 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addComponent", [a]);
\r
1039 }, "java.awt.Component");
\r
1040 Clazz.defineMethod (c$, "addComponent",
\r
1041 function (a, b, c, d) {
\r
1042 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addComponent", [a, b, c, d]);
\r
1043 }, "java.awt.Component,~N,~N,~N");
\r
1044 Clazz.defineMethod (c$, "addGap",
\r
1046 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addGap", [a]);
\r
1048 Clazz.defineMethod (c$, "addGap",
\r
1049 function (a, b, c) {
\r
1050 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addGap", [a, b, c]);
\r
1052 Clazz.defineMethod (c$, "addGroup",
\r
1054 this.checkChildAlignment (a);
\r
1055 b.setAlignment (a);
\r
1056 return this.addSpring (b);
\r
1057 }, "javax.swing.GroupLayout.Alignment,javax.swing.GroupLayout.Group");
\r
1058 Clazz.defineMethod (c$, "addComponent",
\r
1060 return this.addComponent (a, b, -1, -1, -1);
\r
1061 }, "java.awt.Component,javax.swing.GroupLayout.Alignment");
\r
1062 Clazz.defineMethod (c$, "addComponent",
\r
1063 function (a, b, c, d, e) {
\r
1064 this.checkChildAlignment (b);
\r
1065 var f = Clazz.innerTypeInstance (javax.swing.GroupLayout.ComponentSpring, this, null, a, c, d, e);
\r
1066 f.setAlignment (b);
\r
1067 return this.addSpring (f);
\r
1068 }, "java.awt.Component,javax.swing.GroupLayout.Alignment,~N,~N,~N");
\r
1069 Clazz.defineMethod (c$, "isResizable",
\r
1071 return this.resizable;
\r
1073 Clazz.overrideMethod (c$, "operator",
\r
1075 return Math.max (a, b);
\r
1077 Clazz.defineMethod (c$, "calculateMinimumSize",
\r
1079 if (!this.isResizable ()) {
\r
1080 return this.getPreferredSize (a);
\r
1081 }return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "calculateMinimumSize", [a]);
\r
1083 Clazz.defineMethod (c$, "calculateMaximumSize",
\r
1085 if (!this.isResizable ()) {
\r
1086 return this.getPreferredSize (a);
\r
1087 }return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "calculateMaximumSize", [a]);
\r
1089 Clazz.overrideMethod (c$, "setValidSize",
\r
1090 function (a, b, c) {
\r
1091 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
1092 this.setChildSize (spring, a, b, c);
\r
1095 Clazz.defineMethod (c$, "setChildSize",
\r
1096 function (a, b, c, d) {
\r
1097 var e = a.getAlignment ();
\r
1098 var f = Math.min (Math.max (a.getMinimumSize (b), d), a.getMaximumSize (b));
\r
1100 e = this.childAlignment;
\r
1102 case javax.swing.GroupLayout.Alignment.TRAILING:
\r
1103 a.setSize (b, c + d - f, f);
\r
1105 case javax.swing.GroupLayout.Alignment.CENTER:
\r
1106 a.setSize (b, c + Clazz.doubleToInt ((d - f) / 2), f);
\r
1109 a.setSize (b, c, f);
\r
1112 }, "javax.swing.GroupLayout.Spring,~N,~N,~N");
\r
1113 Clazz.defineMethod (c$, "insertAutopadding",
\r
1114 function (a, b, c, d, e, f) {
\r
1115 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
1116 if (Clazz.instanceOf (spring, javax.swing.GroupLayout.ComponentSpring)) {
\r
1117 if ((spring).isVisible ()) {
\r
1118 for (var gapSpring, $gapSpring = b.iterator (); $gapSpring.hasNext () && ((gapSpring = $gapSpring.next ()) || true);) {
\r
1119 gapSpring.addTarget (spring, a);
\r
1122 }} else if (Clazz.instanceOf (spring, javax.swing.GroupLayout.Group)) {
\r
1123 (spring).insertAutopadding (a, b, c, d, e, f);
\r
1124 } else if (Clazz.instanceOf (spring, javax.swing.GroupLayout.AutoPreferredGapSpring)) {
\r
1125 (spring).setSources (d);
\r
1128 }, "~N,java.util.List,java.util.List,java.util.List,java.util.List,~B");
\r
1129 Clazz.defineMethod (c$, "checkChildAlignment",
\r
1131 this.checkChildAlignment (a, (Clazz.instanceOf (this, javax.swing.GroupLayout.BaselineGroup)));
\r
1132 }, "javax.swing.GroupLayout.Alignment");
\r
1133 Clazz.defineMethod (c$, "checkChildAlignment",
\r
1136 throw new IllegalArgumentException ("Alignment must be non-null");
\r
1137 }if (!b && a === javax.swing.GroupLayout.Alignment.BASELINE) {
\r
1138 throw new IllegalArgumentException ("Alignment must be one of:LEADING, TRAILING or CENTER");
\r
1139 }}, "javax.swing.GroupLayout.Alignment,~B");
\r
1140 c$ = Clazz.p0p ();
\r
1142 c$.$GroupLayout$BaselineGroup$ = function () {
\r
1143 Clazz.pu$h(self.c$);
\r
1144 c$ = Clazz.decorateAsClass (function () {
\r
1145 Clazz.prepareCallback (this, arguments);
\r
1146 this.allSpringsHaveBaseline = false;
\r
1147 this.prefAscent = 0;
\r
1148 this.prefDescent = 0;
\r
1149 this.baselineAnchorSet = false;
\r
1150 this.baselineAnchoredToTop = false;
\r
1151 this.calcedBaseline = false;
\r
1152 Clazz.instantialize (this, arguments);
\r
1153 }, javax.swing.GroupLayout, "BaselineGroup", javax.swing.GroupLayout.ParallelGroup, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.ParallelGroup, this, null, Clazz.inheritArgs));
\r
1154 Clazz.makeConstructor (c$,
\r
1156 Clazz.superConstructor (this, javax.swing.GroupLayout.BaselineGroup, [javax.swing.GroupLayout.Alignment.LEADING, a]);
\r
1157 this.prefAscent = this.prefDescent = -1;
\r
1158 this.calcedBaseline = false;
\r
1160 Clazz.makeConstructor (c$,
\r
1162 this.construct (a);
\r
1163 this.baselineAnchoredToTop = b;
\r
1164 this.baselineAnchorSet = true;
\r
1166 Clazz.defineMethod (c$, "unset",
\r
1168 Clazz.superCall (this, javax.swing.GroupLayout.BaselineGroup, "unset", []);
\r
1169 this.prefAscent = this.prefDescent = -1;
\r
1170 this.calcedBaseline = false;
\r
1172 Clazz.defineMethod (c$, "setValidSize",
\r
1173 function (a, b, c) {
\r
1174 this.checkAxis (a);
\r
1175 if (this.prefAscent == -1) {
\r
1176 Clazz.superCall (this, javax.swing.GroupLayout.BaselineGroup, "setValidSize", [a, b, c]);
\r
1178 this.baselineLayout (b, c);
\r
1180 Clazz.defineMethod (c$, "calculateSize",
\r
1182 this.checkAxis (a);
\r
1183 if (!this.calcedBaseline) {
\r
1184 this.calculateBaselineAndResizeBehavior ();
\r
1186 return this.calculateMinSize ();
\r
1188 return this.calculateMaxSize ();
\r
1189 }if (this.allSpringsHaveBaseline) {
\r
1190 return this.prefAscent + this.prefDescent;
\r
1191 }return Math.max (this.prefAscent + this.prefDescent, Clazz.superCall (this, javax.swing.GroupLayout.BaselineGroup, "calculateSize", [a, b]));
\r
1193 Clazz.defineMethod (c$, "calculateBaselineAndResizeBehavior",
\r
1195 this.prefAscent = 0;
\r
1196 this.prefDescent = 0;
\r
1199 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
1200 if (spring.getAlignment () == null || spring.getAlignment () === javax.swing.GroupLayout.Alignment.BASELINE) {
\r
1201 var c = spring.getBaseline ();
\r
1203 if (spring.isResizable (1)) {
\r
1204 var d = spring.getBaselineResizeBehavior ();
\r
1207 } else if (d !== b) {
\r
1208 b = java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
\r
1209 }}this.prefAscent = Math.max (this.prefAscent, c);
\r
1210 this.prefDescent = Math.max (this.prefDescent, spring.getPreferredSize (1) - c);
\r
1213 if (!this.baselineAnchorSet) {
\r
1214 if (b === java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT) {
\r
1215 this.baselineAnchoredToTop = false;
\r
1217 this.baselineAnchoredToTop = true;
\r
1218 }}this.allSpringsHaveBaseline = (a == this.springs.size ());
\r
1219 this.calcedBaseline = true;
\r
1221 Clazz.defineMethod (c$, "calculateMaxSize",
\r
1223 var a = this.prefAscent;
\r
1224 var b = this.prefDescent;
\r
1226 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
1228 var e = spring.getMaximumSize (1);
\r
1229 if ((spring.getAlignment () == null || spring.getAlignment () === javax.swing.GroupLayout.Alignment.BASELINE) && (d = spring.getBaseline ()) >= 0) {
\r
1230 var f = spring.getPreferredSize (1);
\r
1232 switch (spring.getBaselineResizeBehavior ()) {
\r
1233 case java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT:
\r
1234 if (this.baselineAnchoredToTop) {
\r
1235 b = Math.max (b, e - d);
\r
1237 case java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT:
\r
1238 if (!this.baselineAnchoredToTop) {
\r
1239 a = Math.max (a, e - f + d);
\r
1245 c = Math.max (c, e);
\r
1247 return Math.max (c, a + b);
\r
1249 Clazz.defineMethod (c$, "calculateMinSize",
\r
1254 if (this.baselineAnchoredToTop) {
\r
1255 a = this.prefAscent;
\r
1257 b = this.prefDescent;
\r
1258 }for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
1259 var d = spring.getMinimumSize (1);
\r
1261 if ((spring.getAlignment () == null || spring.getAlignment () === javax.swing.GroupLayout.Alignment.BASELINE) && (e = spring.getBaseline ()) >= 0) {
\r
1262 var f = spring.getPreferredSize (1);
\r
1263 var g = spring.getBaselineResizeBehavior ();
\r
1265 case java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT:
\r
1266 if (this.baselineAnchoredToTop) {
\r
1267 b = Math.max (d - e, b);
\r
1269 a = Math.max (e, a);
\r
1271 case java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT:
\r
1272 if (!this.baselineAnchoredToTop) {
\r
1273 a = Math.max (e - (f - d), a);
\r
1275 b = Math.max (f - e, b);
\r
1278 a = Math.max (e, a);
\r
1279 b = Math.max (f - e, b);
\r
1283 c = Math.max (c, d);
\r
1285 return Math.max (c, a + b);
\r
1287 Clazz.defineMethod (c$, "baselineLayout",
\r
1291 if (this.baselineAnchoredToTop) {
\r
1292 c = this.prefAscent;
\r
1295 c = b - this.prefDescent;
\r
1296 d = this.prefDescent;
\r
1297 }for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {
\r
1298 var e = spring.getAlignment ();
\r
1299 if (e == null || e === javax.swing.GroupLayout.Alignment.BASELINE) {
\r
1300 var f = spring.getBaseline ();
\r
1302 var g = spring.getMaximumSize (1);
\r
1303 var h = spring.getPreferredSize (1);
\r
1306 switch (spring.getBaselineResizeBehavior ()) {
\r
1307 case java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT:
\r
1309 i = Math.min (d, g - f) + f;
\r
1311 case java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT:
\r
1312 i = Math.min (c, g - h + f) + (h - f);
\r
1313 j = a + c + (h - f) - i;
\r
1319 spring.setSize (1, j, i);
\r
1321 this.setChildSize (spring, 1, a, b);
\r
1323 this.setChildSize (spring, 1, a, b);
\r
1326 Clazz.defineMethod (c$, "getBaseline",
\r
1328 if (this.springs.size () > 1) {
\r
1329 this.getPreferredSize (1);
\r
1330 return this.prefAscent;
\r
1331 } else if (this.springs.size () == 1) {
\r
1332 return this.springs.get (0).getBaseline ();
\r
1335 Clazz.defineMethod (c$, "getBaselineResizeBehavior",
\r
1337 if (this.springs.size () == 1) {
\r
1338 return this.springs.get (0).getBaselineResizeBehavior ();
\r
1339 }if (this.baselineAnchoredToTop) {
\r
1340 return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;
\r
1341 }return java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT;
\r
1343 Clazz.defineMethod (c$, "checkAxis",
\r
1346 throw new IllegalStateException ("Baseline must be used along vertical axis");
\r
1348 c$ = Clazz.p0p ();
\r
1350 c$.$GroupLayout$ComponentSpring$ = function () {
\r
1351 Clazz.pu$h(self.c$);
\r
1352 c$ = Clazz.decorateAsClass (function () {
\r
1353 Clazz.prepareCallback (this, arguments);
\r
1354 this.component = null;
\r
1359 this.baseline = -1;
\r
1360 this.installed = false;
\r
1361 Clazz.instantialize (this, arguments);
\r
1362 }, javax.swing.GroupLayout, "ComponentSpring", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
\r
1363 Clazz.makeConstructor (c$,
\r
1364 function (a, b, c, d) {
\r
1365 Clazz.superConstructor (this, javax.swing.GroupLayout.ComponentSpring, []);
\r
1366 this.component = a;
\r
1368 throw new IllegalArgumentException ("Component must be non-null");
\r
1369 }javax.swing.GroupLayout.checkSize (b, c, d, true);
\r
1373 this.b$["javax.swing.GroupLayout"].getComponentInfo (a);
\r
1374 }, "java.awt.Component,~N,~N,~N");
\r
1375 Clazz.overrideMethod (c$, "calculateMinimumSize",
\r
1377 if (this.isLinked (a)) {
\r
1378 return this.getLinkSize (a, 0);
\r
1379 }return this.calculateNonlinkedMinimumSize (a);
\r
1381 Clazz.overrideMethod (c$, "calculatePreferredSize",
\r
1383 if (this.isLinked (a)) {
\r
1384 return this.getLinkSize (a, 1);
\r
1385 }var b = this.getMinimumSize (a);
\r
1386 var c = this.calculateNonlinkedPreferredSize (a);
\r
1387 var d = this.getMaximumSize (a);
\r
1388 return Math.min (d, Math.max (b, c));
\r
1390 Clazz.overrideMethod (c$, "calculateMaximumSize",
\r
1392 if (this.isLinked (a)) {
\r
1393 return this.getLinkSize (a, 2);
\r
1394 }return Math.max (this.getMinimumSize (a), this.calculateNonlinkedMaximumSize (a));
\r
1396 Clazz.defineMethod (c$, "isVisible",
\r
1398 return this.b$["javax.swing.GroupLayout"].getComponentInfo (this.getComponent ()).isVisible ();
\r
1400 Clazz.defineMethod (c$, "calculateNonlinkedMinimumSize",
\r
1402 if (!this.isVisible ()) {
\r
1404 }if (this.$min >= 0) {
\r
1406 }if (this.$min == -2) {
\r
1407 return this.calculateNonlinkedPreferredSize (a);
\r
1408 }return this.getSizeAlongAxis (a, this.component.getMinimumSize ());
\r
1410 Clazz.defineMethod (c$, "calculateNonlinkedPreferredSize",
\r
1412 if (!this.isVisible ()) {
\r
1414 }if (this.$pref >= 0) {
\r
1415 return this.$pref;
\r
1416 }return this.getSizeAlongAxis (a, this.component.getPreferredSize ());
\r
1418 Clazz.defineMethod (c$, "calculateNonlinkedMaximumSize",
\r
1420 if (!this.isVisible ()) {
\r
1422 }if (this.$max >= 0) {
\r
1424 }if (this.$max == -2) {
\r
1425 return this.calculateNonlinkedPreferredSize (a);
\r
1426 }return this.getSizeAlongAxis (a, this.component.getMaximumSize ());
\r
1428 Clazz.defineMethod (c$, "getSizeAlongAxis",
\r
1430 return (a == 0) ? b.width : b.height;
\r
1431 }, "~N,java.awt.Dimension");
\r
1432 Clazz.defineMethod (c$, "getLinkSize",
\r
1434 if (!this.isVisible ()) {
\r
1436 }var c = this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component);
\r
1437 return c.getLinkSize (a, b);
\r
1439 Clazz.defineMethod (c$, "setSize",
\r
1440 function (a, b, c) {
\r
1441 Clazz.superCall (this, javax.swing.GroupLayout.ComponentSpring, "setSize", [a, b, c]);
\r
1443 if (c == -2147483648) {
\r
1444 this.baseline = -1;
\r
1446 Clazz.defineMethod (c$, "getOrigin",
\r
1448 return this.origin;
\r
1450 Clazz.defineMethod (c$, "setComponent",
\r
1452 this.component = a;
\r
1453 }, "java.awt.Component");
\r
1454 Clazz.defineMethod (c$, "getComponent",
\r
1456 return this.component;
\r
1458 Clazz.overrideMethod (c$, "getBaseline",
\r
1460 if (this.baseline == -1) {
\r
1461 var a = this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).horizontalSpring;
\r
1462 var b = a.getPreferredSize (0);
\r
1463 var c = this.getPreferredSize (1);
\r
1464 if (b > 0 && c > 0) {
\r
1465 this.baseline = this.component.getBaseline (b, c);
\r
1466 }}return this.baseline;
\r
1468 Clazz.overrideMethod (c$, "getBaselineResizeBehavior",
\r
1470 return this.getComponent ().getBaselineResizeBehavior ();
\r
1472 Clazz.defineMethod (c$, "isLinked",
\r
1474 return this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).isLinked (a);
\r
1476 Clazz.defineMethod (c$, "installIfNecessary",
\r
1478 if (!this.installed) {
\r
1479 this.installed = true;
\r
1481 this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).horizontalSpring = this;
\r
1483 this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).verticalSpring = this;
\r
1485 Clazz.overrideMethod (c$, "willHaveZeroSize",
\r
1487 return !this.isVisible ();
\r
1489 c$ = Clazz.p0p ();
\r
1491 c$.$GroupLayout$PreferredGapSpring$ = function () {
\r
1492 Clazz.pu$h(self.c$);
\r
1493 c$ = Clazz.decorateAsClass (function () {
\r
1494 Clazz.prepareCallback (this, arguments);
\r
1495 this.source = null;
\r
1496 this.target = null;
\r
1500 Clazz.instantialize (this, arguments);
\r
1501 }, javax.swing.GroupLayout, "PreferredGapSpring", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
\r
1502 Clazz.makeConstructor (c$,
\r
1503 function (a, b, c, d, e) {
\r
1504 Clazz.superConstructor (this, javax.swing.GroupLayout.PreferredGapSpring, []);
\r
1510 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,~N");
\r
1511 Clazz.overrideMethod (c$, "calculateMinimumSize",
\r
1513 return this.getPadding (a);
\r
1515 Clazz.overrideMethod (c$, "calculatePreferredSize",
\r
1517 if (this.$pref == -1 || this.$pref == -2) {
\r
1518 return this.getMinimumSize (a);
\r
1519 }var b = this.getMinimumSize (a);
\r
1520 var c = this.getMaximumSize (a);
\r
1521 return Math.min (c, Math.max (b, this.$pref));
\r
1523 Clazz.overrideMethod (c$, "calculateMaximumSize",
\r
1525 if (this.$max == -2 || this.$max == -1) {
\r
1526 return this.getPadding (a);
\r
1527 }return Math.max (this.getMinimumSize (a), this.$max);
\r
1529 Clazz.defineMethod (c$, "getPadding",
\r
1536 }return this.b$["javax.swing.GroupLayout"].getLayoutStyle0 ().getPreferredGap (this.source, this.target, this.type, b, this.b$["javax.swing.GroupLayout"].host);
\r
1538 Clazz.overrideMethod (c$, "willHaveZeroSize",
\r
1542 c$ = Clazz.p0p ();
\r
1544 c$.$GroupLayout$GapSpring$ = function () {
\r
1545 Clazz.pu$h(self.c$);
\r
1546 c$ = Clazz.decorateAsClass (function () {
\r
1547 Clazz.prepareCallback (this, arguments);
\r
1551 Clazz.instantialize (this, arguments);
\r
1552 }, javax.swing.GroupLayout, "GapSpring", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
\r
1553 Clazz.makeConstructor (c$,
\r
1554 function (a, b, c) {
\r
1555 Clazz.superConstructor (this, javax.swing.GroupLayout.GapSpring, []);
\r
1556 javax.swing.GroupLayout.checkSize (a, b, c, false);
\r
1561 Clazz.overrideMethod (c$, "calculateMinimumSize",
\r
1563 if (this.$min == -2) {
\r
1564 return this.getPreferredSize (a);
\r
1565 }return this.$min;
\r
1567 Clazz.overrideMethod (c$, "calculatePreferredSize",
\r
1569 return this.$pref;
\r
1571 Clazz.overrideMethod (c$, "calculateMaximumSize",
\r
1573 if (this.$max == -2) {
\r
1574 return this.getPreferredSize (a);
\r
1575 }return this.$max;
\r
1577 Clazz.overrideMethod (c$, "willHaveZeroSize",
\r
1581 c$ = Clazz.p0p ();
\r
1583 c$.$GroupLayout$AutoPreferredGapSpring$ = function () {
\r
1584 Clazz.pu$h(self.c$);
\r
1585 c$ = Clazz.decorateAsClass (function () {
\r
1586 Clazz.prepareCallback (this, arguments);
\r
1587 this.sources = null;
\r
1588 this.source = null;
\r
1589 this.matches = null;
\r
1591 this.lastSize = 0;
\r
1595 this.userCreated = false;
\r
1596 Clazz.instantialize (this, arguments);
\r
1597 }, javax.swing.GroupLayout, "AutoPreferredGapSpring", javax.swing.GroupLayout.Spring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.Spring, this, null, Clazz.inheritArgs));
\r
1598 Clazz.makeConstructor (c$,
\r
1600 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);
\r
1603 this.type = javax.swing.LayoutStyle.ComponentPlacement.RELATED;
\r
1605 Clazz.makeConstructor (c$,
\r
1607 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);
\r
1611 Clazz.makeConstructor (c$,
\r
1612 function (a, b, c) {
\r
1613 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);
\r
1617 this.userCreated = true;
\r
1618 }, "javax.swing.LayoutStyle.ComponentPlacement,~N,~N");
\r
1619 Clazz.defineMethod (c$, "setSources",
\r
1621 this.sources = new java.util.ArrayList (a);
\r
1622 }, "java.util.List");
\r
1623 Clazz.defineMethod (c$, "setUserCreated",
\r
1625 this.userCreated = a;
\r
1627 Clazz.defineMethod (c$, "getUserCreated",
\r
1629 return this.userCreated;
\r
1631 Clazz.defineMethod (c$, "unset",
\r
1633 this.lastSize = this.getSize ();
\r
1634 Clazz.superCall (this, javax.swing.GroupLayout.AutoPreferredGapSpring, "unset", []);
\r
1637 Clazz.defineMethod (c$, "reset",
\r
1640 this.sources = null;
\r
1641 this.source = null;
\r
1642 this.matches = null;
\r
1644 Clazz.defineMethod (c$, "calculatePadding",
\r
1646 this.$size = -2147483648;
\r
1647 var b = -2147483648;
\r
1648 if (this.matches != null) {
\r
1649 var c = this.b$["javax.swing.GroupLayout"].getLayoutStyle0 ();
\r
1652 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {
\r
1658 }for (var e = this.matches.size () - 1; e >= 0; e--) {
\r
1659 var f = this.matches.get (e);
\r
1660 b = Math.max (b, this.calculatePadding (c, d, f.source, f.target));
\r
1662 }if (this.$size == -2147483648) {
\r
1664 }if (b == -2147483648) {
\r
1666 }if (this.lastSize != -2147483648) {
\r
1667 this.$size += Math.min (b, this.lastSize);
\r
1669 Clazz.defineMethod (c$, "calculatePadding",
\r
1670 function (a, b, c, d) {
\r
1671 var e = d.getOrigin () - (c.getOrigin () + c.getSize ());
\r
1674 if ((Clazz.instanceOf (c.getComponent (), javax.swing.JComponent)) && (Clazz.instanceOf (d.getComponent (), javax.swing.JComponent))) {
\r
1675 f = a.getPreferredGap (c.getComponent (), d.getComponent (), this.type, b, this.b$["javax.swing.GroupLayout"].host);
\r
1679 this.$size = Math.max (this.$size, f - e);
\r
1682 }, "javax.swing.LayoutStyle,~N,javax.swing.GroupLayout.ComponentSpring,javax.swing.GroupLayout.ComponentSpring");
\r
1683 Clazz.defineMethod (c$, "addTarget",
\r
1685 var c = (b == 0) ? 1 : 0;
\r
1686 if (this.source != null) {
\r
1687 if (this.b$["javax.swing.GroupLayout"].areParallelSiblings (this.source.getComponent (), a.getComponent (), c)) {
\r
1688 this.addValidTarget (this.source, a);
\r
1690 var d = a.getComponent ();
\r
1691 for (var e = this.sources.size () - 1; e >= 0; e--) {
\r
1692 var f = this.sources.get (e);
\r
1693 if (this.b$["javax.swing.GroupLayout"].areParallelSiblings (f.getComponent (), d, c)) {
\r
1694 this.addValidTarget (f, a);
\r
1696 }}, "javax.swing.GroupLayout.ComponentSpring,~N");
\r
1697 Clazz.defineMethod (c$, "addValidTarget",
\r
1699 if (this.matches == null) {
\r
1700 this.matches = new java.util.ArrayList (1);
\r
1701 }this.matches.add ( new javax.swing.GroupLayout.AutoPreferredGapMatch (a, b));
\r
1702 }, "javax.swing.GroupLayout.ComponentSpring,javax.swing.GroupLayout.ComponentSpring");
\r
1703 Clazz.overrideMethod (c$, "calculateMinimumSize",
\r
1705 return this.$size;
\r
1707 Clazz.overrideMethod (c$, "calculatePreferredSize",
\r
1709 if (this.$pref == -2 || this.$pref == -1) {
\r
1710 return this.$size;
\r
1711 }return Math.max (this.$size, this.$pref);
\r
1713 Clazz.overrideMethod (c$, "calculateMaximumSize",
\r
1715 if (this.$max >= 0) {
\r
1716 return Math.max (this.getPreferredSize (a), this.$max);
\r
1717 }return this.$size;
\r
1719 Clazz.defineMethod (c$, "getMatchDescription",
\r
1721 return (this.matches == null) ? "" : this.matches.toString ();
\r
1723 Clazz.defineMethod (c$, "toString",
\r
1725 return Clazz.superCall (this, javax.swing.GroupLayout.AutoPreferredGapSpring, "toString", []) + this.getMatchDescription ();
\r
1727 Clazz.overrideMethod (c$, "willHaveZeroSize",
\r
1731 c$ = Clazz.p0p ();
\r
1733 c$.$GroupLayout$ContainerAutoPreferredGapSpring$ = function () {
\r
1734 Clazz.pu$h(self.c$);
\r
1735 c$ = Clazz.decorateAsClass (function () {
\r
1736 Clazz.prepareCallback (this, arguments);
\r
1737 this.targets = null;
\r
1738 Clazz.instantialize (this, arguments);
\r
1739 }, javax.swing.GroupLayout, "ContainerAutoPreferredGapSpring", javax.swing.GroupLayout.AutoPreferredGapSpring, null, Clazz.innerTypeInstance (javax.swing.GroupLayout.AutoPreferredGapSpring, this, null, Clazz.inheritArgs));
\r
1740 Clazz.makeConstructor (c$,
\r
1742 Clazz.superConstructor (this, javax.swing.GroupLayout.ContainerAutoPreferredGapSpring);
\r
1743 this.setUserCreated (true);
\r
1745 Clazz.makeConstructor (c$,
\r
1747 Clazz.superConstructor (this, javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, [a, b]);
\r
1748 this.setUserCreated (true);
\r
1750 Clazz.overrideMethod (c$, "addTarget",
\r
1752 if (this.targets == null) {
\r
1753 this.targets = new java.util.ArrayList (1);
\r
1754 }this.targets.add (a);
\r
1755 }, "javax.swing.GroupLayout.ComponentSpring,~N");
\r
1756 Clazz.defineMethod (c$, "calculatePadding",
\r
1758 var $private = Clazz.checkPrivateMethod (arguments);
\r
1759 if ($private != null) {
\r
1760 return $private.apply (this, arguments);
\r
1762 var b = this.b$["javax.swing.GroupLayout"].getLayoutStyle0 ();
\r
1766 if (this.targets != null) {
\r
1768 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {
\r
1774 }for (var e = this.targets.size () - 1; e >= 0; e--) {
\r
1775 var f = this.targets.get (e);
\r
1777 if (Clazz.instanceOf (f.getComponent (), javax.swing.JComponent)) {
\r
1778 g = b.getContainerGap (f.getComponent (), d, this.b$["javax.swing.GroupLayout"].host);
\r
1779 c = Math.max (g, c);
\r
1780 g -= f.getOrigin ();
\r
1782 c = Math.max (g, c);
\r
1783 }this.$size = Math.max (this.$size, g);
\r
1787 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {
\r
1793 }if (this.sources != null) {
\r
1794 for (var e = this.sources.size () - 1; e >= 0; e--) {
\r
1795 var f = this.sources.get (e);
\r
1796 c = Math.max (c, this.updateSize (b, f, d));
\r
1798 } else if (this.source != null) {
\r
1799 c = this.updateSize (b, this.source, d);
\r
1800 }}if (this.lastSize != -2147483648) {
\r
1801 this.$size += Math.min (c, this.lastSize);
\r
1803 Clazz.defineMethod (c$, "updateSize",
\r
1804 function (a, b, c) {
\r
1806 if (Clazz.instanceOf (b.getComponent (), javax.swing.JComponent)) {
\r
1807 d = a.getContainerGap (b.getComponent (), c, this.b$["javax.swing.GroupLayout"].host);
\r
1808 }var e = Math.max (0, this.getParent ().getSize () - b.getSize () - b.getOrigin ());
\r
1809 this.$size = Math.max (this.$size, d - e);
\r
1811 }, "javax.swing.LayoutStyle,javax.swing.GroupLayout.ComponentSpring,~N");
\r
1812 Clazz.overrideMethod (c$, "getMatchDescription",
\r
1814 if (this.targets != null) {
\r
1815 return "leading: " + this.targets.toString ();
\r
1816 }if (this.sources != null) {
\r
1817 return "trailing: " + this.sources.toString ();
\r
1820 c$ = Clazz.p0p ();
\r
1822 c$.$GroupLayout$ComponentInfo$ = function () {
\r
1823 Clazz.pu$h(self.c$);
\r
1824 c$ = Clazz.decorateAsClass (function () {
\r
1825 Clazz.prepareCallback (this, arguments);
\r
1826 this.component = null;
\r
1827 this.horizontalSpring = null;
\r
1828 this.verticalSpring = null;
\r
1829 this.horizontalMaster = null;
\r
1830 this.verticalMaster = null;
\r
1831 this.visible = false;
\r
1832 this.honorsVisibility = null;
\r
1833 Clazz.instantialize (this, arguments);
\r
1834 }, javax.swing.GroupLayout, "ComponentInfo");
\r
1835 Clazz.makeConstructor (c$,
\r
1837 this.component = a;
\r
1838 this.updateVisibility ();
\r
1839 }, "java.awt.Component");
\r
1840 Clazz.defineMethod (c$, "dispose",
\r
1842 this.removeSpring (this.horizontalSpring);
\r
1843 this.horizontalSpring = null;
\r
1844 this.removeSpring (this.verticalSpring);
\r
1845 this.verticalSpring = null;
\r
1846 if (this.horizontalMaster != null) {
\r
1847 this.horizontalMaster.remove (this);
\r
1848 }if (this.verticalMaster != null) {
\r
1849 this.verticalMaster.remove (this);
\r
1851 Clazz.defineMethod (c$, "setHonorsVisibility",
\r
1853 this.honorsVisibility = a;
\r
1855 Clazz.defineMethod (c$, "removeSpring",
\r
1858 (a.getParent ()).springs.remove (a);
\r
1859 }}, "javax.swing.GroupLayout.Spring");
\r
1860 Clazz.defineMethod (c$, "isVisible",
\r
1862 return this.visible;
\r
1864 Clazz.defineMethod (c$, "updateVisibility",
\r
1867 if (this.honorsVisibility == null) {
\r
1868 a = this.b$["javax.swing.GroupLayout"].getHonorsVisibility ();
\r
1870 a = (this.honorsVisibility).booleanValue ();
\r
1871 }var b = (a) ? this.component.isVisible () : true;
\r
1872 if (this.visible != b) {
\r
1877 Clazz.defineMethod (c$, "setBounds",
\r
1878 function (a, b, c) {
\r
1879 var d = this.horizontalSpring.getOrigin ();
\r
1880 var e = this.horizontalSpring.getSize ();
\r
1881 var f = this.verticalSpring.getOrigin ();
\r
1882 var g = this.verticalSpring.getSize ();
\r
1885 }this.component.setBounds (d + a.left, f + a.top, e, g);
\r
1886 }, "java.awt.Insets,~N,~B");
\r
1887 Clazz.defineMethod (c$, "setComponent",
\r
1889 this.component = a;
\r
1890 if (this.horizontalSpring != null) {
\r
1891 this.horizontalSpring.setComponent (a);
\r
1892 }if (this.verticalSpring != null) {
\r
1893 this.verticalSpring.setComponent (a);
\r
1894 }}, "java.awt.Component");
\r
1895 Clazz.defineMethod (c$, "isLinked",
\r
1898 return this.horizontalMaster != null;
\r
1899 }return (this.verticalMaster != null);
\r
1901 Clazz.defineMethod (c$, "setLinkInfo",
\r
1904 this.horizontalMaster = b;
\r
1906 this.verticalMaster = b;
\r
1907 }}, "~N,javax.swing.GroupLayout.LinkInfo");
\r
1908 Clazz.defineMethod (c$, "getLinkInfo",
\r
1910 return this.getLinkInfo (a, true);
\r
1912 Clazz.defineMethod (c$, "getLinkInfo",
\r
1915 if (this.horizontalMaster == null && b) {
\r
1916 new javax.swing.GroupLayout.LinkInfo (0).add (this);
\r
1917 }return this.horizontalMaster;
\r
1919 if (this.verticalMaster == null && b) {
\r
1920 new javax.swing.GroupLayout.LinkInfo (1).add (this);
\r
1921 }return this.verticalMaster;
\r
1923 Clazz.defineMethod (c$, "clearCachedSize",
\r
1925 if (this.horizontalMaster != null) {
\r
1926 this.horizontalMaster.clearCachedSize ();
\r
1927 }if (this.verticalMaster != null) {
\r
1928 this.verticalMaster.clearCachedSize ();
\r
1930 Clazz.defineMethod (c$, "getLinkSize",
\r
1933 return this.horizontalMaster.getSize (a);
\r
1935 return this.verticalMaster.getSize (a);
\r
1937 c$ = Clazz.p0p ();
\r
1939 Clazz.pu$h(self.c$);
\r
1940 c$ = Clazz.declareType (javax.swing.GroupLayout, "Alignment", Enum);
\r
1941 Clazz.defineEnumConstant (c$, "LEADING", 0, []);
\r
1942 Clazz.defineEnumConstant (c$, "TRAILING", 1, []);
\r
1943 Clazz.defineEnumConstant (c$, "CENTER", 2, []);
\r
1944 Clazz.defineEnumConstant (c$, "BASELINE", 3, []);
\r
1945 c$ = Clazz.p0p ();
\r
1946 Clazz.pu$h(self.c$);
\r
1947 c$ = Clazz.decorateAsClass (function () {
\r
1950 Clazz.instantialize (this, arguments);
\r
1951 }, javax.swing.GroupLayout, "SpringDelta", null, Comparable);
\r
1952 Clazz.makeConstructor (c$,
\r
1957 Clazz.overrideMethod (c$, "compareTo",
\r
1959 return this.delta - a.delta;
\r
1960 }, "javax.swing.GroupLayout.SpringDelta");
\r
1961 Clazz.defineMethod (c$, "toString",
\r
1963 return Clazz.superCall (this, javax.swing.GroupLayout.SpringDelta, "toString", []) + "[index=" + this.index + ", delta=" + this.delta + "]";
\r
1965 c$ = Clazz.p0p ();
\r
1966 Clazz.pu$h(self.c$);
\r
1967 c$ = Clazz.decorateAsClass (function () {
\r
1968 this.source = null;
\r
1969 this.target = null;
\r
1970 Clazz.instantialize (this, arguments);
\r
1971 }, javax.swing.GroupLayout, "AutoPreferredGapMatch");
\r
1972 Clazz.makeConstructor (c$,
\r
1976 }, "javax.swing.GroupLayout.ComponentSpring,javax.swing.GroupLayout.ComponentSpring");
\r
1977 Clazz.defineMethod (c$, "toString",
\r
1979 return a.getComponent ().getName ();
\r
1980 }, "javax.swing.GroupLayout.ComponentSpring");
\r
1981 Clazz.defineMethod (c$, "toString",
\r
1983 return "[" + this.toString (this.source) + "-" + this.toString (this.target) + "]";
\r
1985 c$ = Clazz.p0p ();
\r
1986 Clazz.pu$h(self.c$);
\r
1987 c$ = Clazz.decorateAsClass (function () {
\r
1989 this.linked = null;
\r
1991 Clazz.instantialize (this, arguments);
\r
1992 }, javax.swing.GroupLayout, "LinkInfo");
\r
1993 Clazz.makeConstructor (c$,
\r
1995 this.linked = new java.util.ArrayList ();
\r
1996 this.size = -2147483648;
\r
1999 Clazz.defineMethod (c$, "add",
\r
2001 var b = a.getLinkInfo (this.axis, false);
\r
2003 this.linked.add (a);
\r
2004 a.setLinkInfo (this.axis, this);
\r
2005 } else if (b !== this) {
\r
2006 this.linked.addAll (b.linked);
\r
2007 for (var childInfo, $childInfo = b.linked.iterator (); $childInfo.hasNext () && ((childInfo = $childInfo.next ()) || true);) {
\r
2008 childInfo.setLinkInfo (this.axis, this);
\r
2010 }this.clearCachedSize ();
\r
2011 }, "javax.swing.GroupLayout.ComponentInfo");
\r
2012 Clazz.defineMethod (c$, "remove",
\r
2014 this.linked.remove (a);
\r
2015 a.setLinkInfo (this.axis, null);
\r
2016 if (this.linked.size () == 1) {
\r
2017 this.linked.get (0).setLinkInfo (this.axis, null);
\r
2018 }this.clearCachedSize ();
\r
2019 }, "javax.swing.GroupLayout.ComponentInfo");
\r
2020 Clazz.defineMethod (c$, "clearCachedSize",
\r
2022 this.size = -2147483648;
\r
2024 Clazz.defineMethod (c$, "getSize",
\r
2026 if (this.size == -2147483648) {
\r
2027 this.size = this.calculateLinkedSize (a);
\r
2028 }return this.size;
\r
2030 Clazz.defineMethod (c$, "calculateLinkedSize",
\r
2033 for (var info, $info = this.linked.iterator (); $info.hasNext () && ((info = $info.next ()) || true);) {
\r
2036 c = info.horizontalSpring;
\r
2038 c = info.verticalSpring;
\r
2039 }b = Math.max (b, c.calculateNonlinkedPreferredSize (a));
\r
2043 c$ = Clazz.p0p ();
\r
2044 Clazz.defineStatics (c$,
\r
2048 "SPECIFIC_SIZE", 3,
\r
2049 "UNSET", -2147483648,
\r
2050 "DEFAULT_SIZE", -1,
\r
2051 "PREFERRED_SIZE", -2);
\r