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_Indent03Test extends LayoutTestCase { 33 34 public ALT_Indent03Test(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() { 48 ld.externalSizeChangeHappened(); 49 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 51 compBounds.put("jLabel1", new Rectangle (10, 11, 68, 14)); 52 baselinePosition.put("jLabel1-68-14", new Integer (11)); 53 compPrefSize.put("jLabel1", new Dimension (68, 14)); 54 compBounds.put("jLabel2", new Rectangle (10, 31, 34, 14)); 55 baselinePosition.put("jLabel2-34-14", new Integer (11)); 56 compPrefSize.put("jLabel2", new Dimension (34, 14)); 57 compBounds.put("jLabel3", new Rectangle (10, 51, 34, 14)); 58 baselinePosition.put("jLabel3-34-14", new Integer (11)); 59 compPrefSize.put("jLabel3", new Dimension (34, 14)); 60 compBounds.put("jLabel4", new Rectangle (10, 71, 34, 14)); 61 baselinePosition.put("jLabel4-34-14", new Integer (11)); 62 compPrefSize.put("jLabel4", new Dimension (34, 14)); 63 compBounds.put("jScrollPane1", new Rectangle (48, 31, 37, 132)); 64 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 65 compPrefSize.put("jScrollPane1", new Dimension (37, 132)); 66 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 67 compBounds.put("jLabel1", new Rectangle (10, 11, 68, 14)); 68 baselinePosition.put("jLabel1-68-14", new Integer (11)); 69 compBounds.put("jLabel2", new Rectangle (10, 31, 34, 14)); 70 baselinePosition.put("jLabel2-34-14", new Integer (11)); 71 compBounds.put("jLabel3", new Rectangle (10, 51, 34, 14)); 72 baselinePosition.put("jLabel3-34-14", new Integer (11)); 73 compBounds.put("jLabel4", new Rectangle (10, 71, 34, 14)); 74 baselinePosition.put("jLabel4-34-14", new Integer (11)); 75 compBounds.put("jScrollPane1", new Rectangle (48, 31, 37, 132)); 76 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 77 ld.updateCurrentState(); 78 baselinePosition.put("jLabel2-34-14", new Integer (11)); 81 { 82 String [] compIds = new String [] { 83 "jLabel2" 84 }; 85 Rectangle [] bounds = new Rectangle [] { 86 new Rectangle (10, 31, 34, 14) 87 }; 88 Point hotspot = new Point (28,37); 89 ld.startMoving(compIds, bounds, hotspot); 90 } 91 prefPaddingInParent.put("Form-jLabel2-1-0", new Integer (11)); prefPaddingInParent.put("Form-jLabel2-1-1", new Integer (11)); prefPadding.put("jLabel1-jLabel2-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jLabel1-1-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jLabel2-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jScrollPane1-1-0-0", new Integer (6)); prefPadding.put("jLabel3-jLabel2-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jLabel3-1-0-0", new Integer (6)); prefPadding.put("jLabel4-jLabel2-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jLabel4-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jLabel2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jLabel2-0-1", new Integer (10)); prefPadding.put("jScrollPane1-jLabel2-0-0-0", new Integer (4)); prefPadding.put("jLabel2-jScrollPane1-0-0-0", new Integer (4)); prefPadding.put("jLabel1-jLabel2-0-0-2", new Integer (10)); { 109 Point p = new Point (35,37); 110 String containerId= "Form"; 111 boolean autoPositioning = true; 112 boolean lockDimension = false; 113 Rectangle [] bounds = new Rectangle [] { 114 new Rectangle (20, 31, 34, 14) 115 }; 116 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 117 } 118 prefPaddingInParent.put("Form-jLabel2-1-0", new Integer (11)); prefPaddingInParent.put("Form-jLabel2-1-1", new Integer (11)); prefPadding.put("jLabel1-jLabel2-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jLabel1-1-0-0", new Integer (6)); prefPadding.put("jScrollPane1-jLabel2-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jScrollPane1-1-0-0", new Integer (6)); prefPadding.put("jLabel3-jLabel2-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jLabel3-1-0-0", new Integer (6)); prefPadding.put("jLabel4-jLabel2-1-0-0", new Integer (6)); prefPadding.put("jLabel2-jLabel4-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jLabel2-0-0", new Integer (10)); prefPaddingInParent.put("Form-jLabel2-0-1", new Integer (10)); prefPadding.put("jScrollPane1-jLabel2-0-0-0", new Integer (4)); prefPadding.put("jLabel2-jScrollPane1-0-0-0", new Integer (4)); prefPadding.put("jLabel1-jLabel2-0-0-2", new Integer (10)); { 136 Point p = new Point (37,37); 137 String containerId= "Form"; 138 boolean autoPositioning = true; 139 boolean lockDimension = false; 140 Rectangle [] bounds = new Rectangle [] { 141 new Rectangle (20, 31, 34, 14) 142 }; 143 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 144 } 145 prefPadding.put("jLabel3-jScrollPane1-0-0-0", new Integer (4)); prefPadding.put("jLabel4-jScrollPane1-0-0-0", new Integer (4)); prefPadding.put("jLabel2-jScrollPane1-0-0-0", new Integer (4)); prefPadding.put("jLabel2-jLabel3-1-0-0", new Integer (6)); ld.endMoving(true); 152 ld.externalSizeChangeHappened(); 154 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 156 compBounds.put("jLabel1", new Rectangle (10, 11, 68, 14)); 157 baselinePosition.put("jLabel1-68-14", new Integer (11)); 158 compPrefSize.put("jLabel1", new Dimension (68, 14)); 159 compBounds.put("jLabel3", new Rectangle (10, 51, 34, 14)); 160 baselinePosition.put("jLabel3-34-14", new Integer (11)); 161 compPrefSize.put("jLabel3", new Dimension (34, 14)); 162 compBounds.put("jLabel4", new Rectangle (10, 71, 34, 14)); 163 baselinePosition.put("jLabel4-34-14", new Integer (11)); 164 compPrefSize.put("jLabel4", new Dimension (34, 14)); 165 compBounds.put("jScrollPane1", new Rectangle (58, 31, 37, 132)); 166 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 167 compPrefSize.put("jScrollPane1", new Dimension (37, 132)); 168 compBounds.put("jLabel2", new Rectangle (20, 31, 34, 14)); 169 baselinePosition.put("jLabel2-34-14", new Integer (11)); 170 compPrefSize.put("jLabel2", new Dimension (34, 14)); 171 prefPaddingInParent.put("Form-jLabel1-0-1", new Integer (10)); prefPaddingInParent.put("Form-jScrollPane1-0-1", new Integer (10)); contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 174 compBounds.put("jLabel1", new Rectangle (10, 11, 68, 14)); 175 baselinePosition.put("jLabel1-68-14", new Integer (11)); 176 compBounds.put("jLabel3", new Rectangle (10, 51, 34, 14)); 177 baselinePosition.put("jLabel3-34-14", new Integer (11)); 178 compBounds.put("jLabel4", new Rectangle (10, 71, 34, 14)); 179 baselinePosition.put("jLabel4-34-14", new Integer (11)); 180 compBounds.put("jScrollPane1", new Rectangle (58, 31, 37, 132)); 181 baselinePosition.put("jScrollPane1-37-132", new Integer (0)); 182 compBounds.put("jLabel2", new Rectangle (20, 31, 34, 14)); 183 baselinePosition.put("jLabel2-34-14", new Integer (11)); 184 ld.updateCurrentState(); 185 } 187 188 } 189 | Popular Tags |