1 19 20 package org.netbeans.qa.form; 21 22 import org.netbeans.jemmy.operators.*; 23 24 29 public class NewBeanFormOperator extends JDialogOperator { 30 31 33 public NewBeanFormOperator() { 34 super("New Bean Form"); } 36 37 private JLabelOperator _lblSteps; 38 private JListOperator _lstSteps; 39 private JLabelOperator _lblNameAndLocation; 40 private JLabelOperator _lblClassName; 41 private JTextFieldOperator _txtClassName; 42 private JLabelOperator _lblProject; 43 private JTextFieldOperator _txtProject; 44 private JLabelOperator _lblLocation; 45 private JComboBoxOperator _cboLocation; 46 private JLabelOperator _lblPackage; 47 private JComboBoxOperator _cboPackage; 48 private JLabelOperator _lblCreatedFile; 49 private JTextFieldOperator _txtCreatedFile; 50 private JLabelOperator _lblWizardDescriptor$FixedHeightLabel; 51 private JButtonOperator _btBack; 52 private JButtonOperator _btNext; 53 private JButtonOperator _btFinish; 54 private JButtonOperator _btCancel; 55 private JButtonOperator _btHelp; 56 57 public static final String ITEM_3 = "3."; public static final String ITEM_SOURCES = "sources"; public static final String ITEM_COMPATIBILITY = "compatibility"; public static final String ITEM_DATA = "data"; public static final String ITEM_FORMUTILITIES = "formUtilities"; public static final String ITEM_PALETTE = "palette"; public static final String ITEM_UNDOREDO = "undoredo"; 65 66 70 73 public JLabelOperator lblSteps() { 74 if (_lblSteps==null) { 75 _lblSteps = new JLabelOperator(this, "Steps"); } 77 return _lblSteps; 78 } 79 80 83 public JListOperator lstSteps() { 84 if (_lstSteps==null) { 85 _lstSteps = new JListOperator(this); 86 } 87 return _lstSteps; 88 } 89 90 93 public JLabelOperator lblNameAndLocation() { 94 if (_lblNameAndLocation==null) { 95 _lblNameAndLocation = new JLabelOperator(this, "Name and Location"); } 97 return _lblNameAndLocation; 98 } 99 100 103 public JLabelOperator lblClassName() { 104 if (_lblClassName==null) { 105 _lblClassName = new JLabelOperator(this, "Class Name:"); } 107 return _lblClassName; 108 } 109 110 113 public JTextFieldOperator txtClassName() { 114 if (_txtClassName==null) { 115 _txtClassName = new JTextFieldOperator(this); 116 } 117 return _txtClassName; 118 } 119 120 123 public JLabelOperator lblProject() { 124 if (_lblProject==null) { 125 _lblProject = new JLabelOperator(this, "Project:"); } 127 return _lblProject; 128 } 129 130 133 public JTextFieldOperator txtProject() { 134 if (_txtProject==null) { 135 _txtProject = new JTextFieldOperator(this, 1); 136 } 137 return _txtProject; 138 } 139 140 143 public JLabelOperator lblLocation() { 144 if (_lblLocation==null) { 145 _lblLocation = new JLabelOperator(this, "Location:"); } 147 return _lblLocation; 148 } 149 150 153 public JComboBoxOperator cboLocation() { 154 if (_cboLocation==null) { 155 _cboLocation = new JComboBoxOperator(this); 156 } 157 return _cboLocation; 158 } 159 160 163 public JLabelOperator lblPackage() { 164 if (_lblPackage==null) { 165 _lblPackage = new JLabelOperator(this, "Package:"); } 167 return _lblPackage; 168 } 169 170 173 public JComboBoxOperator cboPackage() { 174 if (_cboPackage==null) { 175 _cboPackage = new JComboBoxOperator(this, 1); 176 } 177 return _cboPackage; 178 } 179 180 183 public JLabelOperator lblCreatedFile() { 184 if (_lblCreatedFile==null) { 185 _lblCreatedFile = new JLabelOperator(this, "Created File:"); } 187 return _lblCreatedFile; 188 } 189 190 193 public JTextFieldOperator txtCreatedFile() { 194 if (_txtCreatedFile==null) { 195 _txtCreatedFile = new JTextFieldOperator(this, 3); 196 } 197 return _txtCreatedFile; 198 } 199 200 203 public JLabelOperator lblWizardDescriptor$FixedHeightLabel() { 204 if (_lblWizardDescriptor$FixedHeightLabel==null) { 205 _lblWizardDescriptor$FixedHeightLabel = new JLabelOperator(this, " ", 3); } 207 return _lblWizardDescriptor$FixedHeightLabel; 208 } 209 210 213 public JButtonOperator btBack() { 214 if (_btBack==null) { 215 _btBack = new JButtonOperator(this, "< Back"); } 217 return _btBack; 218 } 219 220 223 public JButtonOperator btNext() { 224 if (_btNext==null) { 225 _btNext = new JButtonOperator(this, "Next >"); } 227 return _btNext; 228 } 229 230 233 public JButtonOperator btFinish() { 234 if (_btFinish==null) { 235 _btFinish = new JButtonOperator(this, "Finish"); } 237 return _btFinish; 238 } 239 240 243 public JButtonOperator btCancel() { 244 if (_btCancel==null) { 245 _btCancel = new JButtonOperator(this, "Cancel"); } 247 return _btCancel; 248 } 249 250 253 public JButtonOperator btHelp() { 254 if (_btHelp==null) { 255 _btHelp = new JButtonOperator(this, "Help"); } 257 return _btHelp; 258 } 259 260 261 265 268 public String getClassName() { 269 return txtClassName().getText(); 270 } 271 272 275 public void setClassName(String text) { 276 txtClassName().setText(text); 277 } 278 279 282 public void typeClassName(String text) { 283 txtClassName().typeText(text); 284 } 285 286 289 public String getProject() { 290 return txtProject().getText(); 291 } 292 293 296 public void setProject(String text) { 297 txtProject().setText(text); 298 } 299 300 303 public void typeProject(String text) { 304 txtProject().typeText(text); 305 } 306 307 310 public String getSelectedLocation() { 311 return cboLocation().getSelectedItem().toString(); 312 } 313 314 317 public void selectLocation(String item) { 318 cboLocation().selectItem(item); 319 } 320 321 324 public String getSelectedPackage() { 325 return cboPackage().getSelectedItem().toString(); 326 } 327 328 331 public void selectPackage(String item) { 332 cboPackage().selectItem(item); 333 } 334 335 338 public void typePackage(String text) { 339 cboPackage().typeText(text); 340 } 341 342 345 public String getCreatedFile() { 346 return txtCreatedFile().getText(); 347 } 348 349 352 public void setCreatedFile(String text) { 353 txtCreatedFile().setText(text); 354 } 355 356 359 public void typeCreatedFile(String text) { 360 txtCreatedFile().typeText(text); 361 } 362 363 365 public void back() { 366 btBack().push(); 367 } 368 369 371 public void next() { 372 btNext().push(); 373 } 374 375 377 public void finish() { 378 btFinish().push(); 379 } 380 381 383 public void cancel() { 384 btCancel().push(); 385 } 386 387 389 public void help() { 390 btHelp().push(); 391 } 392 } 393 394 | Popular Tags |