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 MergeOriginOperator extends JDialogOperator { 17 18 21 public MergeOriginOperator() { 22 super("Merge"); 23 } 24 25 private JLabelOperator _lblRepositoryFolder; 26 private JLabelOperator _lblEndingWithRevision; 27 private JLabelOperator _lblEmptyMeansRepositoryHEAD; 28 private JLabelOperator _lblMergeIntoLocalFolderChangesFromOneRepositoryFolderSinceItsOrigin; 29 private JLabelOperator _lblMergeFrom; 30 private JLabelOperator _lblJLabel; 31 private JLabelOperator _lblPreview; 32 private JButtonOperator _btSearch; 33 private JTextFieldOperator _txtEndRevision; 34 private JComboBoxOperator _cboMergeFrom; 35 private JButtonOperator _btBrowse; 36 private JComboBoxOperator _cboRepository; 37 private JTextFieldOperator _txtRepostiryFolder; 38 private JTextFieldOperator _txtCurrentFolder; 39 private JButtonOperator _btMerge; 40 private JButtonOperator _btCancel; 41 private JButtonOperator _btHelp; 42 43 47 50 public JLabelOperator lblRepositoryFolder() { 51 if (_lblRepositoryFolder==null) { 52 _lblRepositoryFolder = new JLabelOperator(this, "Repository Folder"); 53 } 54 return _lblRepositoryFolder; 55 } 56 57 60 public JLabelOperator lblEndingWithRevision() { 61 if (_lblEndingWithRevision==null) { 62 _lblEndingWithRevision = new JLabelOperator(this, "Ending"); 63 } 64 return _lblEndingWithRevision; 65 } 66 67 70 public JLabelOperator lblEmptyMeansRepositoryHEAD() { 71 if (_lblEmptyMeansRepositoryHEAD==null) { 72 _lblEmptyMeansRepositoryHEAD = new JLabelOperator(this, "(empty means repository HEAD)"); 73 } 74 return _lblEmptyMeansRepositoryHEAD; 75 } 76 77 78 81 public JLabelOperator lblMergeIntoLocalFolderChangesFromOneRepositoryFolderSinceItsOrigin() { 82 if (_lblMergeIntoLocalFolderChangesFromOneRepositoryFolderSinceItsOrigin==null) { 83 _lblMergeIntoLocalFolderChangesFromOneRepositoryFolderSinceItsOrigin = new JLabelOperator(this, "Merge into local folder changes from one repository folder since its origin."); 84 } 85 return _lblMergeIntoLocalFolderChangesFromOneRepositoryFolderSinceItsOrigin; 86 } 87 88 91 public JLabelOperator lblMergeFrom() { 92 if (_lblMergeFrom==null) { 93 _lblMergeFrom = new JLabelOperator(this, "Merge from:"); 94 } 95 return _lblMergeFrom; 96 } 97 98 101 public JLabelOperator lblJLabel() { 102 if (_lblJLabel==null) { 103 _lblJLabel = new JLabelOperator(this, 5); 104 } 105 return _lblJLabel; 106 } 107 108 111 public JLabelOperator lblPreview() { 112 if (_lblPreview==null) { 113 _lblPreview = new JLabelOperator(this, "Preview:"); 114 } 115 return _lblPreview; 116 } 117 118 121 public JButtonOperator btSearch() { 122 if (_btSearch==null) { 123 _btSearch = new JButtonOperator(this, "Search..."); 124 } 125 return _btSearch; 126 } 127 128 131 public JTextFieldOperator txtEndRevision() { 132 if (_txtEndRevision==null) { 133 _txtEndRevision = new JTextFieldOperator(this); 134 } 135 return _txtEndRevision; 136 } 137 138 141 public JComboBoxOperator cboJComboBox() { 142 if (_cboMergeFrom==null) { 143 _cboMergeFrom = new JComboBoxOperator(this, 1); 144 } 145 return _cboMergeFrom; 146 } 147 148 151 public JButtonOperator btBrowse() { 152 if (_btBrowse==null) { 153 _btBrowse = new JButtonOperator(this, "Browse"); 154 } 155 return _btBrowse; 156 } 157 158 161 public JComboBoxOperator cboRepository() { 162 if (_cboRepository==null) { 163 _cboRepository = new JComboBoxOperator(this); 164 } 165 return _cboRepository; 166 } 167 168 171 public JTextFieldOperator txtRepostiryFolder() { 172 if (_txtRepostiryFolder==null) { 173 _txtRepostiryFolder = new JTextFieldOperator(this, 2); 174 } 175 return _txtRepostiryFolder; 176 } 177 178 181 public JTextFieldOperator txtCurrentFolder() { 182 if (_txtCurrentFolder==null) { 183 _txtCurrentFolder = new JTextFieldOperator(this, 3); 184 } 185 return _txtCurrentFolder; 186 } 187 188 191 public JButtonOperator btMerge() { 192 if (_btMerge==null) { 193 _btMerge = new JButtonOperator(this, "Merge"); 194 } 195 return _btMerge; 196 } 197 198 201 public JButtonOperator btCancel() { 202 if (_btCancel==null) { 203 _btCancel = new JButtonOperator(this, "Cancel"); 204 } 205 return _btCancel; 206 } 207 208 211 public JButtonOperator btHelp() { 212 if (_btHelp==null) { 213 _btHelp = new JButtonOperator(this, "Help"); 214 } 215 return _btHelp; 216 } 217 218 223 public String getEndRevision() { 224 return txtEndRevision().getText(); 225 } 226 227 232 public void setEndRevision(String text) { 233 txtEndRevision().clearText(); 234 txtEndRevision().typeText(text); 235 } 236 237 240 public void selectMergeFrom(String item) { 241 cboJComboBox().selectItem(item); 242 } 243 244 247 public void setMergeFrom(String text) { 248 cboJComboBox().clearText(); 249 cboJComboBox().typeText(text); 250 } 251 252 254 public RepositoryBrowserOperator browseRepositoryFolder() { 255 btBrowse().pushNoBlock(); 256 return new RepositoryBrowserOperator(); 257 } 258 259 264 public String getSelectedRepository() { 265 return cboRepository().getSelectedItem().toString(); 266 } 267 268 public String getRepositoryFolder() { 269 return cboRepository().getEditor().getItem().toString(); 270 } 271 272 277 public void selectRepository(String item) { 278 cboRepository().selectItem(item); 279 } 280 281 public void setRepository(String text) { 282 cboRepository().clearText(); 283 cboRepository().typeText(text); 284 } 285 286 291 public String getTxtRepositoryFolder() { 292 return txtRepostiryFolder().getText(); 293 } 294 295 300 public String getTxtCurrentFolder() { 301 return txtCurrentFolder().getText(); 302 } 303 304 306 public void merge() { 307 btMerge().push(); 308 } 309 310 312 public void cancel() { 313 btCancel().push(); 314 } 315 316 318 public void help() { 319 btHelp().push(); 320 } 321 322 326 329 public void verify() { 330 lblRepositoryFolder(); 331 lblEndingWithRevision(); 332 lblEmptyMeansRepositoryHEAD(); 333 lblMergeIntoLocalFolderChangesFromOneRepositoryFolderSinceItsOrigin(); 334 lblMergeFrom(); 335 lblJLabel(); 336 lblPreview(); 337 btSearch(); 338 txtEndRevision(); 339 cboJComboBox(); 340 btBrowse(); 341 cboRepository(); 342 } 343 } 344 345 | Popular Tags |