1 6 package org.netbeans.test.subversion.operators; 7 8 import org.netbeans.jellytools.NbDialogOperator; 9 import org.netbeans.jemmy.operators.*; 10 11 16 public class SearchRevisionsOperator extends NbDialogOperator { 17 18 20 public SearchRevisionsOperator() { 21 super("Search Revisions"); 22 } 23 24 private JListOperator _lstJList; 25 private JButtonOperator _btMetalScrollButton; 26 private JButtonOperator _btMetalScrollButton2; 27 private JLabelOperator _lblListLogEntriesFrom; 28 private JTextFieldOperator _txtFrom; 29 private JLabelOperator _lblYYYYMMDDEmptyMeansAll; 30 private JButtonOperator _btList; 31 private JButtonOperator _btOK; 32 private JButtonOperator _btCancel; 33 private JButtonOperator _btHelp; 34 35 36 40 43 public JListOperator lstJList() { 44 if (_lstJList==null) { 45 _lstJList = new JListOperator(this); 46 } 47 return _lstJList; 48 } 49 50 53 public JButtonOperator btMetalScrollButton() { 54 if (_btMetalScrollButton==null) { 55 _btMetalScrollButton = new JButtonOperator(this); 56 } 57 return _btMetalScrollButton; 58 } 59 60 63 public JButtonOperator btMetalScrollButton2() { 64 if (_btMetalScrollButton2==null) { 65 _btMetalScrollButton2 = new JButtonOperator(this, 1); 66 } 67 return _btMetalScrollButton2; 68 } 69 70 73 public JLabelOperator lblListLogEntriesFrom() { 74 if (_lblListLogEntriesFrom==null) { 75 _lblListLogEntriesFrom = new JLabelOperator(this, "List log entries from:"); 76 } 77 return _lblListLogEntriesFrom; 78 } 79 80 83 public JTextFieldOperator txtFrom() { 84 if (_txtFrom==null) { 85 _txtFrom = new JTextFieldOperator(this); 86 } 87 return _txtFrom; 88 } 89 90 93 public JLabelOperator lblYYYYMMDDEmptyMeansAll() { 94 if (_lblYYYYMMDDEmptyMeansAll==null) { 95 _lblYYYYMMDDEmptyMeansAll = new JLabelOperator(this, "(YYYY-MM-DD - empty means all)"); 96 } 97 return _lblYYYYMMDDEmptyMeansAll; 98 } 99 100 103 public JButtonOperator btList() { 104 if (_btList==null) { 105 _btList = new JButtonOperator(this, "List"); 106 } 107 return _btList; 108 } 109 110 113 public JButtonOperator btOK() { 114 if (_btOK==null) { 115 _btOK = new JButtonOperator(this, "OK"); 116 } 117 return _btOK; 118 } 119 120 123 public JButtonOperator btCancel() { 124 if (_btCancel==null) { 125 _btCancel = new JButtonOperator(this, "Cancel"); 126 } 127 return _btCancel; 128 } 129 130 133 public JButtonOperator btHelp() { 134 if (_btHelp==null) { 135 _btHelp = new JButtonOperator(this, "Help"); 136 } 137 return _btHelp; 138 } 139 140 141 145 public void selectListItem(int index) { 146 lstJList().setSelectedIndex(index); 147 } 148 149 public void selectListItem(Object item) { 150 lstJList().setSelectedValue(item, true); 151 } 152 153 public Object getSelectItem() { 154 return lstJList().getSelectedValue(); 155 } 156 157 159 public void metalScrollButton() { 160 btMetalScrollButton().push(); 161 } 162 163 165 public void metalScrollButton2() { 166 btMetalScrollButton2().push(); 167 } 168 169 172 public String getFrom() { 173 return txtFrom().getText(); 174 } 175 176 179 public void setFrom(String text) { 180 txtFrom().setText(text); 181 } 182 183 185 public void list() { 186 btList().push(); 187 } 188 189 191 public void ok() { 192 btOK().push(); 193 } 194 195 197 public void cancel() { 198 btCancel().push(); 199 } 200 201 203 public void help() { 204 btHelp().push(); 205 } 206 207 208 212 214 public void verify() { 215 lstJList(); 216 btMetalScrollButton(); 217 btMetalScrollButton2(); 218 lblListLogEntriesFrom(); 219 txtFrom(); 220 lblYYYYMMDDEmptyMeansAll(); 221 btList(); 222 btOK(); 223 btCancel(); 224 btHelp(); 225 } 226 } 227 228 | Popular Tags |