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_ParallelPosition19Test extends LayoutTestCase { 32 33 public ALT_ParallelPosition19Test(String name) { 34 super(name); 35 try { 36 className = this.getClass().getName(); 37 className = className.substring(className.lastIndexOf('.') + 1, className.length()); 38 startingFormFile = FileUtil.toFileObject(new File (url.getFile() + goldenFilesPath + className + "-StartingForm.form").getCanonicalFile()); 39 } catch (IOException ioe) { 40 fail(ioe.toString()); 41 } 42 } 43 44 public void doChanges0() { 46 ld.externalSizeChangeHappened(); 47 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 49 compBounds.put("jTextField1", new Rectangle (10, 11, 59, 20)); 50 baselinePosition.put("jTextField1-59-20", new Integer (14)); 51 compPrefSize.put("jTextField1", new Dimension (59, 20)); 52 compBounds.put("jTextField2", new Rectangle (10, 37, 59, 20)); 53 baselinePosition.put("jTextField2-59-20", new Integer (14)); 54 compPrefSize.put("jTextField2", new Dimension (59, 20)); 55 compBounds.put("jTextField3", new Rectangle (10, 63, 59, 20)); 56 baselinePosition.put("jTextField3-59-20", new Integer (14)); 57 compPrefSize.put("jTextField3", new Dimension (59, 20)); 58 compBounds.put("jScrollPane1", new Rectangle (353, 11, 37, 132)); 59 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 60 compPrefSize.put("jScrollPane1", new Dimension (37, 132)); 61 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 62 compBounds.put("jTextField1", new Rectangle (10, 11, 59, 20)); 63 baselinePosition.put("jTextField1-59-20", new Integer (14)); 64 compBounds.put("jTextField2", new Rectangle (10, 37, 59, 20)); 65 baselinePosition.put("jTextField2-59-20", new Integer (14)); 66 compBounds.put("jTextField3", new Rectangle (10, 63, 59, 20)); 67 baselinePosition.put("jTextField3-59-20", new Integer (14)); 68 compBounds.put("jScrollPane1", new Rectangle (353, 11, 37, 132)); 69 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 70 ld.updateCurrentState(); 71 baselinePosition.put("jTextField1-59-20", new Integer (14)); 74 compPrefSize.put("jTextField1", new Dimension (59, 20)); 75 { 76 String [] compIds = new String [] { 77 "jTextField1" 78 }; 79 Rectangle [] bounds = new Rectangle [] { 80 new Rectangle (10, 11, 59, 20) 81 }; 82 Point hotspot = new Point (69,19); 83 int[] resizeEdges = new int[] { 84 1, 85 -1 86 }; 87 boolean inLayout = true; 88 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 89 } 90 prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer (6)); { 94 Point p = new Point (340,36); 95 String containerId= "Form"; 96 boolean autoPositioning = true; 97 boolean lockDimension = false; 98 Rectangle [] bounds = new Rectangle [] { 99 new Rectangle (10, 11, 337, 20) 100 }; 101 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 102 } 103 prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer (6)); { 107 Point p = new Point (341,36); 108 String containerId= "Form"; 109 boolean autoPositioning = true; 110 boolean lockDimension = false; 111 Rectangle [] bounds = new Rectangle [] { 112 new Rectangle (10, 11, 337, 20) 113 }; 114 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 115 } 116 prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer (6)); prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer (6)); prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer (6)); ld.endMoving(true); 122 ld.externalSizeChangeHappened(); 124 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 126 compBounds.put("jTextField2", new Rectangle (10, 37, 59, 20)); 127 baselinePosition.put("jTextField2-59-20", new Integer (14)); 128 compPrefSize.put("jTextField2", new Dimension (59, 20)); 129 compBounds.put("jTextField3", new Rectangle (10, 63, 59, 20)); 130 baselinePosition.put("jTextField3-59-20", new Integer (14)); 131 compPrefSize.put("jTextField3", new Dimension (59, 20)); 132 compBounds.put("jScrollPane1", new Rectangle (353, 11, 37, 132)); 133 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 134 compPrefSize.put("jScrollPane1", new Dimension (37, 132)); 135 compBounds.put("jTextField1", new Rectangle (10, 11, 337, 20)); 136 baselinePosition.put("jTextField1-337-20", new Integer (14)); 137 compPrefSize.put("jTextField1", new Dimension (59, 20)); 138 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 139 compBounds.put("jTextField2", new Rectangle (10, 37, 59, 20)); 140 baselinePosition.put("jTextField2-59-20", new Integer (14)); 141 compBounds.put("jTextField3", new Rectangle (10, 63, 59, 20)); 142 baselinePosition.put("jTextField3-59-20", new Integer (14)); 143 compBounds.put("jScrollPane1", new Rectangle (353, 11, 37, 132)); 144 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 145 compBounds.put("jTextField1", new Rectangle (10, 11, 337, 20)); 146 baselinePosition.put("jTextField1-337-20", new Integer (14)); 147 ld.updateCurrentState(); 148 baselinePosition.put("jTextField2-59-20", new Integer (14)); 151 compPrefSize.put("jTextField2", new Dimension (59, 20)); 152 { 153 String [] compIds = new String [] { 154 "jTextField2" 155 }; 156 Rectangle [] bounds = new Rectangle [] { 157 new Rectangle (10, 37, 59, 20) 158 }; 159 Point hotspot = new Point (70,48); 160 int[] resizeEdges = new int[] { 161 1, 162 -1 163 }; 164 boolean inLayout = true; 165 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 166 } 167 prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer (6)); { 171 Point p = new Point (343,53); 172 String containerId= "Form"; 173 boolean autoPositioning = true; 174 boolean lockDimension = false; 175 Rectangle [] bounds = new Rectangle [] { 176 new Rectangle (10, 37, 337, 20) 177 }; 178 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 179 } 180 prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer (6)); { 184 Point p = new Point (344,53); 185 String containerId= "Form"; 186 boolean autoPositioning = true; 187 boolean lockDimension = false; 188 Rectangle [] bounds = new Rectangle [] { 189 new Rectangle (10, 37, 337, 20) 190 }; 191 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 192 } 193 ld.endMoving(true); 196 ld.externalSizeChangeHappened(); 198 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 200 compBounds.put("jTextField3", new Rectangle (10, 63, 59, 20)); 201 baselinePosition.put("jTextField3-59-20", new Integer (14)); 202 compPrefSize.put("jTextField3", new Dimension (59, 20)); 203 compBounds.put("jScrollPane1", new Rectangle (353, 11, 37, 132)); 204 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 205 compPrefSize.put("jScrollPane1", new Dimension (37, 132)); 206 compBounds.put("jTextField1", new Rectangle (10, 11, 337, 20)); 207 baselinePosition.put("jTextField1-337-20", new Integer (14)); 208 compPrefSize.put("jTextField1", new Dimension (59, 20)); 209 compBounds.put("jTextField2", new Rectangle (10, 37, 337, 20)); 210 baselinePosition.put("jTextField2-337-20", new Integer (14)); 211 compPrefSize.put("jTextField2", new Dimension (59, 20)); 212 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 213 compBounds.put("jTextField3", new Rectangle (10, 63, 59, 20)); 214 baselinePosition.put("jTextField3-59-20", new Integer (14)); 215 compBounds.put("jScrollPane1", new Rectangle (353, 11, 37, 132)); 216 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 217 compBounds.put("jTextField1", new Rectangle (10, 11, 337, 20)); 218 baselinePosition.put("jTextField1-337-20", new Integer (14)); 219 compBounds.put("jTextField2", new Rectangle (10, 37, 337, 20)); 220 baselinePosition.put("jTextField2-337-20", new Integer (14)); 221 ld.updateCurrentState(); 222 baselinePosition.put("jTextField3-59-20", new Integer (14)); 225 compPrefSize.put("jTextField3", new Dimension (59, 20)); 226 { 227 String [] compIds = new String [] { 228 "jTextField3" 229 }; 230 Rectangle [] bounds = new Rectangle [] { 231 new Rectangle (10, 63, 59, 20) 232 }; 233 Point hotspot = new Point (69,74); 234 int[] resizeEdges = new int[] { 235 1, 236 -1 237 }; 238 boolean inLayout = true; 239 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 240 } 241 prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer (6)); { 245 Point p = new Point (341,82); 246 String containerId= "Form"; 247 boolean autoPositioning = true; 248 boolean lockDimension = false; 249 Rectangle [] bounds = new Rectangle [] { 250 new Rectangle (10, 63, 337, 20) 251 }; 252 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 253 } 254 prefPadding.put("jTextField3-jScrollPane1-0-0-0", new Integer (6)); { 258 Point p = new Point (342,82); 259 String containerId= "Form"; 260 boolean autoPositioning = true; 261 boolean lockDimension = false; 262 Rectangle [] bounds = new Rectangle [] { 263 new Rectangle (10, 63, 337, 20) 264 }; 265 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 266 } 267 ld.endMoving(true); 270 ld.externalSizeChangeHappened(); 272 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 274 compBounds.put("jScrollPane1", new Rectangle (353, 11, 37, 132)); 275 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 276 compPrefSize.put("jScrollPane1", new Dimension (37, 132)); 277 compBounds.put("jTextField1", new Rectangle (10, 11, 337, 20)); 278 baselinePosition.put("jTextField1-337-20", new Integer (14)); 279 compPrefSize.put("jTextField1", new Dimension (59, 20)); 280 compBounds.put("jTextField2", new Rectangle (10, 37, 337, 20)); 281 baselinePosition.put("jTextField2-337-20", new Integer (14)); 282 compPrefSize.put("jTextField2", new Dimension (59, 20)); 283 compBounds.put("jTextField3", new Rectangle (10, 63, 337, 20)); 284 baselinePosition.put("jTextField3-337-20", new Integer (14)); 285 compPrefSize.put("jTextField3", new Dimension (59, 20)); 286 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 287 compBounds.put("jScrollPane1", new Rectangle (353, 11, 37, 132)); 288 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 289 compBounds.put("jTextField1", new Rectangle (10, 11, 337, 20)); 290 baselinePosition.put("jTextField1-337-20", new Integer (14)); 291 compBounds.put("jTextField2", new Rectangle (10, 37, 337, 20)); 292 baselinePosition.put("jTextField2-337-20", new Integer (14)); 293 compBounds.put("jTextField3", new Rectangle (10, 63, 337, 20)); 294 baselinePosition.put("jTextField3-337-20", new Integer (14)); 295 ld.updateCurrentState(); 296 } 298 299 } 300 | Popular Tags |