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_Bug69497Test extends LayoutTestCase { 35 36 public ALT_Bug69497Test(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() { 54 ld.externalSizeChangeHappened(); 55 contInterior.put("myJPanel", new Rectangle (0, 0, 203, 183)); 57 compBounds.put("jLabel7", new Rectangle (27, 104, 62, 15)); 58 baselinePosition.put("jLabel7-62-15", new Integer (11)); 59 compPrefSize.put("jLabel7", new Dimension (43, 14)); 60 compBounds.put("jLabel1", new Rectangle (10, 11, 93, 14)); 61 baselinePosition.put("jLabel1-93-14", new Integer (11)); 62 compPrefSize.put("jLabel1", new Dimension (70, 14)); 63 compBounds.put("jLabel3", new Rectangle (10, 35, 93, 14)); 64 baselinePosition.put("jLabel3-93-14", new Integer (11)); 65 compPrefSize.put("jLabel3", new Dimension (70, 14)); 66 compBounds.put("jLabel5", new Rectangle (10, 55, 90, 14)); 67 baselinePosition.put("jLabel5-90-14", new Integer (11)); 68 compPrefSize.put("jLabel5", new Dimension (66, 14)); 69 compBounds.put("jLabel2", new Rectangle (10, 78, 54, 14)); 70 baselinePosition.put("jLabel2-54-14", new Integer (11)); 71 compPrefSize.put("jLabel2", new Dimension (37, 14)); 72 compBounds.put("jLabel6", new Rectangle (10, 155, 62, 14)); 73 baselinePosition.put("jLabel6-62-14", new Integer (11)); 74 compPrefSize.put("jLabel6", new Dimension (43, 14)); 75 compBounds.put("callPriceField", new Rectangle (107, 152, 86, 20)); 76 baselinePosition.put("callPriceField-86-20", new Integer (14)); 77 compPrefSize.put("callPriceField", new Dimension (86, 20)); 78 compBounds.put("callDateField", new Rectangle (107, 130, 86, 20)); 79 baselinePosition.put("callDateField-86-20", new Integer (14)); 80 compPrefSize.put("callDateField", new Dimension (86, 20)); 81 compBounds.put("maturityDateField", new Rectangle (107, 75, 86, 20)); 82 baselinePosition.put("maturityDateField-86-20", new Integer (14)); 83 compPrefSize.put("maturityDateField", new Dimension (86, 20)); 84 compBounds.put("couponField", new Rectangle (107, 101, 86, 20)); 85 baselinePosition.put("couponField-86-20", new Integer (14)); 86 compPrefSize.put("couponField", new Dimension (86, 20)); 87 compBounds.put("purchasePriceField", new Rectangle (107, 45, 86, 20)); 88 baselinePosition.put("purchasePriceField-86-20", new Integer (14)); 89 compPrefSize.put("purchasePriceField", new Dimension (86, 20)); 90 compBounds.put("purchaseDateField", new Rectangle (107, 19, 86, 20)); 91 baselinePosition.put("purchaseDateField-86-20", new Integer (14)); 92 compPrefSize.put("purchaseDateField", new Dimension (86, 20)); 93 prefPaddingInParent.put("myJPanel-callPriceField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-callDateField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-maturityDateField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-couponField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-purchasePriceField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-purchaseDateField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-jLabel1-1-1", new Integer (11)); prefPaddingInParent.put("myJPanel-callPriceField-1-1", new Integer (11)); prefPaddingInParent.put("myJPanel-jLabel6-1-1", new Integer (11)); contInterior.put("myJPanel", new Rectangle (0, 0, 203, 183)); 103 compBounds.put("jLabel7", new Rectangle (27, 104, 62, 15)); 104 baselinePosition.put("jLabel7-62-15", new Integer (11)); 105 compBounds.put("jLabel1", new Rectangle (10, 11, 93, 14)); 106 baselinePosition.put("jLabel1-93-14", new Integer (11)); 107 compBounds.put("jLabel3", new Rectangle (10, 35, 93, 14)); 108 baselinePosition.put("jLabel3-93-14", new Integer (11)); 109 compBounds.put("jLabel5", new Rectangle (10, 55, 90, 14)); 110 baselinePosition.put("jLabel5-90-14", new Integer (11)); 111 compBounds.put("jLabel2", new Rectangle (10, 78, 54, 14)); 112 baselinePosition.put("jLabel2-54-14", new Integer (11)); 113 compBounds.put("jLabel6", new Rectangle (10, 155, 62, 14)); 114 baselinePosition.put("jLabel6-62-14", new Integer (11)); 115 compBounds.put("callPriceField", new Rectangle (107, 152, 86, 20)); 116 baselinePosition.put("callPriceField-86-20", new Integer (14)); 117 compBounds.put("callDateField", new Rectangle (107, 130, 86, 20)); 118 baselinePosition.put("callDateField-86-20", new Integer (14)); 119 compBounds.put("maturityDateField", new Rectangle (107, 75, 86, 20)); 120 baselinePosition.put("maturityDateField-86-20", new Integer (14)); 121 compBounds.put("couponField", new Rectangle (107, 101, 86, 20)); 122 baselinePosition.put("couponField-86-20", new Integer (14)); 123 compBounds.put("purchasePriceField", new Rectangle (107, 45, 86, 20)); 124 baselinePosition.put("purchasePriceField-86-20", new Integer (14)); 125 compBounds.put("purchaseDateField", new Rectangle (107, 19, 86, 20)); 126 baselinePosition.put("purchaseDateField-86-20", new Integer (14)); 127 ld.updateCurrentState(); 128 baselinePosition.put("jLabel7-62-15", new Integer (11)); 131 { 132 String [] compIds = new String [] { 133 "jLabel7" 134 }; 135 Rectangle [] bounds = new Rectangle [] { 136 new Rectangle (27, 104, 62, 15) 137 }; 138 Point hotspot = new Point (50,114); 139 ld.startMoving(compIds, bounds, hotspot); 140 } 141 prefPaddingInParent.put("myJPanel-jLabel7-1-0", new Integer (11)); prefPaddingInParent.put("myJPanel-jLabel7-1-1", new Integer (11)); prefPadding.put("jLabel3-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel5-jLabel7-1-0-0", new Integer (6)); prefPadding.put("maturityDateField-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jLabel7-1-0-0", new Integer (6)); prefPadding.put("callPriceField-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel6-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel7-callPriceField-1-0-0", new Integer (6)); prefPadding.put("jLabel7-jLabel6-1-0-0", new Integer (6)); prefPadding.put("jLabel1-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel7-jLabel1-1-0-0", new Integer (6)); prefPaddingInParent.put("myJPanel-jLabel7-0-0", new Integer (10)); prefPaddingInParent.put("myJPanel-jLabel7-0-1", new Integer (10)); prefPadding.put("jLabel7-couponField-0-0-0", new Integer (4)); prefPadding.put("jLabel2-jLabel7-0-0-2", new Integer (10)); { 160 Point p = new Point (35,113); 161 String containerId= "myJPanel"; 162 boolean autoPositioning = true; 163 boolean lockDimension = false; 164 Rectangle [] bounds = new Rectangle [] { 165 new Rectangle (10, 104, 62, 15) 166 }; 167 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 168 } 169 prefPaddingInParent.put("myJPanel-jLabel7-1-0", new Integer (11)); prefPaddingInParent.put("myJPanel-jLabel7-1-1", new Integer (11)); prefPadding.put("jLabel3-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel5-jLabel7-1-0-0", new Integer (6)); prefPadding.put("maturityDateField-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jLabel7-1-0-0", new Integer (6)); prefPadding.put("callPriceField-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel6-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel7-callPriceField-1-0-0", new Integer (6)); prefPadding.put("jLabel7-jLabel6-1-0-0", new Integer (6)); prefPadding.put("jLabel1-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel7-jLabel1-1-0-0", new Integer (6)); prefPaddingInParent.put("myJPanel-jLabel7-0-0", new Integer (10)); prefPaddingInParent.put("myJPanel-jLabel7-0-1", new Integer (10)); prefPadding.put("jLabel7-couponField-0-0-0", new Integer (4)); prefPadding.put("jLabel2-jLabel7-0-0-2", new Integer (10)); { 188 Point p = new Point (35,112); 189 String containerId= "myJPanel"; 190 boolean autoPositioning = true; 191 boolean lockDimension = false; 192 Rectangle [] bounds = new Rectangle [] { 193 new Rectangle (10, 101, 62, 15) 194 }; 195 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 196 } 197 prefPadding.put("jLabel1-callPriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel1-callDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel1-maturityDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel1-couponField-0-0-0", new Integer (4)); prefPadding.put("jLabel1-purchasePriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel1-purchaseDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel3-callPriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel3-callDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel3-maturityDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel3-couponField-0-0-0", new Integer (4)); prefPadding.put("jLabel3-purchasePriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel3-purchaseDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel5-callPriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel5-callDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel5-maturityDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel5-couponField-0-0-0", new Integer (4)); prefPadding.put("jLabel5-purchasePriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel5-purchaseDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel2-callPriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel2-callDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel2-maturityDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel2-couponField-0-0-0", new Integer (4)); prefPadding.put("jLabel2-purchasePriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel2-purchaseDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel6-callPriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel6-callDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel6-maturityDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel6-couponField-0-0-0", new Integer (4)); prefPadding.put("jLabel6-purchasePriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel6-purchaseDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel7-callPriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel7-callDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel7-maturityDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel7-couponField-0-0-0", new Integer (4)); prefPadding.put("jLabel7-purchasePriceField-0-0-0", new Integer (4)); prefPadding.put("jLabel7-purchaseDateField-0-0-0", new Integer (4)); prefPadding.put("jLabel1-jLabel7-1-0-0", new Integer (6)); prefPadding.put("jLabel7-callPriceField-1-0-0", new Integer (6)); prefPadding.put("jLabel7-jLabel6-1-0-0", new Integer (6)); ld.endMoving(true); 239 ld.externalSizeChangeHappened(); 241 contInterior.put("myJPanel", new Rectangle (0, 0, 203, 183)); 243 compBounds.put("jLabel1", new Rectangle (10, 11, 93, 14)); 244 baselinePosition.put("jLabel1-93-14", new Integer (11)); 245 compPrefSize.put("jLabel1", new Dimension (70, 14)); 246 compBounds.put("jLabel3", new Rectangle (10, 35, 93, 14)); 247 baselinePosition.put("jLabel3-93-14", new Integer (11)); 248 compPrefSize.put("jLabel3", new Dimension (70, 14)); 249 compBounds.put("jLabel5", new Rectangle (10, 55, 90, 14)); 250 baselinePosition.put("jLabel5-90-14", new Integer (11)); 251 compPrefSize.put("jLabel5", new Dimension (66, 14)); 252 compBounds.put("jLabel2", new Rectangle (10, 78, 54, 14)); 253 baselinePosition.put("jLabel2-54-14", new Integer (11)); 254 compPrefSize.put("jLabel2", new Dimension (37, 14)); 255 compBounds.put("jLabel6", new Rectangle (10, 155, 62, 14)); 256 baselinePosition.put("jLabel6-62-14", new Integer (11)); 257 compPrefSize.put("jLabel6", new Dimension (43, 14)); 258 compBounds.put("callPriceField", new Rectangle (107, 152, 86, 20)); 259 baselinePosition.put("callPriceField-86-20", new Integer (14)); 260 compPrefSize.put("callPriceField", new Dimension (86, 20)); 261 compBounds.put("callDateField", new Rectangle (107, 130, 86, 20)); 262 baselinePosition.put("callDateField-86-20", new Integer (14)); 263 compPrefSize.put("callDateField", new Dimension (86, 20)); 264 compBounds.put("maturityDateField", new Rectangle (107, 75, 86, 20)); 265 baselinePosition.put("maturityDateField-86-20", new Integer (14)); 266 compPrefSize.put("maturityDateField", new Dimension (86, 20)); 267 compBounds.put("couponField", new Rectangle (107, 101, 86, 20)); 268 baselinePosition.put("couponField-86-20", new Integer (14)); 269 compPrefSize.put("couponField", new Dimension (86, 20)); 270 compBounds.put("purchasePriceField", new Rectangle (107, 45, 86, 20)); 271 baselinePosition.put("purchasePriceField-86-20", new Integer (14)); 272 compPrefSize.put("purchasePriceField", new Dimension (86, 20)); 273 compBounds.put("purchaseDateField", new Rectangle (107, 19, 86, 20)); 274 baselinePosition.put("purchaseDateField-86-20", new Integer (14)); 275 compPrefSize.put("purchaseDateField", new Dimension (86, 20)); 276 compBounds.put("jLabel7", new Rectangle (10, 101, 62, 15)); 277 baselinePosition.put("jLabel7-62-15", new Integer (11)); 278 compPrefSize.put("jLabel7", new Dimension (43, 14)); 279 prefPaddingInParent.put("myJPanel-callPriceField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-callDateField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-maturityDateField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-couponField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-purchasePriceField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-purchaseDateField-0-1", new Integer (10)); prefPaddingInParent.put("myJPanel-callPriceField-1-1", new Integer (11)); prefPaddingInParent.put("myJPanel-jLabel6-1-1", new Integer (11)); contInterior.put("myJPanel", new Rectangle (0, 0, 203, 183)); 288 compBounds.put("jLabel1", new Rectangle (10, 11, 93, 14)); 289 baselinePosition.put("jLabel1-93-14", new Integer (11)); 290 compBounds.put("jLabel3", new Rectangle (10, 35, 93, 14)); 291 baselinePosition.put("jLabel3-93-14", new Integer (11)); 292 compBounds.put("jLabel5", new Rectangle (10, 55, 90, 14)); 293 baselinePosition.put("jLabel5-90-14", new Integer (11)); 294 compBounds.put("jLabel2", new Rectangle (10, 78, 54, 14)); 295 baselinePosition.put("jLabel2-54-14", new Integer (11)); 296 compBounds.put("jLabel6", new Rectangle (10, 155, 62, 14)); 297 baselinePosition.put("jLabel6-62-14", new Integer (11)); 298 compBounds.put("callPriceField", new Rectangle (107, 152, 86, 20)); 299 baselinePosition.put("callPriceField-86-20", new Integer (14)); 300 compBounds.put("callDateField", new Rectangle (107, 130, 86, 20)); 301 baselinePosition.put("callDateField-86-20", new Integer (14)); 302 compBounds.put("maturityDateField", new Rectangle (107, 75, 86, 20)); 303 baselinePosition.put("maturityDateField-86-20", new Integer (14)); 304 compBounds.put("couponField", new Rectangle (107, 101, 86, 20)); 305 baselinePosition.put("couponField-86-20", new Integer (14)); 306 compBounds.put("purchasePriceField", new Rectangle (107, 45, 86, 20)); 307 baselinePosition.put("purchasePriceField-86-20", new Integer (14)); 308 compBounds.put("purchaseDateField", new Rectangle (107, 19, 86, 20)); 309 baselinePosition.put("purchaseDateField-86-20", new Integer (14)); 310 compBounds.put("jLabel7", new Rectangle (10, 101, 62, 15)); 311 baselinePosition.put("jLabel7-62-15", new Integer (11)); 312 ld.updateCurrentState(); 313 } 315 316 } 317 | Popular Tags |