1 19 24 package org.netbeans.jellytools.modules.xml.saxwizard; 25 26 import org.netbeans.jemmy.operators.*; 27 28 33 public class ConfirmChangesDialog extends JDialogOperator { 34 35 37 public ConfirmChangesDialog() { 38 super("Confirm Changes"); 39 } 40 41 private JTextAreaOperator _txtJTextArea; 42 private JLabelOperator _lblChangesList; 43 private JListOperator _lstChangesList; 44 public static final String ITEM_ADDMETHODPUBLICABSTRACTVOIDCHARACTERSCHARINTINTTHROWSSAXEXCEPTIONFROMORGXMLSAXDOCUMENTHANDLER = "Add method public abstract void characters(char[], int, int) throws SAXException [from org.xml.sax.DocumentHandler]"; 45 public static final String ITEM_ADDMETHODPUBLICABSTRACTVOIDENDDOCUMENTTHROWSSAXEXCEPTIONFROMORGXMLSAXDOCUMENTHANDLER = "Add method public abstract void endDocument() throws SAXException [from org.xml.sax.DocumentHandler]"; 46 public static final String ITEM_ADDMETHODPUBLICABSTRACTVOIDENDELEMENTSTRINGTHROWSSAXEXCEPTIONFROMORGXMLSAXDOCUMENTHANDLER = "Add method public abstract void endElement(String) throws SAXException [from org.xml.sax.DocumentHandler]"; 47 public static final String ITEM_ADDMETHODPUBLICABSTRACTVOIDIGNORABLEWHITESPACECHARINTINTTHROWSSAXEXCEPTIONFROMORGXMLSAXDOCUMENTHANDLER = "Add method public abstract void ignorableWhitespace(char[], int, int) throws SAXException [from org.xml.sax.DocumentHandler]"; 48 public static final String ITEM_ADDMETHODPUBLICABSTRACTVOIDPROCESSINGINSTRUCTIONSTRINGSTRINGTHROWSSAXEXCEPTIONFROMORGXMLSAXDOCUMENTHANDLER = "Add method public abstract void processingInstruction(String, String) throws SAXException [from org.xml.sax.DocumentHandler]"; 49 public static final String ITEM_ADDMETHODPUBLICABSTRACTVOIDSETDOCUMENTLOCATORLOCATORFROMORGXMLSAXDOCUMENTHANDLER = "Add method public abstract void setDocumentLocator(Locator) [from org.xml.sax.DocumentHandler]"; 50 public static final String ITEM_ADDMETHODPUBLICABSTRACTVOIDSTARTDOCUMENTTHROWSSAXEXCEPTIONFROMORGXMLSAXDOCUMENTHANDLER = "Add method public abstract void startDocument() throws SAXException [from org.xml.sax.DocumentHandler]"; 51 public static final String ITEM_ADDMETHODPUBLICABSTRACTVOIDSTARTELEMENTSTRINGATTRIBUTELISTTHROWSSAXEXCEPTIONFROMORGXMLSAXDOCUMENTHANDLER = "Add method public abstract void startElement(String, AttributeList) throws SAXException [from org.xml.sax.DocumentHandler]"; 52 private JRadioButtonOperator _rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize; 53 private JRadioButtonOperator _rbConfirmAllChangesDuringSynchronization; 54 private JRadioButtonOperator _rbPerformSynchronizationWithoutConfirmation; 55 private JButtonOperator _btProcess; 56 private JButtonOperator _btProcessAll; 57 private JButtonOperator _btHelp; 58 private JButtonOperator _btClose; 59 60 61 65 68 public JTextAreaOperator txtJTextArea() { 69 if (_txtJTextArea==null) { 70 _txtJTextArea = new JTextAreaOperator(this); 71 } 72 return _txtJTextArea; 73 } 74 75 78 public JLabelOperator lblChangesList() { 79 if (_lblChangesList==null) { 80 _lblChangesList = new JLabelOperator(this, "Changes List"); 81 } 82 return _lblChangesList; 83 } 84 85 88 public JListOperator lstChangesList() { 89 if (_lstChangesList==null) { 90 _lstChangesList = new JListOperator(this); 91 } 92 return _lstChangesList; 93 } 94 95 98 public JRadioButtonOperator rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize() { 99 if (_rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize==null) { 100 _rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize = new JRadioButtonOperator(this, "Do not synchronize this object now (to do so explicitly, use Tools | Synchronize)"); 101 } 102 return _rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize; 103 } 104 105 108 public JRadioButtonOperator rbConfirmAllChangesDuringSynchronization() { 109 if (_rbConfirmAllChangesDuringSynchronization==null) { 110 _rbConfirmAllChangesDuringSynchronization = new JRadioButtonOperator(this, "Confirm all changes during synchronization"); 111 } 112 return _rbConfirmAllChangesDuringSynchronization; 113 } 114 115 118 public JRadioButtonOperator rbPerformSynchronizationWithoutConfirmation() { 119 if (_rbPerformSynchronizationWithoutConfirmation==null) { 120 _rbPerformSynchronizationWithoutConfirmation = new JRadioButtonOperator(this, "Perform synchronization without confirmation"); 121 } 122 return _rbPerformSynchronizationWithoutConfirmation; 123 } 124 125 128 public JButtonOperator btProcess() { 129 if (_btProcess==null) { 130 _btProcess = new JButtonOperator(this, "Process"); 131 } 132 return _btProcess; 133 } 134 135 138 public JButtonOperator btProcessAll() { 139 if (_btProcessAll==null) { 140 _btProcessAll = new JButtonOperator(this, "Process All"); 141 } 142 return _btProcessAll; 143 } 144 145 148 public JButtonOperator btHelp() { 149 if (_btHelp==null) { 150 _btHelp = new JButtonOperator(this, "Help"); 151 } 152 return _btHelp; 153 } 154 155 158 public JButtonOperator btClose() { 159 if (_btClose==null) { 160 _btClose = new JButtonOperator(this, "Close"); 161 } 162 return _btClose; 163 } 164 165 166 170 173 public String getJTextArea() { 174 return txtJTextArea().getText(); 175 } 176 177 180 public void setJTextArea(String text) { 181 txtJTextArea().setText(text); 182 } 183 184 187 public void typeJTextArea(String text) { 188 txtJTextArea().typeText(text); 189 } 190 191 193 public void doNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize() { 194 rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize().push(); 195 } 196 197 199 public void confirmAllChangesDuringSynchronization() { 200 rbConfirmAllChangesDuringSynchronization().push(); 201 } 202 203 205 public void performSynchronizationWithoutConfirmation() { 206 rbPerformSynchronizationWithoutConfirmation().push(); 207 } 208 209 211 public void process() { 212 btProcess().push(); 213 } 214 215 217 public void processAll() { 218 btProcessAll().push(); 219 } 220 221 223 public void help() { 224 btHelp().push(); 225 } 226 227 229 public void close() { 230 btClose().push(); 231 } 232 233 234 238 240 public void verify() { 241 txtJTextArea(); 242 lblChangesList(); 243 lstChangesList(); 244 rbDoNotSynchronizeThisObjectNowToDoSoExplicitlyUseToolsSynchronize(); 245 rbConfirmAllChangesDuringSynchronization(); 246 rbPerformSynchronizationWithoutConfirmation(); 247 btProcess(); 248 btProcessAll(); 249 btHelp(); 250 btClose(); 251 } 252 253 256 public static void main(String args[]) { 257 new ConfirmChangesDialog().verify(); 258 System.out.println("ConfirmChanges verification finished."); 259 } 260 } 261 262 | Popular Tags |