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_Bug66919Test extends LayoutTestCase { 31 32 public ALT_Bug66919Test(String 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 (url.getFile() + goldenFilesPath + className + "-StartingForm.form").getCanonicalFile()); 38 } catch (IOException ioe) { 39 fail(ioe.toString()); 40 } 41 } 42 43 public void doChanges0() { 47 ld.externalSizeChangeHappened(); 48 contInterior.put("jPanel1", new Rectangle (115, 31, 274, 157)); 50 compBounds.put("jPanel1", new Rectangle (109, 11, 286, 183)); 51 baselinePosition.put("jPanel1-286-183", new Integer (0)); 52 compMinSize.put("jPanel1", new Dimension (12, 26)); 53 compPrefSize.put("jPanel1", new Dimension (286, 183)); 54 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 55 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 56 contInterior.put("Form", new Rectangle (0, 0, 778, 481)); 57 compBounds.put("add", new Rectangle (10, 11, 93, 23)); 58 baselinePosition.put("add-93-23", new Integer (15)); 59 compPrefSize.put("add", new Dimension (93, 23)); 60 compBounds.put("jPanel1", new Rectangle (109, 11, 286, 183)); 61 baselinePosition.put("jPanel1-286-183", new Integer (0)); 62 compBounds.put("save", new Rectangle (401, 173, 92, 23)); 63 baselinePosition.put("save-92-23", new Integer (15)); 64 compPrefSize.put("save", new Dimension (59, 23)); 65 compBounds.put("delete", new Rectangle (631, 173, 137, 23)); 66 baselinePosition.put("delete-137-23", new Integer (15)); 67 compPrefSize.put("delete", new Dimension (65, 23)); 68 compBounds.put("jPanel2", new Rectangle (401, 11, 348, 164)); 69 baselinePosition.put("jPanel2-348-164", new Integer (0)); 70 prefPaddingInParent.put("Form-add-0-0", new Integer (10)); prefPadding.put("add-jPanel1-0-0-0", new Integer (6)); prefPaddingInParent.put("Form-jPanel2-0-1", new Integer (10)); prefPaddingInParent.put("Form-delete-0-1", new Integer (10)); prefPaddingInParent.put("Form-jPanel2-1-0", new Integer (11)); prefPaddingInParent.put("Form-jPanel1-1-0", new Integer (11)); prefPaddingInParent.put("Form-add-1-0", new Integer (11)); contInterior.put("jPanel2", new Rectangle (407, 31, 336, 138)); 78 compBounds.put("jPanel2", new Rectangle (401, 11, 348, 164)); 79 baselinePosition.put("jPanel2-348-164", new Integer (0)); 80 compMinSize.put("jPanel2", new Dimension (12, 26)); 81 compPrefSize.put("jPanel2", new Dimension (348, 164)); 82 hasExplicitPrefSize.put("jPanel2", new Boolean (false)); 83 hasExplicitPrefSize.put("jPanel2", new Boolean (false)); 84 ld.updateCurrentState(); 85 { 88 String [] compIds = new String [] { 89 "save" 90 }; 91 Rectangle [] bounds = new Rectangle [] { 92 new Rectangle (401, 173, 92, 23) 93 }; 94 Point hotspot = new Point (494,186); 95 int[] resizeEdges = new int[] { 96 1, 97 -1 98 }; 99 boolean inLayout = true; 100 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 101 } 102 baselinePosition.put("save-92-23", new Integer (15)); 103 compPrefSize.put("save", new Dimension (59, 23)); 104 prefPadding.put("save-delete-0-0-0", new Integer (6)); { 108 Point p = new Point (515,184); 109 String containerId= "Form"; 110 boolean autoPositioning = true; 111 boolean lockDimension = false; 112 Rectangle [] bounds = new Rectangle [] { 113 new Rectangle (401, 173, 113, 23) 114 }; 115 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 116 } 117 prefPadding.put("save-delete-0-0-0", new Integer (6)); { 121 Point p = new Point (516,184); 122 String containerId= "Form"; 123 boolean autoPositioning = true; 124 boolean lockDimension = false; 125 Rectangle [] bounds = new Rectangle [] { 126 new Rectangle (401, 173, 114, 23) 127 }; 128 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 129 } 130 prefPadding.put("save-delete-0-0-0", new Integer (6)); ld.endMoving(true); 134 ld.externalSizeChangeHappened(); 136 contInterior.put("jPanel1", new Rectangle (115, 31, 274, 157)); 138 compBounds.put("jPanel1", new Rectangle (109, 11, 286, 183)); 139 baselinePosition.put("jPanel1-286-183", new Integer (0)); 140 compMinSize.put("jPanel1", new Dimension (12, 26)); 141 compPrefSize.put("jPanel1", new Dimension (286, 183)); 142 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 143 hasExplicitPrefSize.put("jPanel1", new Boolean (false)); 144 contInterior.put("Form", new Rectangle (0, 0, 778, 481)); 145 compBounds.put("add", new Rectangle (10, 11, 93, 23)); 146 baselinePosition.put("add-93-23", new Integer (15)); 147 compPrefSize.put("add", new Dimension (93, 23)); 148 compBounds.put("jPanel1", new Rectangle (109, 11, 286, 183)); 149 baselinePosition.put("jPanel1-286-183", new Integer (0)); 150 compBounds.put("delete", new Rectangle (631, 173, 137, 23)); 151 baselinePosition.put("delete-137-23", new Integer (15)); 152 compPrefSize.put("delete", new Dimension (65, 23)); 153 compBounds.put("jPanel2", new Rectangle (401, 11, 348, 164)); 154 baselinePosition.put("jPanel2-348-164", new Integer (0)); 155 compBounds.put("save", new Rectangle (401, 173, 114, 23)); 156 baselinePosition.put("save-114-23", new Integer (15)); 157 compPrefSize.put("save", new Dimension (59, 23)); 158 prefPaddingInParent.put("Form-add-0-0", new Integer (10)); prefPadding.put("add-jPanel1-0-0-0", new Integer (6)); prefPaddingInParent.put("Form-jPanel2-0-1", new Integer (10)); prefPaddingInParent.put("Form-delete-0-1", new Integer (10)); prefPaddingInParent.put("Form-jPanel2-1-0", new Integer (11)); prefPaddingInParent.put("Form-jPanel1-1-0", new Integer (11)); prefPaddingInParent.put("Form-add-1-0", new Integer (11)); contInterior.put("jPanel2", new Rectangle (407, 31, 336, 138)); 166 compBounds.put("jPanel2", new Rectangle (401, 11, 348, 164)); 167 baselinePosition.put("jPanel2-348-164", new Integer (0)); 168 compMinSize.put("jPanel2", new Dimension (12, 26)); 169 compPrefSize.put("jPanel2", new Dimension (348, 164)); 170 hasExplicitPrefSize.put("jPanel2", new Boolean (false)); 171 hasExplicitPrefSize.put("jPanel2", new Boolean (false)); 172 ld.updateCurrentState(); 173 } 175 176 } 177 | Popular Tags |