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_ParallelPosition16Test extends LayoutTestCase { 33 34 public ALT_ParallelPosition16Test(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("Form", new Rectangle (0, 0, 400, 300)); 50 compBounds.put("jToggleButton1", new Rectangle (10, 11, 179, 23)); 51 baselinePosition.put("jToggleButton1-179-23", new Integer (15)); 52 compPrefSize.put("jToggleButton1", new Dimension (179, 23)); 53 compBounds.put("jLabel1", new Rectangle (10, 44, 34, 14)); 54 baselinePosition.put("jLabel1-34-14", new Integer (11)); 55 compPrefSize.put("jLabel1", new Dimension (34, 14)); 56 compBounds.put("jButton1", new Rectangle (92, 40, 75, 23)); 57 baselinePosition.put("jButton1-75-23", new Integer (15)); 58 compPrefSize.put("jButton1", new Dimension (75, 23)); 59 compBounds.put("jButton2", new Rectangle (225, 40, 75, 23)); 60 baselinePosition.put("jButton2-75-23", new Integer (15)); 61 compPrefSize.put("jButton2", new Dimension (75, 23)); 62 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 63 compBounds.put("jToggleButton1", new Rectangle (10, 11, 179, 23)); 64 baselinePosition.put("jToggleButton1-179-23", new Integer (15)); 65 compBounds.put("jLabel1", new Rectangle (10, 44, 34, 14)); 66 baselinePosition.put("jLabel1-34-14", new Integer (11)); 67 compBounds.put("jButton1", new Rectangle (92, 40, 75, 23)); 68 baselinePosition.put("jButton1-75-23", new Integer (15)); 69 compBounds.put("jButton2", new Rectangle (225, 40, 75, 23)); 70 baselinePosition.put("jButton2-75-23", new Integer (15)); 71 ld.updateCurrentState(); 72 baselinePosition.put("jButton1-75-23", new Integer (15)); 75 { 76 String [] compIds = new String [] { 77 "jButton1" 78 }; 79 Rectangle [] bounds = new Rectangle [] { 80 new Rectangle (92, 40, 75, 23) 81 }; 82 Point hotspot = new Point (139,54); 83 ld.startMoving(compIds, bounds, hotspot); 84 } 85 prefPaddingInParent.put("Form-jButton1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jButton1-1-1", new Integer (11)); prefPadding.put("jToggleButton1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jToggleButton1-1-0-0", new Integer (6)); prefPadding.put("jLabel1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton2-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jLabel1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton1-0-1", new Integer (10)); prefPadding.put("jLabel1-jButton1-0-0-0", new Integer (4)); prefPadding.put("jButton1-jLabel1-0-0-0", new Integer (4)); prefPadding.put("jButton2-jButton1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-0-0-0", new Integer (6)); prefPadding.put("jToggleButton1-jButton1-0-0-2", new Integer (10)); { 105 Point p = new Point (187,56); 106 String containerId= "Form"; 107 boolean autoPositioning = true; 108 boolean lockDimension = false; 109 Rectangle [] bounds = new Rectangle [] { 110 new Rectangle (144, 40, 75, 23) 111 }; 112 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 113 } 114 prefPaddingInParent.put("Form-jButton1-1-0", new Integer (11)); prefPaddingInParent.put("Form-jButton1-1-1", new Integer (11)); prefPadding.put("jToggleButton1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jToggleButton1-1-0-0", new Integer (6)); prefPadding.put("jLabel1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton2-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jLabel1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton1-1-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-1-0-0", new Integer (6)); prefPaddingInParent.put("Form-jButton1-0-0", new Integer (10)); prefPaddingInParent.put("Form-jButton1-0-1", new Integer (10)); prefPadding.put("jLabel1-jButton1-0-0-0", new Integer (4)); prefPadding.put("jButton1-jLabel1-0-0-0", new Integer (4)); prefPadding.put("jButton2-jButton1-0-0-0", new Integer (6)); prefPadding.put("jButton1-jButton2-0-0-0", new Integer (6)); prefPadding.put("jToggleButton1-jButton1-0-0-2", new Integer (10)); { 134 Point p = new Point (188,56); 135 String containerId= "Form"; 136 boolean autoPositioning = true; 137 boolean lockDimension = false; 138 Rectangle [] bounds = new Rectangle [] { 139 new Rectangle (144, 40, 75, 23) 140 }; 141 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 142 } 143 prefPadding.put("jLabel1-jButton1-0-0-0", new Integer (4)); ld.endMoving(true); 147 ld.externalSizeChangeHappened(); 149 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 151 compBounds.put("jToggleButton1", new Rectangle (10, 11, 179, 23)); 152 baselinePosition.put("jToggleButton1-179-23", new Integer (15)); 153 compPrefSize.put("jToggleButton1", new Dimension (179, 23)); 154 compBounds.put("jLabel1", new Rectangle (10, 44, 34, 14)); 155 baselinePosition.put("jLabel1-34-14", new Integer (11)); 156 compPrefSize.put("jLabel1", new Dimension (34, 14)); 157 compBounds.put("jButton2", new Rectangle (225, 40, 75, 23)); 158 baselinePosition.put("jButton2-75-23", new Integer (15)); 159 compPrefSize.put("jButton2", new Dimension (75, 23)); 160 compBounds.put("jButton1", new Rectangle (144, 40, 75, 23)); 161 baselinePosition.put("jButton1-75-23", new Integer (15)); 162 compPrefSize.put("jButton1", new Dimension (75, 23)); 163 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 164 compBounds.put("jToggleButton1", new Rectangle (10, 11, 179, 23)); 165 baselinePosition.put("jToggleButton1-179-23", new Integer (15)); 166 compBounds.put("jLabel1", new Rectangle (10, 44, 34, 14)); 167 baselinePosition.put("jLabel1-34-14", new Integer (11)); 168 compBounds.put("jButton2", new Rectangle (225, 40, 75, 23)); 169 baselinePosition.put("jButton2-75-23", new Integer (15)); 170 compBounds.put("jButton1", new Rectangle (144, 40, 75, 23)); 171 baselinePosition.put("jButton1-75-23", new Integer (15)); 172 ld.updateCurrentState(); 173 } 175 176 } 177 | Popular Tags |