KickJava   Java API By Example, From Geeks To Geeks.

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


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 public class ALT_Indent01Test extends LayoutTestCase {
31
32     public ALT_Indent01Test(String JavaDoc name) {
33         super(name);
34         try {
35         className = this.getClass().getName();
36         className = className.substring(className.lastIndexOf('.') + 1, className.length());
37             startingFormFile = FileUtil.toFileObject(new File JavaDoc(url.getFile() + goldenFilesPath + className + "-StartingForm.form").getCanonicalFile());
38         } catch (IOException JavaDoc ioe) {
39             fail(ioe.toString());
40         }
41     }
42
43     // Add a label below the first one at indented position.
44
public void doChanges0() {
45         ld.externalSizeChangeHappened();
46         // > UPDATE CURRENT STATE
47
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
48         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
49         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
50         compPrefSize.put("jLabel1", new Dimension JavaDoc(34, 14));
51         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
52         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
53         compPrefSize.put("jLabel2", new Dimension JavaDoc(34, 14));
54         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
55         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
56         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
57         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
58         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
59         ld.updateCurrentState();
60         // < UPDATE CURRENT STATE
61
lc = new LayoutComponent("jLabel3", false);
62         // > START ADDING
63
baselinePosition.put("jLabel3-34-14", new Integer JavaDoc(11));
64         {
65             LayoutComponent[] comps = new LayoutComponent[] { lc };
66             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
67                 new Rectangle JavaDoc(0, 0, 34, 14)
68                 };
69             String JavaDoc defaultContId = null;
70             Point JavaDoc hotspot = new Point JavaDoc(13,7);
71             ld.startAdding(comps, bounds, hotspot, defaultContId);
72         }
73         // < START ADDING
74
prefPaddingInParent.put("Form-jLabel3-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
75
prefPaddingInParent.put("Form-jLabel3-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
76
prefPadding.put("jLabel1-jLabel3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
77
prefPadding.put("jLabel2-jLabel3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
78
prefPadding.put("jLabel3-jLabel1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
79
prefPadding.put("jLabel3-jLabel2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
80
prefPaddingInParent.put("Form-jLabel3-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
81
prefPaddingInParent.put("Form-jLabel3-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
82
prefPadding.put("jLabel1-jLabel3-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
83
prefPadding.put("jLabel2-jLabel3-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
84
// > MOVE
85
{
86             Point JavaDoc p = new Point JavaDoc(36,41);
87             String JavaDoc containerId= "Form";
88             boolean autoPositioning = true;
89             boolean lockDimension = false;
90             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
91                 new Rectangle JavaDoc(20, 31, 34, 14)
92                 };
93             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
94         }
95         // < MOVE
96
prefPaddingInParent.put("Form-jLabel3-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
97
prefPaddingInParent.put("Form-jLabel3-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
98
prefPadding.put("jLabel1-jLabel3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
99
prefPadding.put("jLabel2-jLabel3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
100
prefPadding.put("jLabel3-jLabel1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
101
prefPadding.put("jLabel3-jLabel2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
102
prefPaddingInParent.put("Form-jLabel3-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
103
prefPaddingInParent.put("Form-jLabel3-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
104
prefPadding.put("jLabel1-jLabel3-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
105
prefPadding.put("jLabel2-jLabel3-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
106
// > MOVE
107
{
108             Point JavaDoc p = new Point JavaDoc(36,40);
109             String JavaDoc containerId= "Form";
110             boolean autoPositioning = true;
111             boolean lockDimension = false;
112             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
113                 new Rectangle JavaDoc(20, 31, 34, 14)
114                 };
115             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
116         }
117         // < MOVE
118
// > END MOVING
119
compPrefSize.put("jLabel3", new Dimension JavaDoc(34, 14));
120         compPrefSize.put("jLabel3", new Dimension JavaDoc(34, 14));
121         prefPaddingInParent.put("Form-jLabel3-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
122
prefPaddingInParent.put("Form-jLabel3-1-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
123
ld.endMoving(true);
124         // < END MOVING
125
ld.externalSizeChangeHappened();
126         // > UPDATE CURRENT STATE
127
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
128         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
129         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
130         compPrefSize.put("jLabel1", new Dimension JavaDoc(34, 14));
131         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
132         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
133         compPrefSize.put("jLabel2", new Dimension JavaDoc(34, 14));
134         compBounds.put("jLabel3", new Rectangle JavaDoc(20, 31, 34, 14));
135         baselinePosition.put("jLabel3-34-14", new Integer JavaDoc(11));
136         compPrefSize.put("jLabel3", new Dimension JavaDoc(34, 14));
137         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
138         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
139         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
140         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
141         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
142         compBounds.put("jLabel3", new Rectangle JavaDoc(20, 31, 34, 14));
143         baselinePosition.put("jLabel3-34-14", new Integer JavaDoc(11));
144         ld.updateCurrentState();
145         // < UPDATE CURRENT STATE
146
}
147
148     // Make the third label longer (append "aaa"). Add a new label like it would
149
// like to go indented with jLabel2 - but indent should not be offered, and
150
// the new label should be added after jLabel3 in sequence.
151
public void doChanges1() {
152         ld.externalSizeChangeHappened();
153         // > UPDATE CURRENT STATE
154
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
155         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
156         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
157         compPrefSize.put("jLabel1", new Dimension JavaDoc(34, 14));
158         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
159         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
160         compPrefSize.put("jLabel2", new Dimension JavaDoc(34, 14));
161         compBounds.put("jLabel3", new Rectangle JavaDoc(20, 31, 52, 14));
162         baselinePosition.put("jLabel3-52-14", new Integer JavaDoc(11));
163         compPrefSize.put("jLabel3", new Dimension JavaDoc(52, 14));
164         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
165         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
166         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
167         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
168         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
169         compBounds.put("jLabel3", new Rectangle JavaDoc(20, 31, 52, 14));
170         baselinePosition.put("jLabel3-52-14", new Integer JavaDoc(11));
171         ld.updateCurrentState();
172         // < UPDATE CURRENT STATE
173
lc = new LayoutComponent("jLabel4", false);
174         // > START ADDING
175
baselinePosition.put("jLabel4-34-14", new Integer JavaDoc(11));
176         {
177             LayoutComponent[] comps = new LayoutComponent[] { lc };
178             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
179                 new Rectangle JavaDoc(0, 0, 34, 14)
180                 };
181             String JavaDoc defaultContId = null;
182             Point JavaDoc hotspot = new Point JavaDoc(13,7);
183             ld.startAdding(comps, bounds, hotspot, defaultContId);
184         }
185         // < START ADDING
186
prefPaddingInParent.put("Form-jLabel4-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
187
prefPaddingInParent.put("Form-jLabel4-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
188
prefPadding.put("jLabel1-jLabel4-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
189
prefPadding.put("jLabel2-jLabel4-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
190
prefPadding.put("jLabel4-jLabel1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
191
prefPadding.put("jLabel4-jLabel2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
192
prefPadding.put("jLabel3-jLabel4-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
193
prefPadding.put("jLabel4-jLabel3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
194
prefPaddingInParent.put("Form-jLabel4-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
195
prefPaddingInParent.put("Form-jLabel4-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
196
prefPadding.put("jLabel3-jLabel4-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
197
prefPadding.put("jLabel1-jLabel4-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
198
prefPadding.put("jLabel2-jLabel4-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
199
// > MOVE
200
{
201             Point JavaDoc p = new Point JavaDoc(72,41);
202             String JavaDoc containerId= "Form";
203             boolean autoPositioning = true;
204             boolean lockDimension = false;
205             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
206                 new Rectangle JavaDoc(59, 31, 34, 14)
207                 };
208             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
209         }
210         // < MOVE
211
prefPaddingInParent.put("Form-jLabel4-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
212
prefPaddingInParent.put("Form-jLabel4-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
213
prefPadding.put("jLabel1-jLabel4-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
214
prefPadding.put("jLabel2-jLabel4-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
215
prefPadding.put("jLabel4-jLabel1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
216
prefPadding.put("jLabel4-jLabel2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
217
prefPadding.put("jLabel3-jLabel4-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
218
prefPadding.put("jLabel4-jLabel3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
219
prefPaddingInParent.put("Form-jLabel4-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
220
prefPaddingInParent.put("Form-jLabel4-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
221
prefPadding.put("jLabel3-jLabel4-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
222
prefPadding.put("jLabel4-jLabel3-0-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
223
prefPadding.put("jLabel1-jLabel4-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
224
prefPadding.put("jLabel2-jLabel4-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
225
// > MOVE
226
{
227             Point JavaDoc p = new Point JavaDoc(71,41);
228             String JavaDoc containerId= "Form";
229             boolean autoPositioning = true;
230             boolean lockDimension = false;
231             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
232                 new Rectangle JavaDoc(58, 31, 34, 14)
233                 };
234             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
235         }
236         // < MOVE
237
// > END MOVING
238
compPrefSize.put("jLabel4", new Dimension JavaDoc(34, 14));
239         compPrefSize.put("jLabel4", new Dimension JavaDoc(34, 14));
240         prefPaddingInParent.put("Form-jLabel4-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
241
prefPaddingInParent.put("Form-jLabel2-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
242
ld.endMoving(true);
243         // < END MOVING
244
ld.externalSizeChangeHappened();
245         // > UPDATE CURRENT STATE
246
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
247         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
248         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
249         compPrefSize.put("jLabel1", new Dimension JavaDoc(34, 14));
250         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
251         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
252         compPrefSize.put("jLabel2", new Dimension JavaDoc(34, 14));
253         compBounds.put("jLabel3", new Rectangle JavaDoc(20, 31, 52, 14));
254         baselinePosition.put("jLabel3-52-14", new Integer JavaDoc(11));
255         compPrefSize.put("jLabel3", new Dimension JavaDoc(52, 14));
256         compBounds.put("jLabel4", new Rectangle JavaDoc(78, 31, 34, 14));
257         baselinePosition.put("jLabel4-34-14", new Integer JavaDoc(11));
258         compPrefSize.put("jLabel4", new Dimension JavaDoc(34, 14));
259         prefPaddingInParent.put("Form-jLabel4-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
260
prefPaddingInParent.put("Form-jLabel2-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
261
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
262         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
263         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
264         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
265         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
266         compBounds.put("jLabel3", new Rectangle JavaDoc(20, 31, 52, 14));
267         baselinePosition.put("jLabel3-52-14", new Integer JavaDoc(11));
268         compBounds.put("jLabel4", new Rectangle JavaDoc(78, 31, 34, 14));
269         baselinePosition.put("jLabel4-34-14", new Integer JavaDoc(11));
270         ld.updateCurrentState();
271         // < UPDATE CURRENT STATE
272
}
273
274     // Add a label at indented position with jLabel3.
275
public void doChanges2() {
276         lc = new LayoutComponent("jLabel5", false);
277         // > START ADDING
278
baselinePosition.put("jLabel5-34-14", new Integer JavaDoc(11));
279         {
280             LayoutComponent[] comps = new LayoutComponent[] { lc };
281             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
282                 new Rectangle JavaDoc(0, 0, 34, 14)
283                 };
284             String JavaDoc defaultContId = null;
285             Point JavaDoc hotspot = new Point JavaDoc(13,7);
286             ld.startAdding(comps, bounds, hotspot, defaultContId);
287         }
288         // < START ADDING
289
prefPaddingInParent.put("Form-jLabel5-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
290
prefPaddingInParent.put("Form-jLabel5-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
291
prefPadding.put("jLabel1-jLabel5-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
292
prefPadding.put("jLabel2-jLabel5-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
293
prefPadding.put("jLabel5-jLabel1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
294
prefPadding.put("jLabel5-jLabel2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
295
prefPadding.put("jLabel3-jLabel5-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
296
prefPadding.put("jLabel4-jLabel5-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
297
prefPadding.put("jLabel5-jLabel3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
298
prefPadding.put("jLabel5-jLabel4-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
299
prefPaddingInParent.put("Form-jLabel5-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
300
prefPaddingInParent.put("Form-jLabel5-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
301
prefPadding.put("jLabel3-jLabel5-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
302
prefPadding.put("jLabel4-jLabel5-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
303
// > MOVE
304
{
305             Point JavaDoc p = new Point JavaDoc(45,57);
306             String JavaDoc containerId= "Form";
307             boolean autoPositioning = true;
308             boolean lockDimension = false;
309             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
310                 new Rectangle JavaDoc(30, 51, 34, 14)
311                 };
312             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
313         }
314         // < MOVE
315
prefPaddingInParent.put("Form-jLabel5-1-0", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
316
prefPaddingInParent.put("Form-jLabel5-1-1", new Integer JavaDoc(11)); // parentId-compId-dimension-compAlignment
317
prefPadding.put("jLabel1-jLabel5-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
318
prefPadding.put("jLabel2-jLabel5-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
319
prefPadding.put("jLabel5-jLabel1-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
320
prefPadding.put("jLabel5-jLabel2-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
321
prefPadding.put("jLabel3-jLabel5-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
322
prefPadding.put("jLabel4-jLabel5-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
323
prefPadding.put("jLabel5-jLabel3-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
324
prefPadding.put("jLabel5-jLabel4-1-0-0", new Integer JavaDoc(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
325
prefPaddingInParent.put("Form-jLabel5-0-0", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
326
prefPaddingInParent.put("Form-jLabel5-0-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
327
prefPadding.put("jLabel3-jLabel5-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
328
prefPadding.put("jLabel4-jLabel5-0-0-2", new Integer JavaDoc(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType
329
// > MOVE
330
{
331             Point JavaDoc p = new Point JavaDoc(44,57);
332             String JavaDoc containerId= "Form";
333             boolean autoPositioning = true;
334             boolean lockDimension = false;
335             Rectangle JavaDoc[] bounds = new Rectangle JavaDoc[] {
336                 new Rectangle JavaDoc(30, 51, 34, 14)
337                 };
338             ld.move(p, containerId, autoPositioning, lockDimension, bounds);
339         }
340         // < MOVE
341
// > END MOVING
342
compPrefSize.put("jLabel5", new Dimension JavaDoc(34, 14));
343         compPrefSize.put("jLabel5", new Dimension JavaDoc(34, 14));
344         prefPaddingInParent.put("Form-jLabel5-1-1", new Integer JavaDoc(10)); // parentId-compId-dimension-compAlignment
345
ld.endMoving(true);
346         // < END MOVING
347
ld.externalSizeChangeHappened();
348         // > UPDATE CURRENT STATE
349
contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
350         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
351         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
352         compPrefSize.put("jLabel1", new Dimension JavaDoc(34, 14));
353         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
354         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
355         compPrefSize.put("jLabel2", new Dimension JavaDoc(34, 14));
356         compBounds.put("jLabel3", new Rectangle JavaDoc(20, 31, 52, 14));
357         baselinePosition.put("jLabel3-52-14", new Integer JavaDoc(11));
358         compPrefSize.put("jLabel3", new Dimension JavaDoc(52, 14));
359         compBounds.put("jLabel4", new Rectangle JavaDoc(78, 31, 34, 14));
360         baselinePosition.put("jLabel4-34-14", new Integer JavaDoc(11));
361         compPrefSize.put("jLabel4", new Dimension JavaDoc(34, 14));
362         compBounds.put("jLabel5", new Rectangle JavaDoc(30, 51, 34, 14));
363         baselinePosition.put("jLabel5-34-14", new Integer JavaDoc(11));
364         compPrefSize.put("jLabel5", new Dimension JavaDoc(34, 14));
365         contInterior.put("Form", new Rectangle JavaDoc(0, 0, 400, 300));
366         compBounds.put("jLabel1", new Rectangle JavaDoc(10, 11, 34, 14));
367         baselinePosition.put("jLabel1-34-14", new Integer JavaDoc(11));
368         compBounds.put("jLabel2", new Rectangle JavaDoc(50, 11, 34, 14));
369         baselinePosition.put("jLabel2-34-14", new Integer JavaDoc(11));
370         compBounds.put("jLabel3", new Rectangle JavaDoc(20, 31, 52, 14));
371         baselinePosition.put("jLabel3-52-14", new Integer JavaDoc(11));
372         compBounds.put("jLabel4", new Rectangle JavaDoc(78, 31, 34, 14));
373         baselinePosition.put("jLabel4-34-14", new Integer JavaDoc(11));
374         compBounds.put("jLabel5", new Rectangle JavaDoc(30, 51, 34, 14));
375         baselinePosition.put("jLabel5-34-14", new Integer JavaDoc(11));
376         ld.updateCurrentState();
377         // < UPDATE CURRENT STATE
378
}
379     
380 }
381
Popular Tags