1 19 24 package org.netbeans.test.subversion.operators; 25 26 import org.netbeans.jellytools.WizardOperator; 27 import org.netbeans.jemmy.operators.*; 28 29 36 public class WorkDirStepOperator extends WizardOperator { 37 38 41 public WorkDirStepOperator() { 42 super(""); 43 stepsWaitSelectedValue("Folders to Checkout"); 44 } 45 46 private JLabelOperator _lblSteps; 47 private JListOperator _lstSteps; 48 private JLabelOperator _lblWorkdir; 49 private JLabelOperator _lblSpecifyTheFoldersToCheckoutFromSubversionRepository; 50 private JLabelOperator _lblRepositoryRevision; 51 private JLabelOperator _lblRepositoryFolders; 52 private JTextFieldOperator repositoryFolder; 53 private JButtonOperator _btSearch; 54 private JLabelOperator _lblLocalSubversionWorkingCopy; 55 private JTextFieldOperator repositoryRevision; 56 private JLabelOperator _lblEmptyMeansRepositoryHEAD; 57 private JTextFieldOperator localFolder; 58 private JButtonOperator _btBrowseRepository; 59 private JButtonOperator _btBrowseLocalFolder; 60 private JLabelOperator _lblLocalFolder; 61 private JLabelOperator _lblSpecifyTheLocalFolderToCheckoutFoldersInto; 62 private JLabelOperator _lblWizardDescriptor$FixedHeightLabel; 63 private JButtonOperator _btBack; 64 private JButtonOperator _btNext; 65 private JButtonOperator _btFinish; 66 private JButtonOperator _btCancel; 67 private JButtonOperator _btHelp; 68 private JCheckBoxOperator _cbCheckoutContentOnly; 69 70 71 75 78 public JLabelOperator lblSteps() { 79 if (_lblSteps==null) { 80 _lblSteps = new JLabelOperator(this, "Steps"); 81 } 82 return _lblSteps; 83 } 84 85 88 public JCheckBoxOperator cbCheckoutContentOnly() { 89 if (_cbCheckoutContentOnly==null) { 90 _cbCheckoutContentOnly = new JCheckBoxOperator(this, "Checkout only"); 91 } 92 return _cbCheckoutContentOnly; 93 } 94 95 98 public JListOperator lstSteps() { 99 if (_lstSteps==null) { 100 _lstSteps = new JListOperator(this); 101 } 102 return _lstSteps; 103 } 104 105 108 public JLabelOperator lblSpecifyTheFoldersToCheckoutFromSubversionRepository() { 109 if (_lblSpecifyTheFoldersToCheckoutFromSubversionRepository==null) { 110 _lblSpecifyTheFoldersToCheckoutFromSubversionRepository = new JLabelOperator(this, "Specify the folder(s) to checkout from Subversion repository."); 111 } 112 return _lblSpecifyTheFoldersToCheckoutFromSubversionRepository; 113 } 114 115 118 public JLabelOperator lblRepositoryRevision() { 119 if (_lblRepositoryRevision==null) { 120 _lblRepositoryRevision = new JLabelOperator(this, "Repository Revision:"); 121 } 122 return _lblRepositoryRevision; 123 } 124 125 128 public JLabelOperator lblRepositoryFolders() { 129 if (_lblRepositoryFolders==null) { 130 _lblRepositoryFolders = new JLabelOperator(this, "Repository Folder(s):"); 131 } 132 return _lblRepositoryFolders; 133 } 134 135 138 public JTextFieldOperator txtRepositoryFolder() { 139 if (repositoryFolder==null) { 140 repositoryFolder = new JTextFieldOperator(this, 1); 141 } 142 return repositoryFolder; 143 } 144 145 public void setRepositoryFolder(String text) { 146 txtRepositoryFolder().clearText(); 147 txtRepositoryFolder().typeText(text); 148 } 149 150 153 public JButtonOperator btSearch() { 154 if (_btSearch==null) { 155 _btSearch = new JButtonOperator(this, "Search..."); 156 } 157 return _btSearch; 158 } 159 160 163 public JLabelOperator lblLocalSubversionWorkingCopy() { 164 if (_lblLocalSubversionWorkingCopy==null) { 165 _lblLocalSubversionWorkingCopy = new JLabelOperator(this, "(local Subversion working copy)"); 166 } 167 return _lblLocalSubversionWorkingCopy; 168 } 169 170 173 public JTextFieldOperator txtRepositoryRevision() { 174 if (repositoryRevision==null) { 175 repositoryRevision = new JTextFieldOperator(this); 176 } 177 return repositoryRevision; 178 } 179 180 public void setRepositoryRevision(String text) { 181 txtRepositoryRevision().clearText(); 182 txtRepositoryRevision().typeText(text); 183 } 184 185 188 public JLabelOperator lblEmptyMeansRepositoryHEAD() { 189 if (_lblEmptyMeansRepositoryHEAD==null) { 190 _lblEmptyMeansRepositoryHEAD = new JLabelOperator(this, "(empty means repository HEAD)"); 191 } 192 return _lblEmptyMeansRepositoryHEAD; 193 } 194 195 198 public JTextFieldOperator txtLocalFolder() { 199 if (localFolder==null) { 200 localFolder = new JTextFieldOperator(this, 2); 201 } 202 return localFolder; 203 } 204 205 public void setLocalFolder(String text) { 206 txtLocalFolder().clearText(); 207 txtLocalFolder().typeText(text); 208 } 209 210 213 public JButtonOperator btBrowseRepository() { 214 if (_btBrowseRepository==null) { 215 _btBrowseRepository = new JButtonOperator(this, "Browse"); 216 } 217 return _btBrowseRepository; 218 } 219 220 223 public JButtonOperator btBrowseLocalFolder() { 224 if (_btBrowseLocalFolder==null) { 225 _btBrowseLocalFolder = new JButtonOperator(this, "Browse", 1); 226 } 227 return _btBrowseLocalFolder; 228 } 229 230 233 public JLabelOperator lblLocalFolder() { 234 if (_lblLocalFolder==null) { 235 _lblLocalFolder = new JLabelOperator(this, "Local Folder:"); 236 } 237 return _lblLocalFolder; 238 } 239 240 243 public JLabelOperator lblSpecifyTheLocalFolderToCheckoutFoldersInto() { 244 if (_lblSpecifyTheLocalFolderToCheckoutFoldersInto==null) { 245 _lblSpecifyTheLocalFolderToCheckoutFoldersInto = new JLabelOperator(this, "Specify the local folder to checkout folders into."); 246 } 247 return _lblSpecifyTheLocalFolderToCheckoutFoldersInto; 248 } 249 250 253 public JLabelOperator lblWizardDescriptor$FixedHeightLabel() { 254 if (_lblWizardDescriptor$FixedHeightLabel==null) { 255 _lblWizardDescriptor$FixedHeightLabel = new JLabelOperator(this, " ", 7); 256 } 257 return _lblWizardDescriptor$FixedHeightLabel; 258 } 259 260 263 public JButtonOperator btBack() { 264 if (_btBack==null) { 265 _btBack = new JButtonOperator(this, "< Back"); 266 } 267 return _btBack; 268 } 269 270 273 public JButtonOperator btNext() { 274 if (_btNext==null) { 275 _btNext = new JButtonOperator(this, "Next >"); 276 } 277 return _btNext; 278 } 279 280 283 public JButtonOperator btFinish() { 284 if (_btFinish==null) { 285 _btFinish = new JButtonOperator(this, "Finish"); 286 } 287 return _btFinish; 288 } 289 290 293 public JButtonOperator btCancel() { 294 if (_btCancel==null) { 295 _btCancel = new JButtonOperator(this, "Cancel"); 296 } 297 return _btCancel; 298 } 299 300 303 public JButtonOperator btHelp() { 304 if (_btHelp==null) { 305 _btHelp = new JButtonOperator(this, "Help"); 306 } 307 return _btHelp; 308 } 309 310 311 315 320 public String getRepositoryFolder() { 321 return txtRepositoryFolder().getText(); 322 } 323 324 326 public SearchRevisionsOperator search() { 327 btSearch().pushNoBlock(); 328 return new SearchRevisionsOperator(); 329 } 330 331 336 public String getRevisionNumber() { 337 return txtRepositoryRevision().getText(); 338 } 339 340 345 public String getLocalFolder() { 346 return txtLocalFolder().getText(); 347 } 348 349 352 public void checkCheckoutContentOnly(boolean state) { 353 if (cbCheckoutContentOnly().isSelected()!=state) { 354 cbCheckoutContentOnly().push(); 355 } 356 } 357 358 360 public void back() { 361 btBack().push(); 362 } 363 364 366 public void next() { 367 btNext().push(); 368 } 369 370 372 public void finish() { 373 btFinish().push(); 374 } 375 376 378 public void cancel() { 379 btCancel().push(); 380 } 381 382 384 public void help() { 385 btHelp().push(); 386 } 387 388 public RepositoryBrowserOperator browseRepository() { 389 btBrowseRepository().pushNoBlock(); 390 return new RepositoryBrowserOperator(); 391 } 392 393 396 public JFileChooserOperator browseLocalFolder() { 397 btBrowseLocalFolder().pushNoBlock(); 398 return new JFileChooserOperator(); 399 } 400 401 402 406 409 public void verify() { 410 lblSteps(); 411 lstSteps(); 412 lblSpecifyTheFoldersToCheckoutFromSubversionRepository(); 413 lblRepositoryRevision(); 414 lblRepositoryFolders(); 415 txtRepositoryFolder(); 416 btSearch(); 417 lblLocalSubversionWorkingCopy(); 418 txtRepositoryRevision(); 419 lblEmptyMeansRepositoryHEAD(); 420 txtLocalFolder(); 421 btBrowseRepository(); 422 btBrowseLocalFolder(); 423 lblLocalFolder(); 424 cbCheckoutContentOnly(); 425 lblSpecifyTheLocalFolderToCheckoutFoldersInto(); 426 lblWizardDescriptor$FixedHeightLabel(); 427 btBack(); 428 btNext(); 429 btFinish(); 430 btCancel(); 431 btHelp(); 432 } 433 } 434 435 | Popular Tags |