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.HashMap ; 28 import org.openide.filesystems.FileObject; 29 import org.openide.filesystems.FileUtil; 30 import org.netbeans.modules.form.RADComponent; 31 32 public class ALT_Resizing04Test extends LayoutTestCase { 33 34 public ALT_Resizing04Test(String 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 (url.getFile() + goldenFilesPath + className + "-StartingForm.form").getCanonicalFile()); 40 } catch (IOException ioe) { 41 fail(ioe.toString()); 42 } 43 } 44 45 public void doChanges0() { 47 ld.externalSizeChangeHappened(); 48 contInterior.put("jPanel1", new Rectangle (93, 84, 100, 100)); 50 compBounds.put("jPanel1", new Rectangle (93, 84, 100, 100)); 51 baselinePosition.put("jPanel1-100-100", new Integer (0)); 52 compMinSize.put("jPanel1", new Dimension (0, 0)); 53 compPrefSize.put("jPanel1", new Dimension (100, 100)); 54 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 55 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 56 contInterior.put("Form", new Rectangle (0, 0, 404, 400)); 57 compBounds.put("jScrollPane1", new Rectangle (10, 11, 77, 291)); 58 baselinePosition.put("jScrollPane1-77-291", new Integer (0)); 59 compPrefSize.put("jScrollPane1", new Dimension (77, 324)); 60 compBounds.put("jTextField1", new Rectangle (93, 11, 209, 20)); 61 baselinePosition.put("jTextField1-209-20", new Integer (14)); 62 compPrefSize.put("jTextField1", new Dimension (59, 20)); 63 compBounds.put("jPanel1", new Rectangle (93, 84, 100, 100)); 64 baselinePosition.put("jPanel1-100-100", new Integer (0)); 65 compBounds.put("jButton1", new Rectangle (10, 308, 75, 23)); 66 baselinePosition.put("jButton1-75-23", new Integer (15)); 67 compPrefSize.put("jButton1", new Dimension (75, 23)); 68 compBounds.put("jButton2", new Rectangle (10, 337, 75, 23)); 69 baselinePosition.put("jButton2-75-23", new Integer (15)); 70 compPrefSize.put("jButton2", new Dimension (75, 23)); 71 compBounds.put("jButton3", new Rectangle (10, 366, 75, 23)); 72 baselinePosition.put("jButton3-75-23", new Integer (15)); 73 compPrefSize.put("jButton3", new Dimension (75, 23)); 74 prefPadding.put("jScrollPane1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jPanel1-0-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton3-0-0", new Integer (10)); prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jPanel1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); ld.updateCurrentState(); 88 { 91 String [] compIds = new String [] { 92 "jScrollPane1" 93 }; 94 Rectangle [] bounds = new Rectangle [] { 95 new Rectangle (10, 11, 77, 291) 96 }; 97 Point hotspot = new Point (84,154); 98 int[] resizeEdges = new int[] { 99 1 100 ,-1 101 }; 102 boolean inLayout = true; 103 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 104 } 105 baselinePosition.put("jScrollPane1-77-291", new Integer (0)); 106 compPrefSize.put("jScrollPane1", new Dimension (77, 324)); 107 { 110 Point p = new Point (111,156); 111 String containerId= "Form"; 112 boolean autoPositioning = true; 113 boolean lockDimension = false; 114 Rectangle [] bounds = new Rectangle [] { 115 new Rectangle (10, 11, 104, 291) 116 }; 117 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 118 } 119 { 122 Point p = new Point (112,156); 123 String containerId= "Form"; 124 boolean autoPositioning = true; 125 boolean lockDimension = false; 126 Rectangle [] bounds = new Rectangle [] { 127 new Rectangle (10, 11, 105, 291) 128 }; 129 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 130 } 131 prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); ld.endMoving(true); 135 ld.externalSizeChangeHappened(); 137 contInterior.put("jPanel1", new Rectangle (121, 84, 100, 100)); 139 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 100)); 140 baselinePosition.put("jPanel1-100-100", new Integer (0)); 141 compMinSize.put("jPanel1", new Dimension (0, 0)); 142 compPrefSize.put("jPanel1", new Dimension (100, 100)); 143 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 144 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 145 contInterior.put("Form", new Rectangle (0, 0, 404, 400)); 146 compBounds.put("jTextField1", new Rectangle (121, 11, 209, 20)); 147 baselinePosition.put("jTextField1-209-20", new Integer (14)); 148 compPrefSize.put("jTextField1", new Dimension (59, 20)); 149 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 100)); 150 baselinePosition.put("jPanel1-100-100", new Integer (0)); 151 compBounds.put("jButton1", new Rectangle (10, 308, 75, 23)); 152 baselinePosition.put("jButton1-75-23", new Integer (15)); 153 compPrefSize.put("jButton1", new Dimension (75, 23)); 154 compBounds.put("jButton2", new Rectangle (10, 337, 75, 23)); 155 baselinePosition.put("jButton2-75-23", new Integer (15)); 156 compPrefSize.put("jButton2", new Dimension (75, 23)); 157 compBounds.put("jButton3", new Rectangle (10, 366, 75, 23)); 158 baselinePosition.put("jButton3-75-23", new Integer (15)); 159 compPrefSize.put("jButton3", new Dimension (75, 23)); 160 compBounds.put("jScrollPane1", new Rectangle (10, 11, 105, 291)); 161 baselinePosition.put("jScrollPane1-105-291", new Integer (0)); 162 compPrefSize.put("jScrollPane1", new Dimension (77, 324)); 163 prefPadding.put("jScrollPane1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jPanel1-0-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton3-0-0", new Integer (10)); prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton1-0-1", new Integer (10)); prefPaddingInParent.put("Form-jButton2-0-1", new Integer (10)); prefPaddingInParent.put("Form-jButton3-0-1", new Integer (10)); prefPaddingInParent.put("Form-jTextField1-0-1", new Integer (10)); prefPaddingInParent.put("Form-jPanel1-0-1", new Integer (10)); prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jPanel1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); ld.updateCurrentState(); 182 } 184 185 public void doChanges1() { 187 { 189 String [] compIds = new String [] { 190 "jPanel1" 191 }; 192 Rectangle [] bounds = new Rectangle [] { 193 new Rectangle (121, 84, 100, 100) 194 }; 195 Point hotspot = new Point (164,181); 196 int[] resizeEdges = new int[] { 197 -1 198 ,1 199 }; 200 boolean inLayout = true; 201 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 202 } 203 baselinePosition.put("jPanel1-100-100", new Integer (0)); 204 compMinSize.put("jPanel1", new Dimension (0, 0)); 205 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); { 209 Point p = new Point (165,384); 210 String containerId= "Form"; 211 boolean autoPositioning = true; 212 boolean lockDimension = false; 213 Rectangle [] bounds = new Rectangle [] { 214 new Rectangle (121, 84, 100, 305) 215 }; 216 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 217 } 218 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); { 222 Point p = new Point (166,384); 223 String containerId= "Form"; 224 boolean autoPositioning = true; 225 boolean lockDimension = false; 226 Rectangle [] bounds = new Rectangle [] { 227 new Rectangle (121, 84, 100, 305) 228 }; 229 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 230 } 231 prefPadding.put("jTextField1-jPanel1-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); prefPadding.put("jButton1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jPanel1-0-0-0", new Integer (6)); prefPaddingInParent.put("Form-jPanel1-0-1", new Integer (10)); contInterior.put("jPanel1", new Rectangle (121, 84, 100, 305)); 240 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 305)); 241 baselinePosition.put("jPanel1-100-305", new Integer (0)); 242 compMinSize.put("jPanel1", new Dimension (0, 0)); 243 compPrefSize.put("jPanel1", new Dimension (100, 100)); 244 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 245 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 246 ld.endMoving(true); 247 ld.externalSizeChangeHappened(); 249 contInterior.put("jPanel1", new Rectangle (121, 84, 100, 305)); 251 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 305)); 252 baselinePosition.put("jPanel1-100-305", new Integer (0)); 253 compMinSize.put("jPanel1", new Dimension (0, 0)); 254 compPrefSize.put("jPanel1", new Dimension (100, 305)); 255 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 256 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 257 contInterior.put("Form", new Rectangle (0, 0, 404, 400)); 258 compBounds.put("jTextField1", new Rectangle (121, 11, 209, 20)); 259 baselinePosition.put("jTextField1-209-20", new Integer (14)); 260 compPrefSize.put("jTextField1", new Dimension (59, 20)); 261 compBounds.put("jButton1", new Rectangle (10, 308, 75, 23)); 262 baselinePosition.put("jButton1-75-23", new Integer (15)); 263 compPrefSize.put("jButton1", new Dimension (75, 23)); 264 compBounds.put("jButton2", new Rectangle (10, 337, 75, 23)); 265 baselinePosition.put("jButton2-75-23", new Integer (15)); 266 compPrefSize.put("jButton2", new Dimension (75, 23)); 267 compBounds.put("jButton3", new Rectangle (10, 366, 75, 23)); 268 baselinePosition.put("jButton3-75-23", new Integer (15)); 269 compPrefSize.put("jButton3", new Dimension (75, 23)); 270 compBounds.put("jScrollPane1", new Rectangle (10, 11, 105, 291)); 271 baselinePosition.put("jScrollPane1-105-291", new Integer (0)); 272 compPrefSize.put("jScrollPane1", new Dimension (77, 324)); 273 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 305)); 274 baselinePosition.put("jPanel1-100-305", new Integer (0)); 275 prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton3-0-0", new Integer (10)); prefPadding.put("jScrollPane1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); ld.updateCurrentState(); 295 } 297 298 public void doChanges2() { 300 { 302 String [] compIds = new String [] { 303 "jPanel1" 304 }; 305 Rectangle [] bounds = new Rectangle [] { 306 new Rectangle (121, 84, 100, 305) 307 }; 308 Point hotspot = new Point (169,388); 309 int[] resizeEdges = new int[] { 310 -1 311 ,1 312 }; 313 boolean inLayout = true; 314 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 315 } 316 baselinePosition.put("jPanel1-100-305", new Integer (0)); 317 compMinSize.put("jPanel1", new Dimension (0, 0)); 318 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); { 322 Point p = new Point (168,367); 323 String containerId= "Form"; 324 boolean autoPositioning = true; 325 boolean lockDimension = false; 326 Rectangle [] bounds = new Rectangle [] { 327 new Rectangle (121, 84, 100, 284) 328 }; 329 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 330 } 331 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); { 335 Point p = new Point (168,366); 336 String containerId= "Form"; 337 boolean autoPositioning = true; 338 boolean lockDimension = false; 339 Rectangle [] bounds = new Rectangle [] { 340 new Rectangle (121, 84, 100, 276) 341 }; 342 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 343 } 344 prefPadding.put("jTextField1-jPanel1-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jPanel1-0-1", new Integer (10)); contInterior.put("jPanel1", new Rectangle (121, 84, 100, 276)); 349 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 276)); 350 baselinePosition.put("jPanel1-100-276", new Integer (0)); 351 compMinSize.put("jPanel1", new Dimension (0, 0)); 352 compPrefSize.put("jPanel1", new Dimension (100, 305)); 353 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 354 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 355 prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); compPrefSize.put("jButton1", new Dimension (75, 23)); 359 prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); compPrefSize.put("jButton2", new Dimension (75, 23)); 361 compPrefSize.put("jTextField1", new Dimension (59, 20)); 362 compPrefSize.put("jPanel1", new Dimension (100, 305)); 363 prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); prefPadding.put("jPanel1-jButton3-1-0-0", new Integer (6)); compPrefSize.put("jButton3", new Dimension (75, 23)); 366 prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); ld.endMoving(true); 368 ld.externalSizeChangeHappened(); 370 contInterior.put("jPanel1", new Rectangle (121, 84, 100, 276)); 372 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 276)); 373 baselinePosition.put("jPanel1-100-276", new Integer (0)); 374 compMinSize.put("jPanel1", new Dimension (0, 0)); 375 compPrefSize.put("jPanel1", new Dimension (100, 276)); 376 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 377 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 378 contInterior.put("Form", new Rectangle (0, 0, 404, 400)); 379 compBounds.put("jTextField1", new Rectangle (121, 11, 209, 20)); 380 baselinePosition.put("jTextField1-209-20", new Integer (14)); 381 compPrefSize.put("jTextField1", new Dimension (59, 20)); 382 compBounds.put("jButton1", new Rectangle (10, 308, 75, 23)); 383 baselinePosition.put("jButton1-75-23", new Integer (15)); 384 compPrefSize.put("jButton1", new Dimension (75, 23)); 385 compBounds.put("jButton2", new Rectangle (10, 337, 75, 23)); 386 baselinePosition.put("jButton2-75-23", new Integer (15)); 387 compPrefSize.put("jButton2", new Dimension (75, 23)); 388 compBounds.put("jButton3", new Rectangle (10, 366, 75, 23)); 389 baselinePosition.put("jButton3-75-23", new Integer (15)); 390 compPrefSize.put("jButton3", new Dimension (75, 23)); 391 compBounds.put("jScrollPane1", new Rectangle (10, 11, 105, 291)); 392 baselinePosition.put("jScrollPane1-105-291", new Integer (0)); 393 compPrefSize.put("jScrollPane1", new Dimension (77, 324)); 394 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 276)); 395 baselinePosition.put("jPanel1-100-276", new Integer (0)); 396 prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton3-0-0", new Integer (10)); prefPadding.put("jScrollPane1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); prefPadding.put("jPanel1-jButton3-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); ld.updateCurrentState(); 416 } 418 419 public void doChanges3() { 421 { 423 String [] compIds = new String [] { 424 "jPanel1" 425 }; 426 Rectangle [] bounds = new Rectangle [] { 427 new Rectangle (121, 84, 100, 276) 428 }; 429 Point hotspot = new Point (168,364); 430 int[] resizeEdges = new int[] { 431 -1 432 ,1 433 }; 434 boolean inLayout = true; 435 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 436 } 437 baselinePosition.put("jPanel1-100-276", new Integer (0)); 438 compMinSize.put("jPanel1", new Dimension (0, 0)); 439 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); { 443 Point p = new Point (164,341); 444 String containerId= "Form"; 445 boolean autoPositioning = true; 446 boolean lockDimension = false; 447 Rectangle [] bounds = new Rectangle [] { 448 new Rectangle (121, 84, 100, 247) 449 }; 450 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 451 } 452 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); { 456 Point p = new Point (164,340); 457 String containerId= "Form"; 458 boolean autoPositioning = true; 459 boolean lockDimension = false; 460 Rectangle [] bounds = new Rectangle [] { 461 new Rectangle (121, 84, 100, 247) 462 }; 463 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 464 } 465 prefPadding.put("jTextField1-jPanel1-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jPanel1-0-1", new Integer (10)); contInterior.put("jPanel1", new Rectangle (121, 84, 100, 247)); 470 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 247)); 471 baselinePosition.put("jPanel1-100-247", new Integer (0)); 472 compMinSize.put("jPanel1", new Dimension (0, 0)); 473 compPrefSize.put("jPanel1", new Dimension (100, 276)); 474 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 475 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 476 prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); compPrefSize.put("jButton1", new Dimension (75, 23)); 480 compPrefSize.put("jTextField1", new Dimension (59, 20)); 481 compPrefSize.put("jPanel1", new Dimension (100, 276)); 482 prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPadding.put("jPanel1-jButton2-1-0-0", new Integer (6)); compPrefSize.put("jButton2", new Dimension (75, 23)); 485 prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); compPrefSize.put("jButton3", new Dimension (75, 23)); 487 prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); ld.endMoving(true); 489 ld.externalSizeChangeHappened(); 491 contInterior.put("jPanel1", new Rectangle (121, 84, 100, 247)); 493 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 247)); 494 baselinePosition.put("jPanel1-100-247", new Integer (0)); 495 compMinSize.put("jPanel1", new Dimension (0, 0)); 496 compPrefSize.put("jPanel1", new Dimension (100, 247)); 497 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 498 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 499 contInterior.put("Form", new Rectangle (0, 0, 404, 400)); 500 compBounds.put("jTextField1", new Rectangle (121, 11, 209, 20)); 501 baselinePosition.put("jTextField1-209-20", new Integer (14)); 502 compPrefSize.put("jTextField1", new Dimension (59, 20)); 503 compBounds.put("jButton1", new Rectangle (10, 308, 75, 23)); 504 baselinePosition.put("jButton1-75-23", new Integer (15)); 505 compPrefSize.put("jButton1", new Dimension (75, 23)); 506 compBounds.put("jButton2", new Rectangle (10, 337, 75, 23)); 507 baselinePosition.put("jButton2-75-23", new Integer (15)); 508 compPrefSize.put("jButton2", new Dimension (75, 23)); 509 compBounds.put("jButton3", new Rectangle (10, 366, 75, 23)); 510 baselinePosition.put("jButton3-75-23", new Integer (15)); 511 compPrefSize.put("jButton3", new Dimension (75, 23)); 512 compBounds.put("jScrollPane1", new Rectangle (10, 11, 105, 291)); 513 baselinePosition.put("jScrollPane1-105-291", new Integer (0)); 514 compPrefSize.put("jScrollPane1", new Dimension (77, 324)); 515 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 247)); 516 baselinePosition.put("jPanel1-100-247", new Integer (0)); 517 prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton3-0-0", new Integer (10)); prefPadding.put("jScrollPane1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPadding.put("jPanel1-jButton2-1-0-0", new Integer (6)); prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); ld.updateCurrentState(); 537 } 539 540 public void doChanges4() { 542 { 544 String [] compIds = new String [] { 545 "jPanel1" 546 }; 547 Rectangle [] bounds = new Rectangle [] { 548 new Rectangle (121, 84, 100, 247) 549 }; 550 Point hotspot = new Point (169,335); 551 int[] resizeEdges = new int[] { 552 -1 553 ,1 554 }; 555 boolean inLayout = true; 556 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 557 } 558 baselinePosition.put("jPanel1-100-247", new Integer (0)); 559 compMinSize.put("jPanel1", new Dimension (0, 0)); 560 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); { 564 Point p = new Point (160,311); 565 String containerId= "Form"; 566 boolean autoPositioning = true; 567 boolean lockDimension = false; 568 Rectangle [] bounds = new Rectangle [] { 569 new Rectangle (121, 84, 100, 218) 570 }; 571 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 572 } 573 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); { 577 Point p = new Point (160,310); 578 String containerId= "Form"; 579 boolean autoPositioning = true; 580 boolean lockDimension = false; 581 Rectangle [] bounds = new Rectangle [] { 582 new Rectangle (121, 84, 100, 218) 583 }; 584 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 585 } 586 prefPadding.put("jTextField1-jPanel1-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jPanel1-0-1", new Integer (10)); contInterior.put("jPanel1", new Rectangle (121, 84, 100, 218)); 591 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 218)); 592 baselinePosition.put("jPanel1-100-218", new Integer (0)); 593 compMinSize.put("jPanel1", new Dimension (0, 0)); 594 compPrefSize.put("jPanel1", new Dimension (100, 247)); 595 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 596 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 597 prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); compPrefSize.put("jTextField1", new Dimension (59, 20)); 600 compPrefSize.put("jPanel1", new Dimension (100, 247)); 601 prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jPanel1-jButton1-1-0-0", new Integer (6)); compPrefSize.put("jButton1", new Dimension (75, 23)); 604 prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); compPrefSize.put("jButton2", new Dimension (75, 23)); 606 prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); compPrefSize.put("jButton3", new Dimension (75, 23)); 608 prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); ld.endMoving(true); 610 ld.externalSizeChangeHappened(); 612 contInterior.put("jPanel1", new Rectangle (121, 84, 100, 218)); 614 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 218)); 615 baselinePosition.put("jPanel1-100-218", new Integer (0)); 616 compMinSize.put("jPanel1", new Dimension (0, 0)); 617 compPrefSize.put("jPanel1", new Dimension (100, 218)); 618 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 619 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 620 contInterior.put("Form", new Rectangle (0, 0, 404, 400)); 621 compBounds.put("jTextField1", new Rectangle (121, 11, 209, 20)); 622 baselinePosition.put("jTextField1-209-20", new Integer (14)); 623 compPrefSize.put("jTextField1", new Dimension (59, 20)); 624 compBounds.put("jButton1", new Rectangle (10, 308, 75, 23)); 625 baselinePosition.put("jButton1-75-23", new Integer (15)); 626 compPrefSize.put("jButton1", new Dimension (75, 23)); 627 compBounds.put("jButton2", new Rectangle (10, 337, 75, 23)); 628 baselinePosition.put("jButton2-75-23", new Integer (15)); 629 compPrefSize.put("jButton2", new Dimension (75, 23)); 630 compBounds.put("jButton3", new Rectangle (10, 366, 75, 23)); 631 baselinePosition.put("jButton3-75-23", new Integer (15)); 632 compPrefSize.put("jButton3", new Dimension (75, 23)); 633 compBounds.put("jScrollPane1", new Rectangle (10, 11, 105, 291)); 634 baselinePosition.put("jScrollPane1-105-291", new Integer (0)); 635 compPrefSize.put("jScrollPane1", new Dimension (77, 324)); 636 compBounds.put("jPanel1", new Rectangle (121, 84, 100, 218)); 637 baselinePosition.put("jPanel1-100-218", new Integer (0)); 638 prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton3-0-0", new Integer (10)); prefPadding.put("jScrollPane1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jPanel1-0-0-0", new Integer (6)); prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jPanel1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); ld.updateCurrentState(); 658 } 660 661 public void doChanges5() { 664 { 666 String [] compIds = new String [] { 667 "jPanel1" 668 }; 669 Rectangle [] bounds = new Rectangle [] { 670 new Rectangle (121, 84, 100, 218) 671 }; 672 Point hotspot = new Point (220,305); 673 int[] resizeEdges = new int[] { 674 1 675 ,1 676 }; 677 boolean inLayout = true; 678 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 679 } 680 baselinePosition.put("jPanel1-100-218", new Integer (0)); 681 compMinSize.put("jPanel1", new Dimension (0, 0)); 682 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); prefPaddingInParent.put("Form-jPanel1-0-1", new Integer (10)); { 687 Point p = new Point (326,385); 688 String containerId= "Form"; 689 boolean autoPositioning = true; 690 boolean lockDimension = false; 691 Rectangle [] bounds = new Rectangle [] { 692 new Rectangle (121, 84, 209, 305) 693 }; 694 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 695 } 696 prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); prefPaddingInParent.put("Form-jPanel1-0-1", new Integer (10)); { 701 Point p = new Point (327,385); 702 String containerId= "Form"; 703 boolean autoPositioning = true; 704 boolean lockDimension = false; 705 Rectangle [] bounds = new Rectangle [] { 706 new Rectangle (121, 84, 209, 305) 707 }; 708 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 709 } 710 compPrefSize.put("jPanel1", new Dimension (100, 218)); 713 prefPadding.put("jTextField1-jPanel1-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); contInterior.put("jPanel1", new Rectangle (121, 84, 209, 305)); 716 compBounds.put("jPanel1", new Rectangle (121, 84, 209, 305)); 717 baselinePosition.put("jPanel1-209-305", new Integer (0)); 718 compMinSize.put("jPanel1", new Dimension (0, 0)); 719 compPrefSize.put("jPanel1", new Dimension (100, 218)); 720 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 721 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 722 ld.endMoving(true); 723 ld.externalSizeChangeHappened(); 725 contInterior.put("jPanel1", new Rectangle (121, 84, 209, 305)); 727 compBounds.put("jPanel1", new Rectangle (121, 84, 209, 305)); 728 baselinePosition.put("jPanel1-209-305", new Integer (0)); 729 compMinSize.put("jPanel1", new Dimension (0, 0)); 730 compPrefSize.put("jPanel1", new Dimension (209, 305)); 731 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 732 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 733 contInterior.put("Form", new Rectangle (0, 0, 404, 400)); 734 compBounds.put("jTextField1", new Rectangle (121, 11, 209, 20)); 735 baselinePosition.put("jTextField1-209-20", new Integer (14)); 736 compPrefSize.put("jTextField1", new Dimension (59, 20)); 737 compBounds.put("jButton1", new Rectangle (10, 308, 75, 23)); 738 baselinePosition.put("jButton1-75-23", new Integer (15)); 739 compPrefSize.put("jButton1", new Dimension (75, 23)); 740 compBounds.put("jButton2", new Rectangle (10, 337, 75, 23)); 741 baselinePosition.put("jButton2-75-23", new Integer (15)); 742 compPrefSize.put("jButton2", new Dimension (75, 23)); 743 compBounds.put("jButton3", new Rectangle (10, 366, 75, 23)); 744 baselinePosition.put("jButton3-75-23", new Integer (15)); 745 compPrefSize.put("jButton3", new Dimension (75, 23)); 746 compBounds.put("jScrollPane1", new Rectangle (10, 11, 105, 291)); 747 baselinePosition.put("jScrollPane1-105-291", new Integer (0)); 748 compPrefSize.put("jScrollPane1", new Dimension (77, 324)); 749 compBounds.put("jPanel1", new Rectangle (121, 84, 209, 305)); 750 baselinePosition.put("jPanel1-209-305", new Integer (0)); 751 prefPaddingInParent.put("Form-jScrollPane1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton3-0-0", new Integer (10)); prefPadding.put("jScrollPane1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton2-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jPanel1-0-0-0", new Integer (6)); prefPadding.put("jButton3-jTextField1-0-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPadding.put("jButton2-jButton3-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jScrollPane1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jTextField1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jButton3-1-1", new Integer (11)); prefPaddingInParent.put("Form-jPanel1-1-1", new Integer (11)); ld.updateCurrentState(); 771 } 773 774 } 775 | Popular Tags |