JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / swingjs / j2s / javax / swing / GroupLayout.js
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
9 this.host = 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
18 }\r
19 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.Group")) {\r
20 javax.swing.GroupLayout.$GroupLayout$Group$ ();\r
21 }\r
22 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.SequentialGroup")) {\r
23 javax.swing.GroupLayout.$GroupLayout$SequentialGroup$ ();\r
24 }\r
25 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ParallelGroup")) {\r
26 javax.swing.GroupLayout.$GroupLayout$ParallelGroup$ ();\r
27 }\r
28 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.BaselineGroup")) {\r
29 javax.swing.GroupLayout.$GroupLayout$BaselineGroup$ ();\r
30 }\r
31 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ComponentSpring")) {\r
32 javax.swing.GroupLayout.$GroupLayout$ComponentSpring$ ();\r
33 }\r
34 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.PreferredGapSpring")) {\r
35 javax.swing.GroupLayout.$GroupLayout$PreferredGapSpring$ ();\r
36 }\r
37 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.GapSpring")) {\r
38 javax.swing.GroupLayout.$GroupLayout$GapSpring$ ();\r
39 }\r
40 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.AutoPreferredGapSpring")) {\r
41 javax.swing.GroupLayout.$GroupLayout$AutoPreferredGapSpring$ ();\r
42 }\r
43 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ContainerAutoPreferredGapSpring")) {\r
44 javax.swing.GroupLayout.$GroupLayout$ContainerAutoPreferredGapSpring$ ();\r
45 }\r
46 if (!Clazz.isClassDefined ("javax.swing.GroupLayout.ComponentInfo")) {\r
47 javax.swing.GroupLayout.$GroupLayout$ComponentInfo$ ();\r
48 }\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
61 }, "~N,~N,~N,~B");\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
66 }}, "~N,~B");\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
71 }}, "~N,~N");\r
72 Clazz.makeConstructor (c$, \r
73 function (host) {\r
74 if (host == null) {\r
75 throw  new IllegalArgumentException ("Container must be non-null");\r
76 }this.honorsVisibility = true;\r
77 this.host = host;\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
90 }}, "~B");\r
91 Clazz.defineMethod (c$, "getHonorsVisibility", \r
92 function () {\r
93 return this.honorsVisibility;\r
94 });\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
109 }}, "~B");\r
110 Clazz.defineMethod (c$, "getAutoCreateGaps", \r
111 function () {\r
112 return this.autocreatePadding;\r
113 });\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
121 }}, "~B");\r
122 Clazz.defineMethod (c$, "getAutoCreateContainerGaps", \r
123 function () {\r
124 return this.autocreateContainerPadding;\r
125 });\r
126 Clazz.defineMethod (c$, "setHorizontalGroup", \r
127 function (group) {\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
134  function () {\r
135 var index = 0;\r
136 if (this.horizontalGroup.springs.size () > 1) {\r
137 index = 1;\r
138 }return this.horizontalGroup.springs.get (index);\r
139 });\r
140 Clazz.defineMethod (c$, "setVerticalGroup", \r
141 function (group) {\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
148  function () {\r
149 var index = 0;\r
150 if (this.verticalGroup.springs.size () > 1) {\r
151 index = 1;\r
152 }return this.verticalGroup.springs.get (index);\r
153 });\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
161 } else {\r
162 group.addGroup (specifiedGroup);\r
163 }return group;\r
164 }, "javax.swing.GroupLayout.Group");\r
165 Clazz.defineMethod (c$, "createSequentialGroup", \r
166 function () {\r
167 return Clazz.innerTypeInstance (javax.swing.GroupLayout.SequentialGroup, this, null);\r
168 });\r
169 Clazz.defineMethod (c$, "createParallelGroup", \r
170 function () {\r
171 return this.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING);\r
172 });\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
186 }, "~B,~B");\r
187 Clazz.defineMethod (c$, "linkSize", \r
188 function (components) {\r
189 this.linkSize (0, components);\r
190 this.linkSize (1, components);\r
191 }, "~A");\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
201 }\r
202 var glAxis;\r
203 if (axis == 0) {\r
204 glAxis = 0;\r
205 } else if (axis == 1) {\r
206 glAxis = 1;\r
207 } else {\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
212 }\r
213 this.invalidateHost ();\r
214 }, "~N,~A");\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
238 function () {\r
239 return this.layoutStyle;\r
240 });\r
241 Clazz.defineMethod (c$, "getLayoutStyle0", \r
242  function () {\r
243 var layoutStyle = this.getLayoutStyle ();\r
244 if (layoutStyle == null) {\r
245 layoutStyle = javax.swing.LayoutStyle.getInstance ();\r
246 }return layoutStyle;\r
247 });\r
248 Clazz.defineMethod (c$, "invalidateHost", \r
249  function () {\r
250 if (Clazz.instanceOf (this.host, javax.swing.JComponent)) {\r
251 (this.host).revalidate ();\r
252 } else {\r
253 this.host.invalidate ();\r
254 }this.host.repaint ();\r
255 });\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
263 info.dispose ();\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
270 this.prepare (1);\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
276 this.prepare (0);\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
281 this.prepare (3);\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
293 }\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
301 this.prepare (2);\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
307 return .5;\r
308 }, "java.awt.Container");\r
309 Clazz.overrideMethod (c$, "getLayoutAlignmentY", \r
310 function (parent) {\r
311 this.checkParent (parent);\r
312 return .5;\r
313 }, "java.awt.Container");\r
314 Clazz.overrideMethod (c$, "invalidateLayout", \r
315 function (parent) {\r
316 this.checkParent (parent);\r
317 {\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
329 visChanged = true;\r
330 }ci.clearCachedSize ();\r
331 }\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
347 }}, "~N");\r
348 Clazz.defineMethod (c$, "calculateAutopadding", \r
349  function (group, axis, sizeType, origin, size) {\r
350 group.unsetAutopadding ();\r
351 switch (sizeType) {\r
352 case 0:\r
353 size = group.getMinimumSize (axis);\r
354 break;\r
355 case 1:\r
356 size = group.getPreferredSize (axis);\r
357 break;\r
358 case 2:\r
359 size = group.getMaximumSize (axis);\r
360 break;\r
361 default:\r
362 break;\r
363 }\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
368  function () {\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
374 }}\r
375 });\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
385 }}\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
391 }, "~N,~N");\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
405 }}return info;\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
411 }, "~B");\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
416 var sourceSpring;\r
417 var targetSpring;\r
418 if (axis == 0) {\r
419 sourceSpring = sourceInfo.horizontalSpring;\r
420 targetSpring = targetInfo.horizontalSpring;\r
421 } else {\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
430 }\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
437 return true;\r
438 }spring = spring.getParent ();\r
439 }\r
440 return false;\r
441 }spring = spring.getParent ();\r
442 }\r
443 sourcePath.clear ();\r
444 return false;\r
445 }, "java.awt.Component,java.awt.Component,~N");\r
446 Clazz.defineMethod (c$, "isLeftToRight", \r
447  function () {\r
448 return this.host.getComponentOrientation ().isLeftToRight ();\r
449 });\r
450 Clazz.defineMethod (c$, "toString", \r
451 function () {\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
461 });\r
462 Clazz.defineMethod (c$, "createSpringDescription", \r
463  function (buffer, spring, indent, axis) {\r
464 var origin = "";\r
465 var padding = "";\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
478 indent += "  ";\r
479 for (var counter = 0; counter < springs.size (); counter++) {\r
480 this.createSpringDescription (buffer, springs.get (counter), indent, axis);\r
481 }\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
487 this.size = 0;\r
488 this.min = 0;\r
489 this.max = 0;\r
490 this.pref = 0;\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
496 function () {\r
497 this.min = this.pref = this.max = -2147483648;\r
498 });\r
499 Clazz.defineMethod (c$, "setParent", \r
500 function (a) {\r
501 this.parent = a;\r
502 }, "javax.swing.GroupLayout.Spring");\r
503 Clazz.defineMethod (c$, "getParent", \r
504 function () {\r
505 return this.parent;\r
506 });\r
507 Clazz.defineMethod (c$, "setAlignment", \r
508 function (a) {\r
509 this.alignment = a;\r
510 }, "javax.swing.GroupLayout.Alignment");\r
511 Clazz.defineMethod (c$, "getAlignment", \r
512 function () {\r
513 return this.alignment;\r
514 });\r
515 Clazz.defineMethod (c$, "getMinimumSize", \r
516 function (a) {\r
517 if (this.min == -2147483648) {\r
518 this.min = this.constrain (this.calculateMinimumSize (a));\r
519 }return this.min;\r
520 }, "~N");\r
521 Clazz.defineMethod (c$, "getPreferredSize", \r
522 function (a) {\r
523 if (this.pref == -2147483648) {\r
524 this.pref = this.constrain (this.calculatePreferredSize (a));\r
525 }return this.pref;\r
526 }, "~N");\r
527 Clazz.defineMethod (c$, "getMaximumSize", \r
528 function (a) {\r
529 if (this.max == -2147483648) {\r
530 this.max = this.constrain (this.calculateMaximumSize (a));\r
531 }return this.max;\r
532 }, "~N");\r
533 Clazz.defineMethod (c$, "setSize", \r
534 function (a, b, c) {\r
535 this.size = c;\r
536 if (c == -2147483648) {\r
537 this.unset ();\r
538 }}, "~N,~N,~N");\r
539 Clazz.defineMethod (c$, "unset", \r
540 function () {\r
541 this.size = this.min = this.pref = this.max = -2147483648;\r
542 });\r
543 Clazz.defineMethod (c$, "getSize", \r
544 function () {\r
545 return this.size;\r
546 });\r
547 Clazz.defineMethod (c$, "constrain", \r
548 function (a) {\r
549 return Math.min (a, 32767);\r
550 }, "~N");\r
551 Clazz.defineMethod (c$, "getBaseline", \r
552 function () {\r
553 return -1;\r
554 });\r
555 Clazz.defineMethod (c$, "getBaselineResizeBehavior", \r
556 function () {\r
557 return java.awt.Component.BaselineResizeBehavior.OTHER;\r
558 });\r
559 Clazz.defineMethod (c$, "isResizable", \r
560 function (a) {\r
561 var b = this.getMinimumSize (a);\r
562 var c = this.getPreferredSize (a);\r
563 return (b != c || c != this.getMaximumSize (a));\r
564 }, "~N");\r
565 c$ = Clazz.p0p ();\r
566 };\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
575 function () {\r
576 Clazz.superConstructor (this, javax.swing.GroupLayout.Group, []);\r
577 this.springs =  new java.util.ArrayList ();\r
578 });\r
579 Clazz.defineMethod (c$, "addGroup", \r
580 function (a) {\r
581 return this.addSpring (a);\r
582 }, "javax.swing.GroupLayout.Group");\r
583 Clazz.defineMethod (c$, "addComponent", \r
584 function (a) {\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
592 function (a) {\r
593 return this.addGap (a, a, a);\r
594 }, "~N");\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
598 }, "~N,~N,~N");\r
599 Clazz.defineMethod (c$, "getSpring", \r
600 function (a) {\r
601 return this.springs.get (a);\r
602 }, "~N");\r
603 Clazz.defineMethod (c$, "indexOf", \r
604 function (a) {\r
605 return this.springs.indexOf (a);\r
606 }, "javax.swing.GroupLayout.Spring");\r
607 Clazz.defineMethod (c$, "addSpring", \r
608 function (a) {\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
613 }return this;\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
621 }\r
622 } else {\r
623 this.setValidSize (a, b, c);\r
624 }}, "~N,~N,~N");\r
625 Clazz.overrideMethod (c$, "calculateMinimumSize", \r
626 function (a) {\r
627 return this.calculateSize (a, 0);\r
628 }, "~N");\r
629 Clazz.overrideMethod (c$, "calculatePreferredSize", \r
630 function (a) {\r
631 return this.calculateSize (a, 1);\r
632 }, "~N");\r
633 Clazz.overrideMethod (c$, "calculateMaximumSize", \r
634 function (a) {\r
635 return this.calculateSize (a, 2);\r
636 }, "~N");\r
637 Clazz.defineMethod (c$, "calculateSize", \r
638 function (a, b) {\r
639 var c = this.springs.size ();\r
640 if (c == 0) {\r
641 return 0;\r
642 }if (c == 1) {\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
647 }\r
648 return d;\r
649 }, "~N,~N");\r
650 Clazz.defineMethod (c$, "getSpringSize", \r
651 function (a, b, c) {\r
652 switch (c) {\r
653 case 0:\r
654 return a.getMinimumSize (b);\r
655 case 1:\r
656 return a.getPreferredSize (b);\r
657 case 2:\r
658 return a.getMaximumSize (b);\r
659 }\r
660 return 0;\r
661 }, "javax.swing.GroupLayout.Spring,~N,~N");\r
662 Clazz.defineMethod (c$, "removeAutopadding", \r
663 function () {\r
664 this.unset ();\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
669 (b).reset ();\r
670 } else {\r
671 this.springs.remove (a);\r
672 }} else if (Clazz.instanceOf (b, javax.swing.GroupLayout.Group)) {\r
673 (b).removeAutopadding ();\r
674 }}\r
675 });\r
676 Clazz.defineMethod (c$, "unsetAutopadding", \r
677 function () {\r
678 this.unset ();\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
682 (b).unset ();\r
683 } else if (Clazz.instanceOf (b, javax.swing.GroupLayout.Group)) {\r
684 (b).unsetAutopadding ();\r
685 }}\r
686 });\r
687 Clazz.defineMethod (c$, "calculateAutopadding", \r
688 function (a) {\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
692 c.unset ();\r
693 (c).calculatePadding (a);\r
694 } else if (Clazz.instanceOf (c, javax.swing.GroupLayout.Group)) {\r
695 (c).calculateAutopadding (a);\r
696 }}\r
697 this.unset ();\r
698 }, "~N");\r
699 Clazz.defineMethod (c$, "willHaveZeroSize", \r
700 function (a) {\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
704 return false;\r
705 }}\r
706 return true;\r
707 }, "~B");\r
708 c$ = Clazz.p0p ();\r
709 };\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
718 function () {\r
719 Clazz.superConstructor (this, javax.swing.GroupLayout.SequentialGroup, []);\r
720 });\r
721 Clazz.defineMethod (c$, "addGroup", \r
722 function (a) {\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
726 function (a, b) {\r
727 Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGroup", [b]);\r
728 if (a) {\r
729 this.baselineSpring = b;\r
730 }return this;\r
731 }, "~B,javax.swing.GroupLayout.Group");\r
732 Clazz.defineMethod (c$, "addComponent", \r
733 function (a) {\r
734 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [a]);\r
735 }, "java.awt.Component");\r
736 Clazz.defineMethod (c$, "addComponent", \r
737 function (a, b) {\r
738 Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addComponent", [b]);\r
739 if (a) {\r
740 this.baselineSpring = this.springs.get (this.springs.size () - 1);\r
741 }return this;\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
750 if (a) {\r
751 this.baselineSpring = this.springs.get (this.springs.size () - 1);\r
752 }return this;\r
753 }, "~B,java.awt.Component,~N,~N,~N");\r
754 Clazz.defineMethod (c$, "addGap", \r
755 function (a) {\r
756 return Clazz.superCall (this, javax.swing.GroupLayout.SequentialGroup, "addGap", [a]);\r
757 }, "~N");\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
761 }, "~N,~N,~N");\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
768 if (c == null) {\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
776 function (a) {\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
788 function () {\r
789 return this.addContainerGap (-1, -1);\r
790 });\r
791 Clazz.defineMethod (c$, "addContainerGap", \r
792 function (a, b) {\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
797 }, "~N,~N");\r
798 Clazz.overrideMethod (c$, "operator", \r
799 function (a, b) {\r
800 return this.constrain (a) + this.constrain (b);\r
801 }, "~N,~N");\r
802 Clazz.overrideMethod (c$, "setValidSize", \r
803 function (a, b, c) {\r
804 var d = this.getPreferredSize (a);\r
805 if (c == d) {\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
809 b += e;\r
810 }\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
816 }}, "~N,~N,~N");\r
817 Clazz.defineMethod (c$, "setValidSizeNotPreferred", \r
818  function (a, b, c) {\r
819 var d = c - this.getPreferredSize (a);\r
820 var e = (d < 0);\r
821 var f = this.springs.size ();\r
822 if (e) {\r
823 d *= -1;\r
824 }var g = this.buildResizableList (a, e);\r
825 var h = g.size ();\r
826 if (h > 0) {\r
827 var i = Clazz.doubleToInt (d / h);\r
828 var j = d - i * 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
832 var n = g.get (m);\r
833 if ((m + 1) == h) {\r
834 i += j;\r
835 }n.delta = Math.min (i, n.delta);\r
836 d -= 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
841 }\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
846 b += p;\r
847 }\r
848 } else {\r
849 for (var i = 0; i < f; i++) {\r
850 var j = this.getSpring (i);\r
851 var k;\r
852 if (e) {\r
853 k = j.getMinimumSize (a);\r
854 } else {\r
855 k = j.getMaximumSize (a);\r
856 }j.setSize (a, b, k);\r
857 b += k;\r
858 }\r
859 }}, "~N,~N,~N");\r
860 Clazz.defineMethod (c$, "buildResizableList", \r
861  function (a, b) {\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
866 var g;\r
867 if (b) {\r
868 g = f.getPreferredSize (a) - f.getMinimumSize (a);\r
869 } else {\r
870 g = f.getMaximumSize (a) - f.getPreferredSize (a);\r
871 }if (g > 0) {\r
872 d.add ( new javax.swing.GroupLayout.SpringDelta (e, g));\r
873 }}\r
874 java.util.Collections.sort (d);\r
875 return d;\r
876 }, "~N,~B");\r
877 Clazz.defineMethod (c$, "indexOfNextNonZeroSpring", \r
878  function (a, b) {\r
879 while (a < this.springs.size ()) {\r
880 var c = this.springs.get (a);\r
881 if (!c.willHaveZeroSize (b)) {\r
882 return a;\r
883 }a++;\r
884 }\r
885 return a;\r
886 }, "~N,~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
892 var j = null;\r
893 var k = 0;\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
898 var m = l;\r
899 m.setSources (i);\r
900 i.clear ();\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
904 c.add (m);\r
905 }} else {\r
906 g.clear ();\r
907 g.add (m);\r
908 }} else {\r
909 k = this.indexOfNextNonZeroSpring (k + 1, true);\r
910 }} else {\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
914 continue;\r
915 }if (Clazz.instanceOf (l, javax.swing.GroupLayout.ComponentSpring)) {\r
916 var m = l;\r
917 if (!m.isVisible ()) {\r
918 k++;\r
919 continue;\r
920 }for (var gapSpring, $gapSpring = g.iterator (); $gapSpring.hasNext () && ((gapSpring = $gapSpring.next ()) || true);) {\r
921 gapSpring.addTarget (m, a);\r
922 }\r
923 i.clear ();\r
924 g.clear ();\r
925 k = this.indexOfNextNonZeroSpring (k + 1, false);\r
926 if (k == this.springs.size ()) {\r
927 e.add (m);\r
928 } else {\r
929 i.add (m);\r
930 }} else if (Clazz.instanceOf (l, javax.swing.GroupLayout.Group)) {\r
931 if (j == null) {\r
932 j =  new java.util.ArrayList (1);\r
933 } else {\r
934 j.clear ();\r
935 }h.clear ();\r
936 (l).insertAutopadding (a, g, h, i, j, f);\r
937 i.clear ();\r
938 g.clear ();\r
939 k = this.indexOfNextNonZeroSpring (k + 1, (j.size () == 0));\r
940 if (k == this.springs.size ()) {\r
941 e.addAll (j);\r
942 c.addAll (h);\r
943 } else {\r
944 i.addAll (j);\r
945 g.addAll (h);\r
946 }} else {\r
947 g.clear ();\r
948 i.clear ();\r
949 k++;\r
950 }}}\r
951 }, "~N,java.util.List,java.util.List,java.util.List,java.util.List,~B");\r
952 Clazz.defineMethod (c$, "getBaseline", \r
953 function () {\r
954 if (this.baselineSpring != null) {\r
955 var a = this.baselineSpring.getBaseline ();\r
956 if (a >= 0) {\r
957 var b = 0;\r
958 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {\r
959 if (spring === this.baselineSpring) {\r
960 return b + a;\r
961 } else {\r
962 b += spring.getPreferredSize (1);\r
963 }}\r
964 }}return -1;\r
965 });\r
966 Clazz.defineMethod (c$, "getBaselineResizeBehavior", \r
967 function () {\r
968 if (this.isResizable (1)) {\r
969 if (!this.baselineSpring.isResizable (1)) {\r
970 var a = false;\r
971 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {\r
972 if (spring === this.baselineSpring) {\r
973 break;\r
974 } else if (spring.isResizable (1)) {\r
975 a = true;\r
976 break;\r
977 }}\r
978 var b = false;\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
982 break;\r
983 }if (d.isResizable (1)) {\r
984 b = true;\r
985 break;\r
986 }}\r
987 if (a && !b) {\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
991 }} else {\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
999 }}\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
1007 }}\r
1008 }}return java.awt.Component.BaselineResizeBehavior.OTHER;\r
1009 }return java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT;\r
1010 });\r
1011 Clazz.defineMethod (c$, "checkPreferredGapValues", \r
1012  function (a, b) {\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
1015 }}, "~N,~N");\r
1016 c$ = Clazz.p0p ();\r
1017 };\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
1027 function (a, b) {\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
1033 function (a) {\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
1037 function (a) {\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
1045 function (a) {\r
1046 return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "addGap", [a]);\r
1047 }, "~N");\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
1051 }, "~N,~N,~N");\r
1052 Clazz.defineMethod (c$, "addGroup", \r
1053 function (a, b) {\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
1059 function (a, b) {\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
1070 function () {\r
1071 return this.resizable;\r
1072 });\r
1073 Clazz.overrideMethod (c$, "operator", \r
1074 function (a, b) {\r
1075 return Math.max (a, b);\r
1076 }, "~N,~N");\r
1077 Clazz.defineMethod (c$, "calculateMinimumSize", \r
1078 function (a) {\r
1079 if (!this.isResizable ()) {\r
1080 return this.getPreferredSize (a);\r
1081 }return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "calculateMinimumSize", [a]);\r
1082 }, "~N");\r
1083 Clazz.defineMethod (c$, "calculateMaximumSize", \r
1084 function (a) {\r
1085 if (!this.isResizable ()) {\r
1086 return this.getPreferredSize (a);\r
1087 }return Clazz.superCall (this, javax.swing.GroupLayout.ParallelGroup, "calculateMaximumSize", [a]);\r
1088 }, "~N");\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
1093 }\r
1094 }, "~N,~N,~N");\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
1099 if (e == null) {\r
1100 e = this.childAlignment;\r
1101 }switch (e) {\r
1102 case javax.swing.GroupLayout.Alignment.TRAILING:\r
1103 a.setSize (b, c + d - f, f);\r
1104 break;\r
1105 case javax.swing.GroupLayout.Alignment.CENTER:\r
1106 a.setSize (b, c + Clazz.doubleToInt ((d - f) / 2), f);\r
1107 break;\r
1108 default:\r
1109 a.setSize (b, c, f);\r
1110 break;\r
1111 }\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
1120 }\r
1121 e.add (spring);\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
1126 c.add (spring);\r
1127 }}\r
1128 }, "~N,java.util.List,java.util.List,java.util.List,java.util.List,~B");\r
1129 Clazz.defineMethod (c$, "checkChildAlignment", \r
1130  function (a) {\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
1134  function (a, b) {\r
1135 if (a == null) {\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
1141 };\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
1155 function (a) {\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
1159 }, "~B");\r
1160 Clazz.makeConstructor (c$, \r
1161 function (a, b) {\r
1162 this.construct (a);\r
1163 this.baselineAnchoredToTop = b;\r
1164 this.baselineAnchorSet = true;\r
1165 }, "~B,~B");\r
1166 Clazz.defineMethod (c$, "unset", \r
1167 function () {\r
1168 Clazz.superCall (this, javax.swing.GroupLayout.BaselineGroup, "unset", []);\r
1169 this.prefAscent = this.prefDescent = -1;\r
1170 this.calcedBaseline = false;\r
1171 });\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
1177 } else {\r
1178 this.baselineLayout (b, c);\r
1179 }}, "~N,~N,~N");\r
1180 Clazz.defineMethod (c$, "calculateSize", \r
1181 function (a, b) {\r
1182 this.checkAxis (a);\r
1183 if (!this.calcedBaseline) {\r
1184 this.calculateBaselineAndResizeBehavior ();\r
1185 }if (b == 0) {\r
1186 return this.calculateMinSize ();\r
1187 }if (b == 2) {\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
1192 }, "~N,~N");\r
1193 Clazz.defineMethod (c$, "calculateBaselineAndResizeBehavior", \r
1194  function () {\r
1195 this.prefAscent = 0;\r
1196 this.prefDescent = 0;\r
1197 var a = 0;\r
1198 var b = null;\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
1202 if (c >= 0) {\r
1203 if (spring.isResizable (1)) {\r
1204 var d = spring.getBaselineResizeBehavior ();\r
1205 if (b == null) {\r
1206 b = d;\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
1211 a++;\r
1212 }}}\r
1213 if (!this.baselineAnchorSet) {\r
1214 if (b === java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT) {\r
1215 this.baselineAnchoredToTop = false;\r
1216 } else {\r
1217 this.baselineAnchoredToTop = true;\r
1218 }}this.allSpringsHaveBaseline = (a == this.springs.size ());\r
1219 this.calcedBaseline = true;\r
1220 });\r
1221 Clazz.defineMethod (c$, "calculateMaxSize", \r
1222  function () {\r
1223 var a = this.prefAscent;\r
1224 var b = this.prefDescent;\r
1225 var c = 0;\r
1226 for (var spring, $spring = this.springs.iterator (); $spring.hasNext () && ((spring = $spring.next ()) || true);) {\r
1227 var d;\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
1231 if (f != e) {\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
1236 }break;\r
1237 case java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT:\r
1238 if (!this.baselineAnchoredToTop) {\r
1239 a = Math.max (a, e - f + d);\r
1240 }break;\r
1241 default:\r
1242 break;\r
1243 }\r
1244 }} else {\r
1245 c = Math.max (c, e);\r
1246 }}\r
1247 return Math.max (c, a + b);\r
1248 });\r
1249 Clazz.defineMethod (c$, "calculateMinSize", \r
1250  function () {\r
1251 var a = 0;\r
1252 var b = 0;\r
1253 var c = 0;\r
1254 if (this.baselineAnchoredToTop) {\r
1255 a = this.prefAscent;\r
1256 } else {\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
1260 var e;\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
1264 switch (g) {\r
1265 case java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT:\r
1266 if (this.baselineAnchoredToTop) {\r
1267 b = Math.max (d - e, b);\r
1268 } else {\r
1269 a = Math.max (e, a);\r
1270 }break;\r
1271 case java.awt.Component.BaselineResizeBehavior.CONSTANT_DESCENT:\r
1272 if (!this.baselineAnchoredToTop) {\r
1273 a = Math.max (e - (f - d), a);\r
1274 } else {\r
1275 b = Math.max (f - e, b);\r
1276 }break;\r
1277 default:\r
1278 a = Math.max (e, a);\r
1279 b = Math.max (f - e, b);\r
1280 break;\r
1281 }\r
1282 } else {\r
1283 c = Math.max (c, d);\r
1284 }}\r
1285 return Math.max (c, a + b);\r
1286 });\r
1287 Clazz.defineMethod (c$, "baselineLayout", \r
1288  function (a, b) {\r
1289 var c;\r
1290 var d;\r
1291 if (this.baselineAnchoredToTop) {\r
1292 c = this.prefAscent;\r
1293 d = b - c;\r
1294 } else {\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
1301 if (f >= 0) {\r
1302 var g = spring.getMaximumSize (1);\r
1303 var h = spring.getPreferredSize (1);\r
1304 var i = h;\r
1305 var j;\r
1306 switch (spring.getBaselineResizeBehavior ()) {\r
1307 case java.awt.Component.BaselineResizeBehavior.CONSTANT_ASCENT:\r
1308 j = a + c - f;\r
1309 i = Math.min (d, g - f) + f;\r
1310 break;\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
1314 break;\r
1315 default:\r
1316 j = a + c - f;\r
1317 break;\r
1318 }\r
1319 spring.setSize (1, j, i);\r
1320 } else {\r
1321 this.setChildSize (spring, 1, a, b);\r
1322 }} else {\r
1323 this.setChildSize (spring, 1, a, b);\r
1324 }}\r
1325 }, "~N,~N");\r
1326 Clazz.defineMethod (c$, "getBaseline", \r
1327 function () {\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
1333 }return -1;\r
1334 });\r
1335 Clazz.defineMethod (c$, "getBaselineResizeBehavior", \r
1336 function () {\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
1342 });\r
1343 Clazz.defineMethod (c$, "checkAxis", \r
1344  function (a) {\r
1345 if (a == 0) {\r
1346 throw  new IllegalStateException ("Baseline must be used along vertical axis");\r
1347 }}, "~N");\r
1348 c$ = Clazz.p0p ();\r
1349 };\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
1355 this.origin = 0;\r
1356 this.$min = 0;\r
1357 this.$pref = 0;\r
1358 this.$max = 0;\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
1367 if (a == null) {\r
1368 throw  new IllegalArgumentException ("Component must be non-null");\r
1369 }javax.swing.GroupLayout.checkSize (b, c, d, true);\r
1370 this.$min = b;\r
1371 this.$max = d;\r
1372 this.$pref = c;\r
1373 this.b$["javax.swing.GroupLayout"].getComponentInfo (a);\r
1374 }, "java.awt.Component,~N,~N,~N");\r
1375 Clazz.overrideMethod (c$, "calculateMinimumSize", \r
1376 function (a) {\r
1377 if (this.isLinked (a)) {\r
1378 return this.getLinkSize (a, 0);\r
1379 }return this.calculateNonlinkedMinimumSize (a);\r
1380 }, "~N");\r
1381 Clazz.overrideMethod (c$, "calculatePreferredSize", \r
1382 function (a) {\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
1389 }, "~N");\r
1390 Clazz.overrideMethod (c$, "calculateMaximumSize", \r
1391 function (a) {\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
1395 }, "~N");\r
1396 Clazz.defineMethod (c$, "isVisible", \r
1397 function () {\r
1398 return this.b$["javax.swing.GroupLayout"].getComponentInfo (this.getComponent ()).isVisible ();\r
1399 });\r
1400 Clazz.defineMethod (c$, "calculateNonlinkedMinimumSize", \r
1401 function (a) {\r
1402 if (!this.isVisible ()) {\r
1403 return 0;\r
1404 }if (this.$min >= 0) {\r
1405 return this.$min;\r
1406 }if (this.$min == -2) {\r
1407 return this.calculateNonlinkedPreferredSize (a);\r
1408 }return this.getSizeAlongAxis (a, this.component.getMinimumSize ());\r
1409 }, "~N");\r
1410 Clazz.defineMethod (c$, "calculateNonlinkedPreferredSize", \r
1411 function (a) {\r
1412 if (!this.isVisible ()) {\r
1413 return 0;\r
1414 }if (this.$pref >= 0) {\r
1415 return this.$pref;\r
1416 }return this.getSizeAlongAxis (a, this.component.getPreferredSize ());\r
1417 }, "~N");\r
1418 Clazz.defineMethod (c$, "calculateNonlinkedMaximumSize", \r
1419 function (a) {\r
1420 if (!this.isVisible ()) {\r
1421 return 0;\r
1422 }if (this.$max >= 0) {\r
1423 return this.$max;\r
1424 }if (this.$max == -2) {\r
1425 return this.calculateNonlinkedPreferredSize (a);\r
1426 }return this.getSizeAlongAxis (a, this.component.getMaximumSize ());\r
1427 }, "~N");\r
1428 Clazz.defineMethod (c$, "getSizeAlongAxis", \r
1429  function (a, b) {\r
1430 return (a == 0) ? b.width : b.height;\r
1431 }, "~N,java.awt.Dimension");\r
1432 Clazz.defineMethod (c$, "getLinkSize", \r
1433  function (a, b) {\r
1434 if (!this.isVisible ()) {\r
1435 return 0;\r
1436 }var c = this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component);\r
1437 return c.getLinkSize (a, b);\r
1438 }, "~N,~N");\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
1442 this.origin = b;\r
1443 if (c == -2147483648) {\r
1444 this.baseline = -1;\r
1445 }}, "~N,~N,~N");\r
1446 Clazz.defineMethod (c$, "getOrigin", \r
1447 function () {\r
1448 return this.origin;\r
1449 });\r
1450 Clazz.defineMethod (c$, "setComponent", \r
1451 function (a) {\r
1452 this.component = a;\r
1453 }, "java.awt.Component");\r
1454 Clazz.defineMethod (c$, "getComponent", \r
1455 function () {\r
1456 return this.component;\r
1457 });\r
1458 Clazz.overrideMethod (c$, "getBaseline", \r
1459 function () {\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
1467 });\r
1468 Clazz.overrideMethod (c$, "getBaselineResizeBehavior", \r
1469 function () {\r
1470 return this.getComponent ().getBaselineResizeBehavior ();\r
1471 });\r
1472 Clazz.defineMethod (c$, "isLinked", \r
1473  function (a) {\r
1474 return this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).isLinked (a);\r
1475 }, "~N");\r
1476 Clazz.defineMethod (c$, "installIfNecessary", \r
1477 function (a) {\r
1478 if (!this.installed) {\r
1479 this.installed = true;\r
1480 if (a == 0) {\r
1481 this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).horizontalSpring = this;\r
1482 } else {\r
1483 this.b$["javax.swing.GroupLayout"].getComponentInfo (this.component).verticalSpring = this;\r
1484 }}}, "~N");\r
1485 Clazz.overrideMethod (c$, "willHaveZeroSize", \r
1486 function (a) {\r
1487 return !this.isVisible ();\r
1488 }, "~B");\r
1489 c$ = Clazz.p0p ();\r
1490 };\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
1497 this.type = null;\r
1498 this.$pref = 0;\r
1499 this.$max = 0;\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
1505 this.source = a;\r
1506 this.target = b;\r
1507 this.type = c;\r
1508 this.$pref = d;\r
1509 this.$max = e;\r
1510 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,~N");\r
1511 Clazz.overrideMethod (c$, "calculateMinimumSize", \r
1512 function (a) {\r
1513 return this.getPadding (a);\r
1514 }, "~N");\r
1515 Clazz.overrideMethod (c$, "calculatePreferredSize", \r
1516 function (a) {\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
1522 }, "~N");\r
1523 Clazz.overrideMethod (c$, "calculateMaximumSize", \r
1524 function (a) {\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
1528 }, "~N");\r
1529 Clazz.defineMethod (c$, "getPadding", \r
1530  function (a) {\r
1531 var b;\r
1532 if (a == 0) {\r
1533 b = 3;\r
1534 } else {\r
1535 b = 5;\r
1536 }return this.b$["javax.swing.GroupLayout"].getLayoutStyle0 ().getPreferredGap (this.source, this.target, this.type, b, this.b$["javax.swing.GroupLayout"].host);\r
1537 }, "~N");\r
1538 Clazz.overrideMethod (c$, "willHaveZeroSize", \r
1539 function (a) {\r
1540 return false;\r
1541 }, "~B");\r
1542 c$ = Clazz.p0p ();\r
1543 };\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
1548 this.$min = 0;\r
1549 this.$pref = 0;\r
1550 this.$max = 0;\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
1557 this.$min = a;\r
1558 this.$pref = b;\r
1559 this.$max = c;\r
1560 }, "~N,~N,~N");\r
1561 Clazz.overrideMethod (c$, "calculateMinimumSize", \r
1562 function (a) {\r
1563 if (this.$min == -2) {\r
1564 return this.getPreferredSize (a);\r
1565 }return this.$min;\r
1566 }, "~N");\r
1567 Clazz.overrideMethod (c$, "calculatePreferredSize", \r
1568 function (a) {\r
1569 return this.$pref;\r
1570 }, "~N");\r
1571 Clazz.overrideMethod (c$, "calculateMaximumSize", \r
1572 function (a) {\r
1573 if (this.$max == -2) {\r
1574 return this.getPreferredSize (a);\r
1575 }return this.$max;\r
1576 }, "~N");\r
1577 Clazz.overrideMethod (c$, "willHaveZeroSize", \r
1578 function (a) {\r
1579 return false;\r
1580 }, "~B");\r
1581 c$ = Clazz.p0p ();\r
1582 };\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
1590 this.$size = 0;\r
1591 this.lastSize = 0;\r
1592 this.$pref = 0;\r
1593 this.$max = 0;\r
1594 this.type = null;\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
1599  function () {\r
1600 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);\r
1601 this.$pref = -2;\r
1602 this.$max = -2;\r
1603 this.type = javax.swing.LayoutStyle.ComponentPlacement.RELATED;\r
1604 });\r
1605 Clazz.makeConstructor (c$, \r
1606 function (a, b) {\r
1607 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);\r
1608 this.$pref = a;\r
1609 this.$max = b;\r
1610 }, "~N,~N");\r
1611 Clazz.makeConstructor (c$, \r
1612 function (a, b, c) {\r
1613 Clazz.superConstructor (this, javax.swing.GroupLayout.AutoPreferredGapSpring, []);\r
1614 this.type = a;\r
1615 this.$pref = b;\r
1616 this.$max = c;\r
1617 this.userCreated = true;\r
1618 }, "javax.swing.LayoutStyle.ComponentPlacement,~N,~N");\r
1619 Clazz.defineMethod (c$, "setSources", \r
1620 function (a) {\r
1621 this.sources =  new java.util.ArrayList (a);\r
1622 }, "java.util.List");\r
1623 Clazz.defineMethod (c$, "setUserCreated", \r
1624 function (a) {\r
1625 this.userCreated = a;\r
1626 }, "~B");\r
1627 Clazz.defineMethod (c$, "getUserCreated", \r
1628 function () {\r
1629 return this.userCreated;\r
1630 });\r
1631 Clazz.defineMethod (c$, "unset", \r
1632 function () {\r
1633 this.lastSize = this.getSize ();\r
1634 Clazz.superCall (this, javax.swing.GroupLayout.AutoPreferredGapSpring, "unset", []);\r
1635 this.$size = 0;\r
1636 });\r
1637 Clazz.defineMethod (c$, "reset", \r
1638 function () {\r
1639 this.$size = 0;\r
1640 this.sources = null;\r
1641 this.source = null;\r
1642 this.matches = null;\r
1643 });\r
1644 Clazz.defineMethod (c$, "calculatePadding", \r
1645 function (a) {\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
1650 var d;\r
1651 if (a == 0) {\r
1652 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {\r
1653 d = 3;\r
1654 } else {\r
1655 d = 7;\r
1656 }} else {\r
1657 d = 5;\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
1661 }\r
1662 }if (this.$size == -2147483648) {\r
1663 this.$size = 0;\r
1664 }if (b == -2147483648) {\r
1665 b = 0;\r
1666 }if (this.lastSize != -2147483648) {\r
1667 this.$size += Math.min (b, this.lastSize);\r
1668 }}, "~N");\r
1669 Clazz.defineMethod (c$, "calculatePadding", \r
1670  function (a, b, c, d) {\r
1671 var e = d.getOrigin () - (c.getOrigin () + c.getSize ());\r
1672 if (e >= 0) {\r
1673 var f;\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
1676 } else {\r
1677 f = 10;\r
1678 }if (f > e) {\r
1679 this.$size = Math.max (this.$size, f - e);\r
1680 }return f;\r
1681 }return 0;\r
1682 }, "javax.swing.LayoutStyle,~N,javax.swing.GroupLayout.ComponentSpring,javax.swing.GroupLayout.ComponentSpring");\r
1683 Clazz.defineMethod (c$, "addTarget", \r
1684 function (a, b) {\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
1689 }} else {\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
1695 }}\r
1696 }}, "javax.swing.GroupLayout.ComponentSpring,~N");\r
1697 Clazz.defineMethod (c$, "addValidTarget", \r
1698  function (a, b) {\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
1704 function (a) {\r
1705 return this.$size;\r
1706 }, "~N");\r
1707 Clazz.overrideMethod (c$, "calculatePreferredSize", \r
1708 function (a) {\r
1709 if (this.$pref == -2 || this.$pref == -1) {\r
1710 return this.$size;\r
1711 }return Math.max (this.$size, this.$pref);\r
1712 }, "~N");\r
1713 Clazz.overrideMethod (c$, "calculateMaximumSize", \r
1714 function (a) {\r
1715 if (this.$max >= 0) {\r
1716 return Math.max (this.getPreferredSize (a), this.$max);\r
1717 }return this.$size;\r
1718 }, "~N");\r
1719 Clazz.defineMethod (c$, "getMatchDescription", \r
1720 function () {\r
1721 return (this.matches == null) ? "" : this.matches.toString ();\r
1722 });\r
1723 Clazz.defineMethod (c$, "toString", \r
1724 function () {\r
1725 return Clazz.superCall (this, javax.swing.GroupLayout.AutoPreferredGapSpring, "toString", []) + this.getMatchDescription ();\r
1726 });\r
1727 Clazz.overrideMethod (c$, "willHaveZeroSize", \r
1728 function (a) {\r
1729 return a;\r
1730 }, "~B");\r
1731 c$ = Clazz.p0p ();\r
1732 };\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
1741 function () {\r
1742 Clazz.superConstructor (this, javax.swing.GroupLayout.ContainerAutoPreferredGapSpring);\r
1743 this.setUserCreated (true);\r
1744 });\r
1745 Clazz.makeConstructor (c$, \r
1746 function (a, b) {\r
1747 Clazz.superConstructor (this, javax.swing.GroupLayout.ContainerAutoPreferredGapSpring, [a, b]);\r
1748 this.setUserCreated (true);\r
1749 }, "~N,~N");\r
1750 Clazz.overrideMethod (c$, "addTarget", \r
1751 function (a, b) {\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
1757 function (a) {\r
1758 var $private = Clazz.checkPrivateMethod (arguments);\r
1759 if ($private != null) {\r
1760 return $private.apply (this, arguments);\r
1761 }\r
1762 var b = this.b$["javax.swing.GroupLayout"].getLayoutStyle0 ();\r
1763 var c = 0;\r
1764 var d;\r
1765 this.$size = 0;\r
1766 if (this.targets != null) {\r
1767 if (a == 0) {\r
1768 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {\r
1769 d = 7;\r
1770 } else {\r
1771 d = 3;\r
1772 }} else {\r
1773 d = 5;\r
1774 }for (var e = this.targets.size () - 1; e >= 0; e--) {\r
1775 var f = this.targets.get (e);\r
1776 var g = 10;\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
1781 } else {\r
1782 c = Math.max (g, c);\r
1783 }this.$size = Math.max (this.$size, g);\r
1784 }\r
1785 } else {\r
1786 if (a == 0) {\r
1787 if (this.b$["javax.swing.GroupLayout"].isLeftToRight ()) {\r
1788 d = 3;\r
1789 } else {\r
1790 d = 7;\r
1791 }} else {\r
1792 d = 5;\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
1797 }\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
1802 }}, "~N");\r
1803 Clazz.defineMethod (c$, "updateSize", \r
1804  function (a, b, c) {\r
1805 var d = 10;\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
1810 return d;\r
1811 }, "javax.swing.LayoutStyle,javax.swing.GroupLayout.ComponentSpring,~N");\r
1812 Clazz.overrideMethod (c$, "getMatchDescription", \r
1813 function () {\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
1818 }return "--";\r
1819 });\r
1820 c$ = Clazz.p0p ();\r
1821 };\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
1836 function (a) {\r
1837 this.component = a;\r
1838 this.updateVisibility ();\r
1839 }, "java.awt.Component");\r
1840 Clazz.defineMethod (c$, "dispose", \r
1841 function () {\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
1850 }});\r
1851 Clazz.defineMethod (c$, "setHonorsVisibility", \r
1852 function (a) {\r
1853 this.honorsVisibility = a;\r
1854 }, "Boolean");\r
1855 Clazz.defineMethod (c$, "removeSpring", \r
1856  function (a) {\r
1857 if (a != null) {\r
1858 (a.getParent ()).springs.remove (a);\r
1859 }}, "javax.swing.GroupLayout.Spring");\r
1860 Clazz.defineMethod (c$, "isVisible", \r
1861 function () {\r
1862 return this.visible;\r
1863 });\r
1864 Clazz.defineMethod (c$, "updateVisibility", \r
1865 function () {\r
1866 var a;\r
1867 if (this.honorsVisibility == null) {\r
1868 a = this.b$["javax.swing.GroupLayout"].getHonorsVisibility ();\r
1869 } else {\r
1870 a = (this.honorsVisibility).booleanValue ();\r
1871 }var b = (a) ? this.component.isVisible () : true;\r
1872 if (this.visible != b) {\r
1873 this.visible = b;\r
1874 return true;\r
1875 }return false;\r
1876 });\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
1883 if (!c) {\r
1884 d = b - d - e;\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
1888 function (a) {\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
1896 function (a) {\r
1897 if (a == 0) {\r
1898 return this.horizontalMaster != null;\r
1899 }return (this.verticalMaster != null);\r
1900 }, "~N");\r
1901 Clazz.defineMethod (c$, "setLinkInfo", \r
1902  function (a, b) {\r
1903 if (a == 0) {\r
1904 this.horizontalMaster = b;\r
1905 } else {\r
1906 this.verticalMaster = b;\r
1907 }}, "~N,javax.swing.GroupLayout.LinkInfo");\r
1908 Clazz.defineMethod (c$, "getLinkInfo", \r
1909 function (a) {\r
1910 return this.getLinkInfo (a, true);\r
1911 }, "~N");\r
1912 Clazz.defineMethod (c$, "getLinkInfo", \r
1913  function (a, b) {\r
1914 if (a == 0) {\r
1915 if (this.horizontalMaster == null && b) {\r
1916  new javax.swing.GroupLayout.LinkInfo (0).add (this);\r
1917 }return this.horizontalMaster;\r
1918 } else {\r
1919 if (this.verticalMaster == null && b) {\r
1920  new javax.swing.GroupLayout.LinkInfo (1).add (this);\r
1921 }return this.verticalMaster;\r
1922 }}, "~N,~B");\r
1923 Clazz.defineMethod (c$, "clearCachedSize", \r
1924 function () {\r
1925 if (this.horizontalMaster != null) {\r
1926 this.horizontalMaster.clearCachedSize ();\r
1927 }if (this.verticalMaster != null) {\r
1928 this.verticalMaster.clearCachedSize ();\r
1929 }});\r
1930 Clazz.defineMethod (c$, "getLinkSize", \r
1931 function (a, b) {\r
1932 if (a == 0) {\r
1933 return this.horizontalMaster.getSize (a);\r
1934 } else {\r
1935 return this.verticalMaster.getSize (a);\r
1936 }}, "~N,~N");\r
1937 c$ = Clazz.p0p ();\r
1938 };\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
1948 this.index = 0;\r
1949 this.delta = 0;\r
1950 Clazz.instantialize (this, arguments);\r
1951 }, javax.swing.GroupLayout, "SpringDelta", null, Comparable);\r
1952 Clazz.makeConstructor (c$, \r
1953 function (a, b) {\r
1954 this.index = a;\r
1955 this.delta = b;\r
1956 }, "~N,~N");\r
1957 Clazz.overrideMethod (c$, "compareTo", \r
1958 function (a) {\r
1959 return this.delta - a.delta;\r
1960 }, "javax.swing.GroupLayout.SpringDelta");\r
1961 Clazz.defineMethod (c$, "toString", \r
1962 function () {\r
1963 return Clazz.superCall (this, javax.swing.GroupLayout.SpringDelta, "toString", []) + "[index=" + this.index + ", delta=" + this.delta + "]";\r
1964 });\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
1973 function (a, b) {\r
1974 this.source = a;\r
1975 this.target = b;\r
1976 }, "javax.swing.GroupLayout.ComponentSpring,javax.swing.GroupLayout.ComponentSpring");\r
1977 Clazz.defineMethod (c$, "toString", \r
1978  function (a) {\r
1979 return a.getComponent ().getName ();\r
1980 }, "javax.swing.GroupLayout.ComponentSpring");\r
1981 Clazz.defineMethod (c$, "toString", \r
1982 function () {\r
1983 return "[" + this.toString (this.source) + "-" + this.toString (this.target) + "]";\r
1984 });\r
1985 c$ = Clazz.p0p ();\r
1986 Clazz.pu$h(self.c$);\r
1987 c$ = Clazz.decorateAsClass (function () {\r
1988 this.axis = 0;\r
1989 this.linked = null;\r
1990 this.size = 0;\r
1991 Clazz.instantialize (this, arguments);\r
1992 }, javax.swing.GroupLayout, "LinkInfo");\r
1993 Clazz.makeConstructor (c$, \r
1994 function (a) {\r
1995 this.linked =  new java.util.ArrayList ();\r
1996 this.size = -2147483648;\r
1997 this.axis = a;\r
1998 }, "~N");\r
1999 Clazz.defineMethod (c$, "add", \r
2000 function (a) {\r
2001 var b = a.getLinkInfo (this.axis, false);\r
2002 if (b == null) {\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
2009 }\r
2010 }this.clearCachedSize ();\r
2011 }, "javax.swing.GroupLayout.ComponentInfo");\r
2012 Clazz.defineMethod (c$, "remove", \r
2013 function (a) {\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
2021 function () {\r
2022 this.size = -2147483648;\r
2023 });\r
2024 Clazz.defineMethod (c$, "getSize", \r
2025 function (a) {\r
2026 if (this.size == -2147483648) {\r
2027 this.size = this.calculateLinkedSize (a);\r
2028 }return this.size;\r
2029 }, "~N");\r
2030 Clazz.defineMethod (c$, "calculateLinkedSize", \r
2031  function (a) {\r
2032 var b = 0;\r
2033 for (var info, $info = this.linked.iterator (); $info.hasNext () && ((info = $info.next ()) || true);) {\r
2034 var c;\r
2035 if (a == 0) {\r
2036 c = info.horizontalSpring;\r
2037 } else {\r
2038 c = info.verticalSpring;\r
2039 }b = Math.max (b, c.calculateNonlinkedPreferredSize (a));\r
2040 }\r
2041 return b;\r
2042 }, "~N");\r
2043 c$ = Clazz.p0p ();\r
2044 Clazz.defineStatics (c$,\r
2045 "MIN_SIZE", 0,\r
2046 "PREF_SIZE", 1,\r
2047 "MAX_SIZE", 2,\r
2048 "SPECIFIC_SIZE", 3,\r
2049 "UNSET", -2147483648,\r
2050 "DEFAULT_SIZE", -1,\r
2051 "PREFERRED_SIZE", -2);\r
2052 });\r