KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > form > layoutdesign > ALT_ParallelPosition20Test


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.form.layoutdesign;
21
22 import java.awt.Dimension JavaDoc;
23 import java.awt.Point JavaDoc;
24 import java.awt.Rectangle JavaDoc;
25 import java.io.File JavaDoc;
26 import java.io.IOException JavaDoc;
27 import java.util.*;
28 import org.openide.filesystems.FileUtil;
29
30 // Testing parallel group creation with suppressed resizing. Unlike in test 19
31
// here the resizing components span only fixed area.
32
public class ALT_ParallelPosition20Test extends LayoutTestCase {
33
34     public ALT_ParallelPosition20Test(String JavaDoc name) {
35         super(name);
36         try {
37         className = this.getClass().getName();
38         className = className.substring(className.lastIndexOf('.') + 1, className.length());
39             startingFormFile = FileUtil.toFileObject(new File JavaDoc(url.getFile() + goldenFilesPath + className + "-StartingForm.form").getCanonicalFile());
40         } catch (IOException JavaDoc ioe) {
41             fail(ioe.toString());
42         }
43     }
44
45     // Create starting situation - three textfields in the middle (anchored to
46
// the right), one list at the right border.
47
public void doChanges0() {
48         ld.externalSizeChangeHappened();
49         // > UPDATE CURRENT STATE
50
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
51         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
52         ld.updateCurrentState();
53         // < UPDATE CURRENT STATE
54
lc = new LayoutComponent("jTextField1", false);
55         // > START ADDING
56
baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
57         {
58             LayoutComponent[] comps = new LayoutComponent[] { lc };
59             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
60                 new Rectangle JavaDoc(0, 0, 59, 20)
61                 };
62             String JavaDoc defaultContId = null;
63             Point JavaDoc hotspot = new Point JavaDoc(25,10);
64             ld.startAdding(comps, bounds, hotspot, defaultContId);
65         }
66         // < START ADDING
67
prefPaddingInParent.put("Form-jTextField1-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
68
prefPaddingInParent.put("Form-jTextField1-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
69
prefPaddingInParent.put("Form-jTextField1-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
70
prefPaddingInParent.put("Form-jTextField1-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
71
// > MOVE
72
{
73             Point JavaDoc p = new Point JavaDoc(213,27);
74             String JavaDoc containerId= "Form";
75             boolean autoPositioning = true;
76             boolean lockDimension = false;
77             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
78                 new Rectangle JavaDoc(188, 11, 59, 20)
79                 };
80             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
81         }
82         // < MOVE
83
prefPaddingInParent.put("Form-jTextField1-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
84
prefPaddingInParent.put("Form-jTextField1-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
85
prefPaddingInParent.put("Form-jTextField1-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
86
prefPaddingInParent.put("Form-jTextField1-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
87
// > MOVE
88
{
89             Point JavaDoc p = new Point JavaDoc(212,27);
90             String JavaDoc containerId= "Form";
91             boolean autoPositioning = true;
92             boolean lockDimension = false;
93             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
94                 new Rectangle JavaDoc(187, 11, 59, 20)
95                 };
96             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
97         }
98         // < MOVE
99
// > END MOVING
100
compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
101         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
102         prefPaddingInParent.put("Form-jTextField1-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
103
prefPaddingInParent.put("Form-jTextField1-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
104
prefPaddingInParent.put("Form-jTextField1-1-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
105
ld.endMoving(true);
106         // < END MOVING
107
ld.externalSizeChangeHappened();
108         // > UPDATE CURRENT STATE
109
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
110         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 59, 20));
111         baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
112         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
113         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
114         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 59, 20));
115         baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
116         ld.updateCurrentState();
117         // < UPDATE CURRENT STATE
118
lc = new LayoutComponent("jTextField2", false);
119         // > START ADDING
120
baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
121         {
122             LayoutComponent[] comps = new LayoutComponent[] { lc };
123             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
124                 new Rectangle JavaDoc(187, 11, 59, 20)
125                 };
126             String JavaDoc defaultContId= "Form";
127             Point JavaDoc hotspot = new Point JavaDoc(212,21);
128             ld.startAdding(comps, bounds, hotspot, defaultContId);
129         }
130         // < START ADDING
131
prefPaddingInParent.put("Form-jTextField2-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
132
prefPaddingInParent.put("Form-jTextField2-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
133
prefPadding.put("jTextField1-jTextField2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
134
prefPadding.put("jTextField2-jTextField1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
135
prefPaddingInParent.put("Form-jTextField2-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
136
prefPaddingInParent.put("Form-jTextField2-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
137
prefPadding.put("jTextField1-jTextField2-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
138
// > MOVE
139
{
140             Point JavaDoc p = new Point JavaDoc(210,47);
141             String JavaDoc containerId= "Form";
142             boolean autoPositioning = true;
143             boolean lockDimension = false;
144             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
145                 new Rectangle JavaDoc(187, 37, 59, 20)
146                 };
147             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
148         }
149         // < MOVE
150
prefPaddingInParent.put("Form-jTextField2-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
151
prefPaddingInParent.put("Form-jTextField2-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
152
prefPadding.put("jTextField1-jTextField2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
153
prefPadding.put("jTextField2-jTextField1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
154
prefPaddingInParent.put("Form-jTextField2-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
155
prefPaddingInParent.put("Form-jTextField2-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
156
prefPadding.put("jTextField1-jTextField2-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
157
// > MOVE
158
{
159             Point JavaDoc p = new Point JavaDoc(210,48);
160             String JavaDoc containerId= "Form";
161             boolean autoPositioning = true;
162             boolean lockDimension = false;
163             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
164                 new Rectangle JavaDoc(187, 37, 59, 20)
165                 };
166             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
167         }
168         // < MOVE
169
// > END MOVING
170
compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
171         compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
172         prefPaddingInParent.put("Form-jTextField2-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
173
prefPaddingInParent.put("Form-jTextField2-1-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
174
ld.endMoving(true);
175         // < END MOVING
176
ld.externalSizeChangeHappened();
177         // > UPDATE CURRENT STATE
178
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
179         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 59, 20));
180         baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
181         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
182         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 59, 20));
183         baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
184         compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
185         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
186         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 59, 20));
187         baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
188         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 59, 20));
189         baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
190         ld.updateCurrentState();
191         // < UPDATE CURRENT STATE
192
lc = new LayoutComponent("jTextField3", false);
193         // > START ADDING
194
baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
195         {
196             LayoutComponent[] comps = new LayoutComponent[] { lc };
197             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
198                 new Rectangle JavaDoc(187, 37, 59, 20)
199                 };
200             String JavaDoc defaultContId= "Form";
201             Point JavaDoc hotspot = new Point JavaDoc(212,47);
202             ld.startAdding(comps, bounds, hotspot, defaultContId);
203         }
204         // < START ADDING
205
prefPaddingInParent.put("Form-jTextField3-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
206
prefPaddingInParent.put("Form-jTextField3-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
207
prefPadding.put("jTextField1-jTextField3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
208
prefPadding.put("jTextField3-jTextField1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
209
prefPadding.put("jTextField2-jTextField3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
210
prefPadding.put("jTextField3-jTextField2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
211
prefPaddingInParent.put("Form-jTextField3-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
212
prefPaddingInParent.put("Form-jTextField3-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
213
prefPadding.put("jTextField2-jTextField3-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
214
// > MOVE
215
{
216             Point JavaDoc p = new Point JavaDoc(212,69);
217             String JavaDoc containerId= "Form";
218             boolean autoPositioning = true;
219             boolean lockDimension = false;
220             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
221                 new Rectangle JavaDoc(187, 63, 59, 20)
222                 };
223             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
224         }
225         // < MOVE
226
prefPaddingInParent.put("Form-jTextField3-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
227
prefPaddingInParent.put("Form-jTextField3-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
228
prefPadding.put("jTextField1-jTextField3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
229
prefPadding.put("jTextField3-jTextField1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
230
prefPadding.put("jTextField2-jTextField3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
231
prefPadding.put("jTextField3-jTextField2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
232
prefPaddingInParent.put("Form-jTextField3-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
233
prefPaddingInParent.put("Form-jTextField3-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
234
prefPadding.put("jTextField2-jTextField3-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
235
// > MOVE
236
{
237             Point JavaDoc p = new Point JavaDoc(213,69);
238             String JavaDoc containerId= "Form";
239             boolean autoPositioning = true;
240             boolean lockDimension = false;
241             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
242                 new Rectangle JavaDoc(187, 63, 59, 20)
243                 };
244             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
245         }
246         // < MOVE
247
// > END MOVING
248
compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
249         compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
250         prefPaddingInParent.put("Form-jTextField3-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
251
prefPaddingInParent.put("Form-jTextField3-1-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
252
ld.endMoving(true);
253         // < END MOVING
254
ld.externalSizeChangeHappened();
255         // > UPDATE CURRENT STATE
256
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
257         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 59, 20));
258         baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
259         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
260         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 59, 20));
261         baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
262         compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
263         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 59, 20));
264         baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
265         compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
266         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
267         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 59, 20));
268         baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
269         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 59, 20));
270         baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
271         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 59, 20));
272         baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
273         ld.updateCurrentState();
274         // < UPDATE CURRENT STATE
275
lc = new LayoutComponent("jScrollPane1", false);
276         // > START ADDING
277
baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
278         {
279             LayoutComponent[] comps = new LayoutComponent[] { lc };
280             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
281                 new Rectangle JavaDoc(0, 0, 37, 132)
282                 };
283             String JavaDoc defaultContId = null;
284             Point JavaDoc hotspot = new Point JavaDoc(14,66);
285             ld.startAdding(comps, bounds, hotspot, defaultContId);
286         }
287         // < START ADDING
288
prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
289
prefPaddingInParent.put("Form-jScrollPane1-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
290
prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
291
prefPaddingInParent.put("Form-jScrollPane1-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
292
prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
293
prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
294
prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
295
// > MOVE
296
{
297             Point JavaDoc p = new Point JavaDoc(361,77);
298             String JavaDoc containerId= "Form";
299             boolean autoPositioning = true;
300             boolean lockDimension = false;
301             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
302                 new Rectangle JavaDoc(353, 11, 37, 132)
303                 };
304             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
305         }
306         // < MOVE
307
prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
308
prefPaddingInParent.put("Form-jScrollPane1-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
309
prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
310
prefPaddingInParent.put("Form-jScrollPane1-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
311
prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
312
prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
313
prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
314
// > MOVE
315
{
316             Point JavaDoc p = new Point JavaDoc(362,77);
317             String JavaDoc containerId= "Form";
318             boolean autoPositioning = true;
319             boolean lockDimension = false;
320             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
321                 new Rectangle JavaDoc(353, 11, 37, 132)
322                 };
323             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
324         }
325         // < MOVE
326
// > END MOVING
327
compPrefSize.put("jScrollPane1", new Dimension JavaDoc(37, 132));
328         compPrefSize.put("jScrollPane1", new Dimension JavaDoc(37, 132));
329         prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
330
prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
331
prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
332
prefPaddingInParent.put("Form-jScrollPane1-1-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
333
ld.endMoving(true);
334         // < END MOVING
335
ld.externalSizeChangeHappened();
336         // > UPDATE CURRENT STATE
337
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
338         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 59, 20));
339         baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
340         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
341         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 59, 20));
342         baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
343         compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
344         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 59, 20));
345         baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
346         compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
347         compBounds.put("jScrollPane1", new Rectangle JavaDoc(353, 11, 37, 132));
348         baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
349         compPrefSize.put("jScrollPane1", new Dimension JavaDoc(37, 132));
350         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
351         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 59, 20));
352         baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
353         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 59, 20));
354         baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
355         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 59, 20));
356         baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
357         compBounds.put("jScrollPane1", new Rectangle JavaDoc(353, 11, 37, 132));
358         baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
359         ld.updateCurrentState();
360         // < UPDATE CURRENT STATE
361
}
362
363     // One by one, resize the textfields to the right to snap next to the list.
364
public void doChanges1() {
365         // > START RESIZING
366
baselinePosition.put("jTextField1-59-20", new Integer JavaDoc(14));
367         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
368         {
369             String JavaDoc[] compIds = new String JavaDoc[] {
370                 "jTextField1"
371                 };
372             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
373                 new Rectangle JavaDoc(187, 11, 59, 20)
374                 };
375             Point JavaDoc hotspot = new Point JavaDoc(246,23);
376             int[] resizeEdges = new int[] {
377                 1,
378                     -1
379                 };
380             boolean inLayout = true;
381             ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);
382         }
383         // < START RESIZING
384
prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
385
// > MOVE
386
{
387             Point JavaDoc p = new Point JavaDoc(339,23);
388             String JavaDoc containerId= "Form";
389             boolean autoPositioning = true;
390             boolean lockDimension = false;
391             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
392                 new Rectangle JavaDoc(187, 11, 152, 20)
393                 };
394             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
395         }
396         // < MOVE
397
prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
398
// > MOVE
399
{
400             Point JavaDoc p = new Point JavaDoc(340,23);
401             String JavaDoc containerId= "Form";
402             boolean autoPositioning = true;
403             boolean lockDimension = false;
404             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
405                 new Rectangle JavaDoc(187, 11, 160, 20)
406                 };
407             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
408         }
409         // < MOVE
410
// > END MOVING
411
prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
412
prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
413
ld.endMoving(true);
414         // < END MOVING
415
ld.externalSizeChangeHappened();
416         // > UPDATE CURRENT STATE
417
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
418         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 59, 20));
419         baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
420         compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
421         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 59, 20));
422         baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
423         compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
424         compBounds.put("jScrollPane1", new Rectangle JavaDoc(353, 11, 37, 132));
425         baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
426         compPrefSize.put("jScrollPane1", new Dimension JavaDoc(37, 132));
427         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 160, 20));
428         baselinePosition.put("jTextField1-160-20", new Integer JavaDoc(14));
429         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
430         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
431         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 59, 20));
432         baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
433         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 59, 20));
434         baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
435         compBounds.put("jScrollPane1", new Rectangle JavaDoc(353, 11, 37, 132));
436         baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
437         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 160, 20));
438         baselinePosition.put("jTextField1-160-20", new Integer JavaDoc(14));
439         ld.updateCurrentState();
440         // < UPDATE CURRENT STATE
441
// > START RESIZING
442
baselinePosition.put("jTextField2-59-20", new Integer JavaDoc(14));
443         compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
444         {
445             String JavaDoc[] compIds = new String JavaDoc[] {
446                 "jTextField2"
447                 };
448             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
449                 new Rectangle JavaDoc(187, 37, 59, 20)
450                 };
451             Point JavaDoc hotspot = new Point JavaDoc(244,47);
452             int[] resizeEdges = new int[] {
453                 1,
454                     -1
455                 };
456             boolean inLayout = true;
457             ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);
458         }
459         // < START RESIZING
460
prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
461
// > MOVE
462
{
463             Point JavaDoc p = new Point JavaDoc(337,46);
464             String JavaDoc containerId= "Form";
465             boolean autoPositioning = true;
466             boolean lockDimension = false;
467             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
468                 new Rectangle JavaDoc(187, 37, 152, 20)
469                 };
470             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
471         }
472         // < MOVE
473
prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
474
// > MOVE
475
{
476             Point JavaDoc p = new Point JavaDoc(338,46);
477             String JavaDoc containerId= "Form";
478             boolean autoPositioning = true;
479             boolean lockDimension = false;
480             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
481                 new Rectangle JavaDoc(187, 37, 160, 20)
482                 };
483             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
484         }
485         // < MOVE
486
// > END MOVING
487
compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
488         ld.endMoving(true);
489         // < END MOVING
490
ld.externalSizeChangeHappened();
491         // > UPDATE CURRENT STATE
492
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
493         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 59, 20));
494         baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
495         compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
496         compBounds.put("jScrollPane1", new Rectangle JavaDoc(353, 11, 37, 132));
497         baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
498         compPrefSize.put("jScrollPane1", new Dimension JavaDoc(37, 132));
499         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 160, 20));
500         baselinePosition.put("jTextField1-160-20", new Integer JavaDoc(14));
501         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
502         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 160, 20));
503         baselinePosition.put("jTextField2-160-20", new Integer JavaDoc(14));
504         compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
505         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
506         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 59, 20));
507         baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
508         compBounds.put("jScrollPane1", new Rectangle JavaDoc(353, 11, 37, 132));
509         baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
510         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 160, 20));
511         baselinePosition.put("jTextField1-160-20", new Integer JavaDoc(14));
512         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 160, 20));
513         baselinePosition.put("jTextField2-160-20", new Integer JavaDoc(14));
514         ld.updateCurrentState();
515         // < UPDATE CURRENT STATE
516
// > START RESIZING
517
baselinePosition.put("jTextField3-59-20", new Integer JavaDoc(14));
518         compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
519         {
520             String JavaDoc[] compIds = new String JavaDoc[] {
521                 "jTextField3"
522                 };
523             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
524                 new Rectangle JavaDoc(187, 63, 59, 20)
525                 };
526             Point JavaDoc hotspot = new Point JavaDoc(247,75);
527             int[] resizeEdges = new int[] {
528                 1,
529                     -1
530                 };
531             boolean inLayout = true;
532             ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);
533         }
534         // < START RESIZING
535
prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
536
// > MOVE
537
{
538             Point JavaDoc p = new Point JavaDoc(341,70);
539             String JavaDoc containerId= "Form";
540             boolean autoPositioning = true;
541             boolean lockDimension = false;
542             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
543                 new Rectangle JavaDoc(187, 63, 160, 20)
544                 };
545             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
546         }
547         // < MOVE
548
prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
549
// > MOVE
550
{
551             Point JavaDoc p = new Point JavaDoc(342,70);
552             String JavaDoc containerId= "Form";
553             boolean autoPositioning = true;
554             boolean lockDimension = false;
555             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
556                 new Rectangle JavaDoc(187, 63, 160, 20)
557                 };
558             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
559         }
560         // < MOVE
561
// > END MOVING
562
compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
563         ld.endMoving(true);
564         // < END MOVING
565
ld.externalSizeChangeHappened();
566         // > UPDATE CURRENT STATE
567
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
568         compBounds.put("jScrollPane1", new Rectangle JavaDoc(353, 11, 37, 132));
569         baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
570         compPrefSize.put("jScrollPane1", new Dimension JavaDoc(37, 132));
571         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 160, 20));
572         baselinePosition.put("jTextField1-160-20", new Integer JavaDoc(14));
573         compPrefSize.put("jTextField1", new Dimension JavaDoc(59, 20));
574         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 160, 20));
575         baselinePosition.put("jTextField2-160-20", new Integer JavaDoc(14));
576         compPrefSize.put("jTextField2", new Dimension JavaDoc(59, 20));
577         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 160, 20));
578         baselinePosition.put("jTextField3-160-20", new Integer JavaDoc(14));
579         compPrefSize.put("jTextField3", new Dimension JavaDoc(59, 20));
580         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
581         compBounds.put("jScrollPane1", new Rectangle JavaDoc(353, 11, 37, 132));
582         baselinePosition.put("jScrollPane1-37-132", new Integer JavaDoc(0));
583         compBounds.put("jTextField1", new Rectangle JavaDoc(187, 11, 160, 20));
584         baselinePosition.put("jTextField1-160-20", new Integer JavaDoc(14));
585         compBounds.put("jTextField2", new Rectangle JavaDoc(187, 37, 160, 20));
586         baselinePosition.put("jTextField2-160-20", new Integer JavaDoc(14));
587         compBounds.put("jTextField3", new Rectangle JavaDoc(187, 63, 160, 20));
588         baselinePosition.put("jTextField3-160-20", new Integer JavaDoc(14));
589         ld.updateCurrentState();
590         // < UPDATE CURRENT STATE
591
}
592     
593 }
594
Popular Tags