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_ParallelPosition18Test extends LayoutTestCase { 33 34 public ALT_ParallelPosition18Test(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("jLabel1", new Rectangle (10, 14, 34, 14)); 51 baselinePosition.put("jLabel1-34-14", new Integer (11)); 52 compPrefSize.put("jLabel1", new Dimension (34, 14)); 53 compBounds.put("jTextField1", new Rectangle (48, 11, 97, 20)); 54 baselinePosition.put("jTextField1-97-20", new Integer (14)); 55 compPrefSize.put("jTextField1", new Dimension (59, 20)); 56 compBounds.put("jLabel2", new Rectangle (10, 40, 34, 14)); 57 baselinePosition.put("jLabel2-34-14", new Integer (11)); 58 compPrefSize.put("jLabel2", new Dimension (34, 14)); 59 compBounds.put("jTextField2", new Rectangle (48, 37, 97, 20)); 60 baselinePosition.put("jTextField2-97-20", new Integer (14)); 61 compPrefSize.put("jTextField2", new Dimension (59, 20)); 62 compBounds.put("jScrollPane1", new Rectangle (286, 11, 104, 64)); 63 baselinePosition.put("jScrollPane1-104-64", new Integer (0)); 64 compPrefSize.put("jScrollPane1", new Dimension (104, 64)); 65 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 66 compBounds.put("jLabel1", new Rectangle (10, 14, 34, 14)); 67 baselinePosition.put("jLabel1-34-14", new Integer (11)); 68 compBounds.put("jTextField1", new Rectangle (48, 11, 97, 20)); 69 baselinePosition.put("jTextField1-97-20", new Integer (14)); 70 compBounds.put("jLabel2", new Rectangle (10, 40, 34, 14)); 71 baselinePosition.put("jLabel2-34-14", new Integer (11)); 72 compBounds.put("jTextField2", new Rectangle (48, 37, 97, 20)); 73 baselinePosition.put("jTextField2-97-20", new Integer (14)); 74 compBounds.put("jScrollPane1", new Rectangle (286, 11, 104, 64)); 75 baselinePosition.put("jScrollPane1-104-64", new Integer (0)); 76 ld.updateCurrentState(); 77 baselinePosition.put("jTextField2-97-20", new Integer (14)); 80 compPrefSize.put("jTextField2", new Dimension (59, 20)); 81 { 82 String [] compIds = new String [] { 83 "jTextField2" 84 }; 85 Rectangle [] bounds = new Rectangle [] { 86 new Rectangle (48, 37, 97, 20) 87 }; 88 Point hotspot = new Point (148,49); 89 int[] resizeEdges = new int[] { 90 1, 91 -1 92 }; 93 boolean inLayout = true; 94 ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout); 95 } 96 prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer (6)); { 100 Point p = new Point (281,49); 101 String containerId= "Form"; 102 boolean autoPositioning = true; 103 boolean lockDimension = false; 104 Rectangle [] bounds = new Rectangle [] { 105 new Rectangle (48, 37, 232, 20) 106 }; 107 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 108 } 109 prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer (6)); { 113 Point p = new Point (280,49); 114 String containerId= "Form"; 115 boolean autoPositioning = true; 116 boolean lockDimension = false; 117 Rectangle [] bounds = new Rectangle [] { 118 new Rectangle (48, 37, 232, 20) 119 }; 120 ld.move(p, containerId, autoPositioning, lockDimension, bounds); 121 } 122 prefPadding.put("jTextField1-jScrollPane1-0-0-0", new Integer (6)); prefPadding.put("jTextField2-jScrollPane1-0-0-0", new Integer (6)); ld.endMoving(true); 127 ld.externalSizeChangeHappened(); 129 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 131 compBounds.put("jLabel1", new Rectangle (10, 14, 34, 14)); 132 baselinePosition.put("jLabel1-34-14", new Integer (11)); 133 compPrefSize.put("jLabel1", new Dimension (34, 14)); 134 compBounds.put("jTextField1", new Rectangle (48, 11, 97, 20)); 135 baselinePosition.put("jTextField1-97-20", new Integer (14)); 136 compPrefSize.put("jTextField1", new Dimension (59, 20)); 137 compBounds.put("jLabel2", new Rectangle (10, 40, 34, 14)); 138 baselinePosition.put("jLabel2-34-14", new Integer (11)); 139 compPrefSize.put("jLabel2", new Dimension (34, 14)); 140 compBounds.put("jScrollPane1", new Rectangle (286, 11, 104, 64)); 141 baselinePosition.put("jScrollPane1-104-64", new Integer (0)); 142 compPrefSize.put("jScrollPane1", new Dimension (104, 64)); 143 compBounds.put("jTextField2", new Rectangle (48, 37, 232, 20)); 144 baselinePosition.put("jTextField2-232-20", new Integer (14)); 145 compPrefSize.put("jTextField2", new Dimension (59, 20)); 146 contInterior.put("Form", new Rectangle (0, 0, 400, 300)); 147 compBounds.put("jLabel1", new Rectangle (10, 14, 34, 14)); 148 baselinePosition.put("jLabel1-34-14", new Integer (11)); 149 compBounds.put("jTextField1", new Rectangle (48, 11, 97, 20)); 150 baselinePosition.put("jTextField1-97-20", new Integer (14)); 151 compBounds.put("jLabel2", new Rectangle (10, 40, 34, 14)); 152 baselinePosition.put("jLabel2-34-14", new Integer (11)); 153 compBounds.put("jScrollPane1", new Rectangle (286, 11, 104, 64)); 154 baselinePosition.put("jScrollPane1-104-64", new Integer (0)); 155 compBounds.put("jTextField2", new Rectangle (48, 37, 232, 20)); 156 baselinePosition.put("jTextField2-232-20", new Integer (14)); 157 ld.updateCurrentState(); 158 } 160 161 } 162 | Popular Tags |