1 19 20 package org.netbeans.modules.form.layoutdesign; 21 22 import java.awt.Dimension ; 23 import java.awt.Point ; 24 import java.awt.Rectangle ; 25 import java.io.File ; 26 import java.io.IOException ; 27 import java.util.*; 28 import org.openide.filesystems.FileUtil; 29 30 public class ALT_Indent02Test extends LayoutTestCase { 35 36 public ALT_Indent02Test(String name) { 37 super(name); 38 try { 39 className = this.getClass().getName(); 40 className = className.substring(className.lastIndexOf('.') + 1, className.length()); 41 startingFormFile = FileUtil.toFileObject(new File (url.getFile() + goldenFilesPath + className + "-StartingForm.form").getCanonicalFile()); 42 } catch (IOException ioe) { 43 fail(ioe.toString()); 44 } 45 } 46 47 public void doChanges0() { 50 ld.externalSizeChangeHappened(); 51 contInterior.put("jPanel5", new Rectangle (0, 0, 400, 308)); 53 compBounds.put("jLabel20", new Rectangle (30, 35, 91, 14)); 54 baselinePosition.put("jLabel20-91-14", new Integer (11)); 55 compPrefSize.put("jLabel20", new Dimension (91, 14)); 56 compBounds.put("jLabel23", new Rectangle (30, 107, 84, 14)); 57 baselinePosition.put("jLabel23-84-14", new Integer (11)); 58 compPrefSize.put("jLabel23", new Dimension (84, 14)); 59 compBounds.put("jLabel27", new Rectangle (30, 135, 126, 14)); 60 baselinePosition.put("jLabel27-126-14", new Integer (11)); 61 compPrefSize.put("jLabel27", new Dimension (126, 14)); 62 compBounds.put("jComboBox9", new Rectangle (160, 31, 230, 22)); 63 baselinePosition.put("jComboBox9-230-22", new Integer (15)); 64 compPrefSize.put("jComboBox9", new Dimension (57, 22)); 65 compBounds.put("jComboBox11", new Rectangle (160, 103, 230, 22)); 66 baselinePosition.put("jComboBox11-230-22", new Integer (15)); 67 compPrefSize.put("jComboBox11", new Dimension (57, 22)); 68 compBounds.put("jComboBox13", new Rectangle (160, 131, 230, 22)); 69 baselinePosition.put("jComboBox13-230-22", new Integer (15)); 70 compPrefSize.put("jComboBox13", new Dimension (57, 22)); 71 compBounds.put("jLabel22", new Rectangle (20, 83, 113, 14)); 72 baselinePosition.put("jLabel22-113-14", new Integer (11)); 73 compPrefSize.put("jLabel22", new Dimension (113, 14)); 74 compBounds.put("jLabel19", new Rectangle (20, 11, 46, 14)); 75 baselinePosition.put("jLabel19-46-14", new Integer (11)); 76 compPrefSize.put("jLabel19", new Dimension (46, 14)); 77 contInterior.put("jPanel5", new Rectangle (0, 0, 400, 308)); 78 compBounds.put("jLabel20", new Rectangle (30, 35, 91, 14)); 79 baselinePosition.put("jLabel20-91-14", new Integer (11)); 80 compBounds.put("jLabel23", new Rectangle (30, 107, 84, 14)); 81 baselinePosition.put("jLabel23-84-14", new Integer (11)); 82 compBounds.put("jLabel27", new Rectangle (30, 135, 126, 14)); 83 baselinePosition.put("jLabel27-126-14", new Integer (11)); 84 compBounds.put("jComboBox9", new Rectangle (160, 31, 230, 22)); 85 baselinePosition.put("jComboBox9-230-22", new Integer (15)); 86 compBounds.put("jComboBox11", new Rectangle (160, 103, 230, 22)); 87 baselinePosition.put("jComboBox11-230-22", new Integer (15)); 88 compBounds.put("jComboBox13", new Rectangle (160, 131, 230, 22)); 89 baselinePosition.put("jComboBox13-230-22", new Integer (15)); 90 compBounds.put("jLabel22", new Rectangle (20, 83, 113, 14)); 91 baselinePosition.put("jLabel22-113-14", new Integer (11)); 92 compBounds.put("jLabel19", new Rectangle (20, 11, 46, 14)); 93 baselinePosition.put("jLabel19-46-14", new Integer (11)); 94 ld.updateCurrentState(); 95 baselinePosition.put("jLabel20-91-14", new Integer (11)); 98 { 99 String [] compIds = new String [] { 100 "jLabel20" 101 }; 102 Rectangle [] bounds = new Rectangle [] { 103 new Rectangle (30, 35, 91, 14) 104 }; 105 Point hotspot = new Point (46,41); 106 ld.startMoving(compIds, bounds, hotspot); 107 } 108 prefPaddingInParent.put("jPanel5-jLabel20-1-0", new Integer (11)); prefPaddingInParent.put("jPanel5-jLabel20-1-1", new Integer (11)); prefPadding.put("jLabel19-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jLabel19-1-0-0", new Integer (6)); prefPadding.put("jLabel22-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jLabel22-1-0-0", new Integer (6)); prefPadding.put("jLabel23-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jComboBox11-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jLabel23-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jComboBox11-1-0-0", new Integer (6)); prefPadding.put("jLabel27-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jComboBox13-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jLabel27-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jComboBox13-1-0-0", new Integer (6)); prefPaddingInParent.put("jPanel5-jLabel20-0-0", new Integer (10)); prefPaddingInParent.put("jPanel5-jLabel20-0-1", new Integer (10)); prefPadding.put("jLabel20-jComboBox9-0-0-0", new Integer (4)); prefPadding.put("jLabel19-jLabel20-0-0-2", new Integer (10)); { 129 Point p = new Point (45,46); 130 String containerId= "jPanel5"; 131 boolean autoPositioning = true; 132 boolean lockDimension = false; 133 Rectangle [] bounds = new Rectangle [] { 134 new Rectangle (30, 35, 91, 14) 135 }; 136 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 137 } 138 prefPaddingInParent.put("jPanel5-jLabel20-1-0", new Integer (11)); prefPaddingInParent.put("jPanel5-jLabel20-1-1", new Integer (11)); prefPadding.put("jLabel19-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jLabel19-1-0-0", new Integer (6)); prefPadding.put("jLabel22-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jLabel22-1-0-0", new Integer (6)); prefPadding.put("jLabel23-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jComboBox11-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jLabel23-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jComboBox11-1-0-0", new Integer (6)); prefPadding.put("jLabel27-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jComboBox13-jLabel20-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jLabel27-1-0-0", new Integer (6)); prefPadding.put("jLabel20-jComboBox13-1-0-0", new Integer (6)); prefPaddingInParent.put("jPanel5-jLabel20-0-0", new Integer (10)); prefPaddingInParent.put("jPanel5-jLabel20-0-1", new Integer (10)); prefPadding.put("jLabel20-jComboBox9-0-0-0", new Integer (4)); prefPadding.put("jLabel19-jLabel20-0-0-2", new Integer (10)); { 159 Point p = new Point (44,46); 160 String containerId= "jPanel5"; 161 boolean autoPositioning = true; 162 boolean lockDimension = false; 163 Rectangle [] bounds = new Rectangle [] { 164 new Rectangle (30, 35, 91, 14) 165 }; 166 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 167 } 168 prefPadding.put("jLabel23-jComboBox9-0-0-0", new Integer (4)); prefPadding.put("jLabel23-jComboBox11-0-0-0", new Integer (4)); prefPadding.put("jLabel23-jComboBox13-0-0-0", new Integer (4)); prefPadding.put("jLabel27-jComboBox9-0-0-0", new Integer (4)); prefPadding.put("jLabel27-jComboBox11-0-0-0", new Integer (4)); prefPadding.put("jLabel27-jComboBox13-0-0-0", new Integer (4)); prefPadding.put("jLabel20-jComboBox9-0-0-0", new Integer (4)); prefPadding.put("jLabel20-jComboBox11-0-0-0", new Integer (4)); prefPadding.put("jLabel20-jComboBox13-0-0-0", new Integer (4)); ld.endMoving(true); 180 ld.externalSizeChangeHappened(); 182 contInterior.put("jPanel5", new Rectangle (0, 0, 400, 308)); 184 compBounds.put("jLabel23", new Rectangle (30, 107, 84, 14)); 185 baselinePosition.put("jLabel23-84-14", new Integer (11)); 186 compPrefSize.put("jLabel23", new Dimension (84, 14)); 187 compBounds.put("jLabel27", new Rectangle (30, 135, 126, 14)); 188 baselinePosition.put("jLabel27-126-14", new Integer (11)); 189 compPrefSize.put("jLabel27", new Dimension (126, 14)); 190 compBounds.put("jComboBox9", new Rectangle (160, 31, 230, 22)); 191 baselinePosition.put("jComboBox9-230-22", new Integer (15)); 192 compPrefSize.put("jComboBox9", new Dimension (57, 22)); 193 compBounds.put("jComboBox11", new Rectangle (160, 103, 230, 22)); 194 baselinePosition.put("jComboBox11-230-22", new Integer (15)); 195 compPrefSize.put("jComboBox11", new Dimension (57, 22)); 196 compBounds.put("jComboBox13", new Rectangle (160, 131, 230, 22)); 197 baselinePosition.put("jComboBox13-230-22", new Integer (15)); 198 compPrefSize.put("jComboBox13", new Dimension (57, 22)); 199 compBounds.put("jLabel22", new Rectangle (20, 83, 113, 14)); 200 baselinePosition.put("jLabel22-113-14", new Integer (11)); 201 compPrefSize.put("jLabel22", new Dimension (113, 14)); 202 compBounds.put("jLabel19", new Rectangle (20, 11, 46, 14)); 203 baselinePosition.put("jLabel19-46-14", new Integer (11)); 204 compPrefSize.put("jLabel19", new Dimension (46, 14)); 205 compBounds.put("jLabel20", new Rectangle (30, 35, 91, 14)); 206 baselinePosition.put("jLabel20-91-14", new Integer (11)); 207 compPrefSize.put("jLabel20", new Dimension (91, 14)); 208 contInterior.put("jPanel5", new Rectangle (0, 0, 400, 308)); 209 compBounds.put("jLabel23", new Rectangle (30, 107, 84, 14)); 210 baselinePosition.put("jLabel23-84-14", new Integer (11)); 211 compBounds.put("jLabel27", new Rectangle (30, 135, 126, 14)); 212 baselinePosition.put("jLabel27-126-14", new Integer (11)); 213 compBounds.put("jComboBox9", new Rectangle (160, 31, 230, 22)); 214 baselinePosition.put("jComboBox9-230-22", new Integer (15)); 215 compBounds.put("jComboBox11", new Rectangle (160, 103, 230, 22)); 216 baselinePosition.put("jComboBox11-230-22", new Integer (15)); 217 compBounds.put("jComboBox13", new Rectangle (160, 131, 230, 22)); 218 baselinePosition.put("jComboBox13-230-22", new Integer (15)); 219 compBounds.put("jLabel22", new Rectangle (20, 83, 113, 14)); 220 baselinePosition.put("jLabel22-113-14", new Integer (11)); 221 compBounds.put("jLabel19", new Rectangle (20, 11, 46, 14)); 222 baselinePosition.put("jLabel19-46-14", new Integer (11)); 223 compBounds.put("jLabel20", new Rectangle (30, 35, 91, 14)); 224 baselinePosition.put("jLabel20-91-14", new Integer (11)); 225 ld.updateCurrentState(); 226 } 228 229 } 230 | Popular Tags |