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 RepositoryStepOperator extends WizardOperator { 37 38 public static final String ITEM_FILE = "file:///"; 39 public static final String ITEM_HTTP = "http://"; 40 public static final String ITEM_HTTPS = "https://"; 41 public static final String ITEM_SVN = "svn://"; 42 public static final String ITEM_SVNSSH = "svn+ssh://"; 43 44 47 public RepositoryStepOperator() { 48 super(""); stepsWaitSelectedValue("Repository"); 50 } 51 52 private JLabelOperator _lblSteps; 53 private JListOperator _lstSteps; 54 private JLabelOperator _lblRepository; 55 private JButtonOperator _btProxyConfiguration; 56 private JLabelOperator _lblUseExternal; 57 private JLabelOperator _lblTunnelCommand; 58 private JTextFieldOperator _txtTunnelCommand; 59 private JLabelOperator _lblPassword; 60 private JLabelOperator _lblUser; 61 private JLabelOperator _lblRepositoryURL; 62 private JTextFieldOperator _txtUser; 63 private JPasswordFieldOperator _txtPassword; 64 private JLabelOperator _lblLeaveBlankForAnonymousAccess; 65 private JComboBoxOperator _cboRepositoryURL; 66 private JLabelOperator _lblSpecifySubversionRepositoryLocation; 67 private JLabelOperator _lblWizardDescriptor$FixedHeightLabel; 68 private JButtonOperator _btStop; 69 private JButtonOperator _btBack; 70 private JButtonOperator _btNext; 71 private JButtonOperator _btFinish; 72 private JButtonOperator _btCancel; 73 private JButtonOperator _btHelp; 74 private JLabelOperator _lblWarning; 75 76 77 81 84 public JLabelOperator lblSteps() { 85 if (_lblSteps==null) { 86 _lblSteps = new JLabelOperator(this, "Steps"); 87 } 88 return _lblSteps; 89 } 90 91 94 public JListOperator lstSteps() { 95 if (_lstSteps==null) { 96 _lstSteps = new JListOperator(this); 97 } 98 return _lstSteps; 99 } 100 101 104 public JLabelOperator lblRepository() { 105 if (_lblRepository==null) { 106 _lblRepository = new JLabelOperator(this, "Repository"); 107 } 108 return _lblRepository; 109 } 110 111 114 public JButtonOperator btProxyConfiguration() { 115 if (_btProxyConfiguration==null) { 116 _btProxyConfiguration = new JButtonOperator(this, "Proxy Configuration..."); 117 } 118 return _btProxyConfiguration; 119 } 120 121 124 public JLabelOperator lblUseExternal() { 125 if (_lblUseExternal==null) { 126 _lblUseExternal = new JLabelOperator(this, "Use External"); 127 } 128 return _lblUseExternal; 129 } 130 131 134 public JLabelOperator lblTunnelCommand() { 135 if (_lblTunnelCommand==null) { 136 _lblTunnelCommand = new JLabelOperator(this, "Tunnel Command"); 137 } 138 return _lblTunnelCommand; 139 } 140 141 144 public JLabelOperator lblPassword() { 145 if (_lblPassword==null) { 146 _lblPassword = new JLabelOperator(this, "Password:"); 147 } 148 return _lblPassword; 149 } 150 151 154 public JLabelOperator lblUser() { 155 if (_lblUser==null) { 156 _lblUser = new JLabelOperator(this, "User:"); 157 } 158 return _lblUser; 159 } 160 161 164 public JLabelOperator lblRepositoryURL() { 165 if (_lblRepositoryURL==null) { 166 _lblRepositoryURL = new JLabelOperator(this, "Repository URL:"); 167 } 168 return _lblRepositoryURL; 169 } 170 171 174 public JTextFieldOperator txtTunnelCommand() { 175 if (_txtTunnelCommand == null) 176 _txtTunnelCommand = new JTextFieldOperator(this, 1); 177 return _txtTunnelCommand; 178 } 179 180 183 public JTextFieldOperator txtUser() { 184 if (_txtUser == null) 185 _txtUser = new JTextFieldOperator(this); 186 return _txtUser; 187 } 188 189 192 public JPasswordFieldOperator txtPassword() { 193 if (_txtPassword == null) 194 _txtPassword = new JPasswordFieldOperator(this); 195 return _txtPassword; 196 } 197 198 201 public JLabelOperator lblLeaveBlankForAnonymousAccess() { 202 if (_lblLeaveBlankForAnonymousAccess==null) { 203 _lblLeaveBlankForAnonymousAccess = new JLabelOperator(this, "(leave blank for anonymous access)"); 204 } 205 return _lblLeaveBlankForAnonymousAccess; 206 } 207 208 211 public JComboBoxOperator cboRepositoryURL() { 212 if (_cboRepositoryURL==null) { 213 _cboRepositoryURL = new JComboBoxOperator(this); 214 } 215 return _cboRepositoryURL; 216 } 217 218 221 public JLabelOperator lblSpecifySubversionRepositoryLocation() { 222 if (_lblSpecifySubversionRepositoryLocation==null) { 223 _lblSpecifySubversionRepositoryLocation = new JLabelOperator(this, "Specify Subversion repository location:"); 224 } 225 return _lblSpecifySubversionRepositoryLocation; 226 } 227 228 231 public JLabelOperator lblWizardDescriptor$FixedHeightLabel() { 232 if (_lblWizardDescriptor$FixedHeightLabel==null) { 233 _lblWizardDescriptor$FixedHeightLabel = new JLabelOperator(this, 7); 234 } 235 return _lblWizardDescriptor$FixedHeightLabel; 236 } 237 238 public JLabelOperator lblWarning() { 239 if (_lblWarning == null) { 240 _lblWarning = new JLabelOperator(this, 5); 241 } 242 return _lblWarning; 243 } 244 245 248 public JButtonOperator btStop() { 249 if (_btStop==null) { 250 _btStop = new JButtonOperator(this, "Stop"); 251 } 252 return _btStop; 253 } 254 255 258 public JButtonOperator btBack() { 259 if (_btBack==null) { 260 _btBack = new JButtonOperator(this, "< Back"); 261 } 262 return _btBack; 263 } 264 265 268 public JButtonOperator btNext() { 269 if (_btNext==null) { 270 _btNext = new JButtonOperator(this, "Next >"); 271 } 272 return _btNext; 273 } 274 275 278 public JButtonOperator btFinish() { 279 if (_btFinish==null) { 280 _btFinish = new JButtonOperator(this, "Finish"); 281 } 282 return _btFinish; 283 } 284 285 288 public JButtonOperator btCancel() { 289 if (_btCancel==null) { 290 _btCancel = new JButtonOperator(this, "Cancel"); 291 } 292 return _btCancel; 293 } 294 295 298 public JButtonOperator btHelp() { 299 if (_btHelp==null) { 300 _btHelp = new JButtonOperator(this, "Help"); 301 } 302 return _btHelp; 303 } 304 305 public ProxyConfigurationOperator invokeProxy() { 306 btProxyConfiguration().pushNoBlock(); 307 return new ProxyConfigurationOperator(); 308 } 309 310 314 316 public void proxyConfiguration() { 317 btProxyConfiguration().pushNoBlock(); 318 } 319 320 323 public String getUser() { 324 return txtUser().getText(); 325 } 326 327 330 public void setUser(String text) { 331 txtUser().setText(text); 332 } 333 334 337 public void typeUser(String text) { 338 txtUser().typeText(text); 339 } 340 341 344 public void setPassword(String text) { 345 txtPassword().setText(text); 346 } 347 348 351 public void typePassword(String text) { 352 txtPassword().typeText(text); 353 } 354 355 358 public String getSelectedRepositoryURL() { 359 return cboRepositoryURL().getSelectedItem().toString(); 360 } 361 362 365 public void selectRepositoryURL(String item) { 366 cboRepositoryURL().selectItem(item); 367 } 368 369 public void setRepositoryURL(String url) { 370 cboRepositoryURL().clearText(); 371 cboRepositoryURL().typeText(url); 372 } 373 374 377 public void typeRepositoryURL(String text) { 378 cboRepositoryURL().typeText(text); 379 } 380 381 383 public void back() { 384 btBack().push(); 385 } 386 387 389 public void next() { 390 btNext().push(); 391 } 392 393 395 public void finish() { 396 btFinish().push(); 397 } 398 399 401 public void cancel() { 402 btCancel().push(); 403 } 404 405 407 public void help() { 408 btHelp().push(); 409 } 410 411 412 416 419 public void verify() { 420 lblSteps(); 421 lstSteps(); 422 lblRepository(); 423 btProxyConfiguration(); 424 lblPassword(); 425 lblUser(); 426 lblRepositoryURL(); 427 txtUser(); 428 txtPassword(); 429 lblLeaveBlankForAnonymousAccess(); 430 cboRepositoryURL(); 431 lblSpecifySubversionRepositoryLocation(); 432 lblWizardDescriptor$FixedHeightLabel(); 433 btBack(); 434 btNext(); 435 btFinish(); 436 btCancel(); 437 btHelp(); 438 } 439 } 440 441 | Popular Tags |