1 19 20 25 package org.netbeans.jellytools.modules.java; 26 27 import org.netbeans.jellytools.Bundle; 28 import org.netbeans.jemmy.operators.*; 29 30 35 public class SynchronizeOperator extends JDialogOperator { 36 37 39 public SynchronizeOperator() { 40 super(Bundle.getString("org.netbeans.modules.java.Bundle", "LAB_ConfirmDialog")); 41 } 42 43 private JTextAreaOperator _txtJTextArea; 44 private JLabelOperator _lblChangesList; 45 private JListOperator _lstChangesList; 46 private JRadioButtonOperator _rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize; 47 private JRadioButtonOperator _rbConfirmAllChangesDuringSynchronization; 48 private JRadioButtonOperator _rbPerformSynchronizationWithoutConfirmation; 49 private JButtonOperator _btProcess; 50 private JButtonOperator _btProcessAll; 51 private JButtonOperator _btHelp; 52 private JButtonOperator _btClose; 53 54 55 59 62 public JTextAreaOperator txtJTextArea() { 63 if (_txtJTextArea==null) { 64 _txtJTextArea = new JTextAreaOperator(this); 65 } 66 return _txtJTextArea; 67 } 68 69 72 public JLabelOperator lblChangesList() { 73 if (_lblChangesList==null) { 74 _lblChangesList = new JLabelOperator(this, Bundle.getString("org.netbeans.modules.java.Bundle", "LAB_ChangesList")); 75 } 76 return _lblChangesList; 77 } 78 79 82 public JListOperator lstChangesList() { 83 if (_lstChangesList==null) { 84 _lstChangesList = new JListOperator(this); 85 } 86 return _lstChangesList; 87 } 88 89 92 public JRadioButtonOperator rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize() { 93 if (_rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize==null) { 94 _rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize = new JRadioButtonOperator(this, Bundle.getString("org.netbeans.modules.java.Bundle", "LAB_radioDisable")); 95 } 96 return _rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize; 97 } 98 99 102 public JRadioButtonOperator rbConfirmAllChangesDuringSynchronization() { 103 if (_rbConfirmAllChangesDuringSynchronization==null) { 104 _rbConfirmAllChangesDuringSynchronization = new JRadioButtonOperator(this, Bundle.getString("org.netbeans.modules.java.Bundle", "LAB_radioConfirm")); 105 } 106 return _rbConfirmAllChangesDuringSynchronization; 107 } 108 109 112 public JRadioButtonOperator rbPerformSynchronizationWithoutConfirmation() { 113 if (_rbPerformSynchronizationWithoutConfirmation==null) { 114 _rbPerformSynchronizationWithoutConfirmation = new JRadioButtonOperator(this, Bundle.getString("org.netbeans.modules.java.Bundle", "LAB_radioAuto")); 115 } 116 return _rbPerformSynchronizationWithoutConfirmation; 117 } 118 119 122 public JButtonOperator btProcess() { 123 if (_btProcess==null) { 124 _btProcess = new JButtonOperator(this, Bundle.getString("org.netbeans.modules.java.Bundle", "LAB_processButton")); 125 } 126 return _btProcess; 127 } 128 129 132 public JButtonOperator btProcessAll() { 133 if (_btProcessAll==null) { 134 _btProcessAll = new JButtonOperator(this, Bundle.getString("org.netbeans.modules.java.Bundle", "LAB_processAllButton")); 135 } 136 return _btProcessAll; 137 } 138 139 142 public JButtonOperator btHelp() { 143 if (_btHelp==null) { 144 _btHelp = new JButtonOperator(this, Bundle.getString("org.openide.Bundle", "CTL_HelpName")); 145 } 146 return _btHelp; 147 } 148 149 152 public JButtonOperator btClose() { 153 if (_btClose==null) { 154 _btClose = new JButtonOperator(this, Bundle.getString("org.openide.Bundle", "CTL_CLOSE")); 155 } 156 return _btClose; 157 } 158 159 160 164 167 public String getJTextArea() { 168 return txtJTextArea().getText(); 169 } 170 171 174 public void setJTextArea(String text) { 175 txtJTextArea().setText(text); 176 } 177 178 181 public void typeJTextArea(String text) { 182 txtJTextArea().typeText(text); 183 } 184 185 187 public void doNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize() { 188 rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize().push(); 189 } 190 191 193 public void confirmAllChangesDuringSynchronization() { 194 rbConfirmAllChangesDuringSynchronization().push(); 195 } 196 197 199 public void performSynchronizationWithoutConfirmation() { 200 rbPerformSynchronizationWithoutConfirmation().push(); 201 } 202 203 205 public void process() { 206 btProcess().push(); 207 } 208 209 211 public void processAll() { 212 btProcessAll().push(); 213 } 214 215 217 public void help() { 218 btHelp().push(); 219 } 220 221 223 public void close() { 224 btClose().push(); 225 } 226 227 228 232 234 public void verify() { 235 txtJTextArea(); 236 lblChangesList(); 237 lstChangesList(); 238 rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize(); 239 rbConfirmAllChangesDuringSynchronization(); 240 rbPerformSynchronizationWithoutConfirmation(); 241 btProcess(); 242 btProcessAll(); 243 btHelp(); 244 btClose(); 245 } 246 247 250 public static void main(String args[]) { 251 new SynchronizeOperator().verify(); 252 System.out.println("SynchronizeOperator verification finished."); 253 } 254 } 255 256 | Popular Tags |