1 6 package org.netbeans.test.subversion.operators; 7 8 import org.netbeans.jemmy.operators.*; 9 import org.netbeans.jemmy.util.NameComponentChooser; 10 11 16 public class MergeOneRepoOperator extends JDialogOperator { 17 18 21 public MergeOneRepoOperator() { 22 super("Merge"); 23 } 24 25 private JLabelOperator _lblEndingWithRevision; 26 private JLabelOperator _lblStartingWithRevision; 27 private JLabelOperator _lblFirstRepositoryFolder; 28 private JLabelOperator _lblEmptyMeansRepositoryHEAD; 29 private JLabelOperator _lblEmptyMeansRepositoryHEAD2; 30 private JTextFieldOperator _txtStartRevision; 31 private JButtonOperator _btSearch; 32 private JTextFieldOperator _txtEndRevision; 33 private JButtonOperator _btSearch2; 34 private JComboBoxOperator _cboMergeFrom; 35 private JButtonOperator _btBrowse; 36 private JLabelOperator _lblMergeIntoLocalFolderChangesFromOneRepositoryFolder; 37 private JLabelOperator _lblMergeFrom; 38 private JComboBoxOperator _cboRepository; 39 private JLabelOperator _lblJLabel; 40 private JTextFieldOperator _txtRepostiryFolder; 41 private JTextFieldOperator _txtCurrentFolder; 42 private JLabelOperator _lblPreview; 43 private JButtonOperator _btMerge; 44 private JButtonOperator _btCancel; 45 private JButtonOperator _btHelp; 46 47 48 52 55 public JLabelOperator lblEndingWithRevision() { 56 if (_lblEndingWithRevision==null) { 57 _lblEndingWithRevision = new JLabelOperator(this, "Ending"); 58 } 59 return _lblEndingWithRevision; 60 } 61 62 65 public JLabelOperator lblStartingWithRevision() { 66 if (_lblStartingWithRevision==null) { 67 _lblStartingWithRevision = new JLabelOperator(this, "Starting"); 68 } 69 return _lblStartingWithRevision; 70 } 71 72 75 public JLabelOperator lblFirstRepositoryFolder() { 76 if (_lblFirstRepositoryFolder==null) { 77 _lblFirstRepositoryFolder = new JLabelOperator(this, "Repository Folder"); 78 } 79 return _lblFirstRepositoryFolder; 80 } 81 82 85 public JLabelOperator lblEmptyMeansRepositoryHEAD() { 86 if (_lblEmptyMeansRepositoryHEAD==null) { 87 _lblEmptyMeansRepositoryHEAD = new JLabelOperator(this, "(empty means repository HEAD)"); 88 } 89 return _lblEmptyMeansRepositoryHEAD; 90 } 91 92 95 public JLabelOperator lblEmptyMeansRepositoryHEAD2() { 96 if (_lblEmptyMeansRepositoryHEAD2==null) { 97 _lblEmptyMeansRepositoryHEAD2 = new JLabelOperator(this, "(empty means repository HEAD)", 1); 98 } 99 return _lblEmptyMeansRepositoryHEAD2; 100 } 101 102 105 public JTextFieldOperator txtStartReivison() { 106 if (_txtStartRevision==null) { 107 _txtStartRevision = new JTextFieldOperator(this); 108 } 109 return _txtStartRevision; 110 } 111 112 115 public JButtonOperator btSearch() { 116 if (_btSearch==null) { 117 _btSearch = new JButtonOperator(this, "Search..."); 118 } 119 return _btSearch; 120 } 121 122 125 public JTextFieldOperator txtEndRevision() { 126 if (_txtEndRevision==null) { 127 _txtEndRevision = new JTextFieldOperator(this, 1); 128 } 129 return _txtEndRevision; 130 } 131 132 135 public JButtonOperator btSearch2() { 136 if (_btSearch2==null) { 137 _btSearch2 = new JButtonOperator(this, "Search...", 1); 138 } 139 return _btSearch2; 140 } 141 142 145 public JComboBoxOperator cboMergeFrom() { 146 if (_cboMergeFrom==null) { 147 _cboMergeFrom = new JComboBoxOperator(this, 1); 148 } 149 return _cboMergeFrom; 150 } 151 152 155 public JButtonOperator btBrowse() { 156 if (_btBrowse==null) { 157 _btBrowse = new JButtonOperator(this, "Browse"); 158 } 159 return _btBrowse; 160 } 161 162 165 public JLabelOperator lblMergeIntoLocalFolderChangesFromOneRepositoryFolder() { 166 if (_lblMergeIntoLocalFolderChangesFromOneRepositoryFolder==null) { 167 _lblMergeIntoLocalFolderChangesFromOneRepositoryFolder = new JLabelOperator(this, "Merge into local folder changes from one repository folder."); 168 } 169 return _lblMergeIntoLocalFolderChangesFromOneRepositoryFolder; 170 } 171 172 175 public JLabelOperator lblMergeFrom() { 176 if (_lblMergeFrom==null) { 177 _lblMergeFrom = new JLabelOperator(this, "Merge from:"); 178 } 179 return _lblMergeFrom; 180 } 181 182 185 public JComboBoxOperator cboRepository() { 186 if (_cboRepository==null) { 187 _cboRepository = new JComboBoxOperator(this); 188 } 189 return _cboRepository; 190 } 191 192 195 public JLabelOperator lblJLabel() { 196 if (_lblJLabel==null) { 197 _lblJLabel = new JLabelOperator(this, 7); 198 } 199 return _lblJLabel; 200 } 201 202 205 public JTextFieldOperator txtRepostiryFolder() { 206 if (_txtRepostiryFolder==null) { 207 _txtRepostiryFolder = new JTextFieldOperator(this, 3); 208 } 209 return _txtRepostiryFolder; 210 } 211 212 215 public JTextFieldOperator txtCurrentFolder() { 216 if (_txtCurrentFolder==null) { 217 _txtCurrentFolder = new JTextFieldOperator(this, 4); 218 } 219 return _txtCurrentFolder; 220 } 221 222 225 public JLabelOperator lblPreview() { 226 if (_lblPreview==null) { 227 _lblPreview = new JLabelOperator(this, "Preview:"); 228 } 229 return _lblPreview; 230 } 231 232 235 public JButtonOperator btMerge() { 236 if (_btMerge==null) { 237 _btMerge = new JButtonOperator(this, "Merge"); 238 } 239 return _btMerge; 240 } 241 242 245 public JButtonOperator btCancel() { 246 if (_btCancel==null) { 247 _btCancel = new JButtonOperator(this, "Cancel"); 248 } 249 return _btCancel; 250 } 251 252 255 public JButtonOperator btHelp() { 256 if (_btHelp==null) { 257 _btHelp = new JButtonOperator(this, "Help"); 258 } 259 return _btHelp; 260 } 261 262 263 267 272 public String getStartRevision() { 273 return txtStartReivison().getText(); 274 } 275 276 281 public void setStartRevision(String text) { 282 txtStartReivison().clearText(); 283 txtStartReivison().typeText(text); 284 } 285 286 288 public void search() { 289 btSearch().push(); 290 } 291 292 297 public String getEndRevision() { 298 return txtEndRevision().getText(); 299 } 300 301 306 public void setEndRevision(String text) { 307 txtEndRevision().clearText(); 308 txtEndRevision().typeText(text); 309 } 310 311 313 public void search2() { 314 btSearch2().push(); 315 } 316 317 322 public String getSelectedMergeFrom() { 323 return cboMergeFrom().getSelectedItem().toString(); 324 } 325 326 331 public void selectMergeFrom(String item) { 332 cboMergeFrom().selectItem(item); 333 } 334 335 340 public void setMergeFrom(String text) { 341 cboMergeFrom().clearText(); 342 cboMergeFrom().typeText(text); 343 } 344 345 347 public RepositoryBrowserOperator browseRepository() { 348 btBrowse().pushNoBlock(); 349 return new RepositoryBrowserOperator(); 350 } 351 352 357 public String getSelectedRepository() { 358 return cboRepository().getSelectedItem().toString(); 359 } 360 361 public String getRepositoryFolder() { 362 return cboRepository().getEditor().getItem().toString(); 363 } 364 369 public void selectRepositoryFolder(String item) { 370 cboRepository().selectItem(item); 371 } 372 373 public void setRepositoryFolder(String text) { 374 cboRepository().clearText(); 375 cboRepository().typeText(text); 376 } 377 378 383 public String getTxtRepositoryFolder() { 384 return txtRepostiryFolder().getText(); 385 } 386 387 392 public String getTxtCurrentFolder() { 393 return txtCurrentFolder().getText(); 394 } 395 396 398 public void merge() { 399 btMerge().push(); 400 } 401 402 404 public void cancel() { 405 btCancel().push(); 406 } 407 408 410 public void help() { 411 btHelp().push(); 412 } 413 414 415 419 422 public void verify() { 423 lblEndingWithRevision(); 424 lblStartingWithRevision(); 425 lblFirstRepositoryFolder(); 426 lblEmptyMeansRepositoryHEAD(); 427 lblEmptyMeansRepositoryHEAD2(); 428 txtStartReivison(); 429 btSearch(); 430 txtEndRevision(); 431 btSearch2(); 432 cboMergeFrom(); 433 btBrowse(); 434 lblMergeIntoLocalFolderChangesFromOneRepositoryFolder(); 435 lblMergeFrom(); 436 cboRepository(); 437 lblJLabel(); 438 txtRepostiryFolder(); 439 txtCurrentFolder(); 440 lblPreview(); 441 btMerge(); 442 btCancel(); 443 btHelp(); 444 } 445 } 446 447 | Popular Tags |