| 1 6 package org.netbeans.i18n.jelly; 7 8 import org.netbeans.jemmy.operators.*; 9 import org.netbeans.jellytools.*; 10 import org.netbeans.jellytools.properties.PropertySheetOperator; 11 12 17 public class InternationalizeOperator extends NbDialogOperator { 18 19 21 public InternationalizeOperator() { 22 super(Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_I18nDialogTitle")); 23 } 24 25 private JLabelOperator _lblBundleName; 26 private JTextFieldOperator _txtBundleName; 27 private JButtonOperator _btBrowse; 28 private JButtonOperator _btNew; 29 private JLabelOperator _lblComment; 30 private JTextAreaOperator _txtComment; 31 private JButtonOperator _btMetalScrollButton; 32 private JButtonOperator _btMetalScrollButton2; 33 private JLabelOperator _lblKey; 34 private JLabelOperator _lblValue; 35 private JTextAreaOperator _txtValue; 36 private JButtonOperator _btMetalScrollButton3; 37 private JButtonOperator _btMetalScrollButton4; 38 private JComboBoxOperator _cboKey; 39 private JTextFieldOperator _txtReplaceString; 40 private JLabelOperator _lblReplaceString; 41 private JButtonOperator _btFormat; 42 private JButtonOperator _btArguments; 43 private JButtonOperator _btReplace; 44 private JButtonOperator _btSkip; 45 private JButtonOperator _btInfo; 46 private JButtonOperator _btClose; 47 private JButtonOperator _btHelp; 48 49 50 54 57 public JLabelOperator lblBundleName() { 58 if (_lblBundleName==null) { 59 _lblBundleName = new JLabelOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "LBL_BundleName")); 60 } 61 return _lblBundleName; 62 } 63 64 67 public JTextFieldOperator txtBundleName() { 68 if (_txtBundleName==null) { 69 _txtBundleName = new JTextFieldOperator(this); 70 } 71 return _txtBundleName; 72 } 73 74 77 public JButtonOperator btBrowse() { 78 if (_btBrowse==null) { 79 _btBrowse = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_BrowseButton")); 80 } 81 return _btBrowse; 82 } 83 84 87 public JButtonOperator btNew() { 88 if (_btNew==null) { 89 _btNew = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_NewButton")); 90 } 91 return _btNew; 92 } 93 94 97 public JLabelOperator lblComment() { 98 if (_lblComment==null) { 99 _lblComment = new JLabelOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "LBL_Comment")); 100 } 101 return _lblComment; 102 } 103 104 107 public JTextAreaOperator txtComment() { 108 if (_txtComment==null) { 109 _txtComment = new JTextAreaOperator(this); 110 } 111 return _txtComment; 112 } 113 114 117 public JButtonOperator btMetalScrollButton() { 118 if (_btMetalScrollButton==null) { 119 _btMetalScrollButton = new JButtonOperator(this, 2); 120 } 121 return _btMetalScrollButton; 122 } 123 124 127 public JButtonOperator btMetalScrollButton2() { 128 if (_btMetalScrollButton2==null) { 129 _btMetalScrollButton2 = new JButtonOperator(this, 3); 130 } 131 return _btMetalScrollButton2; 132 } 133 134 137 public JLabelOperator lblKey() { 138 if (_lblKey==null) { 139 _lblKey = new JLabelOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "LBL_Key")); 140 } 141 return _lblKey; 142 } 143 144 147 public JLabelOperator lblValue() { 148 if (_lblValue==null) { 149 _lblValue = new JLabelOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "LBL_Value")); 150 } 151 return _lblValue; 152 } 153 154 157 public JTextAreaOperator txtValue() { 158 if (_txtValue==null) { 159 _txtValue = new JTextAreaOperator(this, 1); 160 } 161 return _txtValue; 162 } 163 164 167 public JButtonOperator btMetalScrollButton3() { 168 if (_btMetalScrollButton3==null) { 169 _btMetalScrollButton3 = new JButtonOperator(this, 4); 170 } 171 return _btMetalScrollButton3; 172 } 173 174 177 public JButtonOperator btMetalScrollButton4() { 178 if (_btMetalScrollButton4==null) { 179 _btMetalScrollButton4 = new JButtonOperator(this, 5); 180 } 181 return _btMetalScrollButton4; 182 } 183 184 187 public JComboBoxOperator cboKey() { 188 if (_cboKey==null) { 189 _cboKey = new JComboBoxOperator(this); 190 } 191 return _cboKey; 192 } 193 194 197 public JTextFieldOperator txtReplaceString() { 198 if (_txtReplaceString==null) { 199 _txtReplaceString = new JTextFieldOperator(this, 2); 200 } 201 return _txtReplaceString; 202 } 203 204 207 public JLabelOperator lblReplaceString() { 208 if (_lblReplaceString==null) { 209 _lblReplaceString = new JLabelOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "LBL_ReplaceFormat")); 210 } 211 return _lblReplaceString; 212 } 213 214 217 public JButtonOperator btFormat() { 218 if (_btFormat==null) { 219 _btFormat = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_Format")); 220 } 221 return _btFormat; 222 } 223 224 227 public JButtonOperator btArguments() { 228 if (_btArguments==null) { 229 _btArguments = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "LBL_Arguments")); 230 } 231 return _btArguments; 232 } 233 234 237 public JButtonOperator btReplace() { 238 if (_btReplace==null) { 239 _btReplace = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_ReplaceButton")); 240 } 241 return _btReplace; 242 } 243 244 247 public JButtonOperator btSkip() { 248 if (_btSkip==null) { 249 _btSkip = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_ReplaceButton")); 250 } 251 return _btSkip; 252 } 253 254 257 public JButtonOperator btInfo() { 258 if (_btInfo==null) { 259 _btInfo = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_InfoButton")); 260 } 261 return _btInfo; 262 } 263 264 267 public JButtonOperator btClose() { 268 if (_btClose==null) { 269 _btClose = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_CloseButton")); 270 } 271 return _btClose; 272 } 273 274 277 public JButtonOperator btHelp() { 278 if (_btHelp==null) { 279 _btHelp = new JButtonOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.i18n.Bundle", "CTL_HelpButton")); 280 } 281 return _btHelp; 282 } 283 284 285 289 292 public String getBundleName() { 293 return txtBundleName().getText(); 294 } 295 296 299 public void setBundleName(String text) { 300 txtBundleName().setText(text); 301 } 302 303 306 public void typeBundleName(String text) { 307 txtBundleName().typeText(text); 308 } 309 310 312 public void browse() { 313 btBrowse().push(); 314 } 315 316 318 public void clickNew() { 319 btNew().push(); 320 } 321 322 325 public String getComment() { 326 return txtComment().getText(); 327 } 328 329 332 public void setComment(String text) { 333 txtComment().setText(text); 334 } 335 336 339 public void typeComment(String text) { 340 txtComment().typeText(text); 341 } 342 343 345 public void metalScrollButton() { 346 btMetalScrollButton().push(); 347 } 348 349 351 public void metalScrollButton2() { 352 btMetalScrollButton2().push(); 353 } 354 355 358 public String getValue() { 359 return txtValue().getText(); 360 } 361 362 365 public void setValue(String text) { 366 txtValue().setText(text); 367 } 368 369 372 public void typeValue(String text) { 373 txtValue().typeText(text); 374 } 375 376 378 public void metalScrollButton3() { 379 btMetalScrollButton3().push(); 380 } 381 382 384 public void metalScrollButton4() { 385 btMetalScrollButton4().push(); 386 } 387 388 391 public String getSelectedKey() { 392 return cboKey().getSelectedItem().toString(); 393 } 394 395 398 public void selectKey(String item) { 399 cboKey().selectItem(item); 400 } 401 402 405 public void typeKey(String text) { 406 cboKey().typeText(text); 407 } 408 409 412 public String getReplaceString() { 413 return txtReplaceString().getText(); 414 } 415 416 419 public void setReplaceString(String text) { 420 txtReplaceString().setText(text); 421 } 422 423 426 public void typeReplaceString(String text) { 427 txtReplaceString().typeText(text); 428 } 429 430 432 public void format() { 433 btFormat().push(); 434 } 435 436 438 public void arguments() { 439 btArguments().push(); 440 } 441 442 444 public void replace() { 445 btReplace().push(); 446 } 447 448 450 public void skip() { 451 btSkip().push(); 452 } 453 454 456 public void info() { 457 btInfo().push(); 458 } 459 460 462 public void close() { 463 btClose().push(); 464 } 465 466 468 public void help() { 469 btHelp().push(); 470 } 471 472 473 477 479 public void verify() { 480 lblBundleName(); 481 txtBundleName(); 482 btBrowse(); 483 btNew(); 484 lblComment(); 485 txtComment(); 486 btMetalScrollButton(); 487 btMetalScrollButton2(); 488 lblKey(); 489 lblValue(); 490 txtValue(); 491 btMetalScrollButton3(); 492 btMetalScrollButton4(); 493 cboKey(); 494 txtReplaceString(); 495 lblReplaceString(); 496 btFormat(); 497 btArguments(); 498 btReplace(); 499 btSkip(); 500 btInfo(); 501 btClose(); 502 btHelp(); 503 } 504 505 public void createNewBundle(String name) { 506 btNew().pushNoBlock(); 507 NewBundleOperator nbo=new NewBundleOperator(); 508 509 } 510 511 514 public static void main(String args[]) { 515 new InternationalizeOperator().verify(); 516 System.out.println("InternationalizeOperator verification finished."); 517 } 518 } 519 520 | Popular Tags |