KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > jellytools > modules > xml > saxwizard > SAXDocumentHandlerWizardPage4


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 /*
20  * SAXDocumentHandlerWizardPage4.java
21  *
22  * Created on 9/3/02 7:44 PM
23  */

24 package org.netbeans.jellytools.modules.xml.saxwizard;
25
26 import org.netbeans.jellytools.WizardOperator;
27 import org.netbeans.jemmy.operators.*;
28
29 /** Class implementing all necessary methods for handling "SAX Document Handler Wizard" NbDialog.
30  *
31  * @author ms113234
32  * @version 1.0
33  */

34 public class SAXDocumentHandlerWizardPage4 extends WizardOperator {
35
36     /** Creates new SAXDocumentHandlerWizardPage4 that can handle it.
37      */

38     public SAXDocumentHandlerWizardPage4() {
39         super("SAX Document Handler Wizard");
40     }
41
42     private JLabelOperator _lblSteps;
43     private JListOperator _lstSteps;
44     private JLabelOperator _lbl4Of4OutputFileNames;
45     private JTextAreaOperator _txtJTextArea;
46     private JLabelOperator _lblHandlerInterface;
47     private JTextFieldOperator _txtHandlerInterface;
48     private JLabelOperator _lblHandlerImplementation;
49     private JTextFieldOperator _txtHandlerImplementation;
50     private JLabelOperator _lblGeneratedParser;
51     private JTextFieldOperator _txtGeneratedParser;
52     private JLabelOperator _lblDataConvertorInterface;
53     private JTextFieldOperator _txtDataConvertorInterface;
54     private JLabelOperator _lblDataConvertorImplementation;
55     private JTextFieldOperator _txtDataConvertorImplementation;
56     private JCheckBoxOperator _cbSaveCustomizedBindings;
57     private JLabelOperator _lblLocation;
58     private JTextFieldOperator _txtLocation;
59     private JButtonOperator _btCancel;
60     private JButtonOperator _btHelp;
61
62
63     //******************************
64
// Subcomponents definition part
65
//******************************
66

67     /** Tries to find "Steps" JLabel in this dialog.
68      * @return JLabelOperator
69      */

70     public JLabelOperator lblSteps() {
71         if (_lblSteps==null) {
72             _lblSteps = new JLabelOperator(this, "Steps");
73         }
74         return _lblSteps;
75     }
76
77     /** Tries to find null JList in this dialog.
78      * @return JListOperator
79      */

80     public JListOperator lstSteps() {
81         if (_lstSteps==null) {
82             _lstSteps = new JListOperator(this);
83         }
84         return _lstSteps;
85     }
86
87     /** Tries to find "4 of 4 - Output File Names" JLabel in this dialog.
88      * @return JLabelOperator
89      */

90     public JLabelOperator lbl4Of4OutputFileNames() {
91         if (_lbl4Of4OutputFileNames==null) {
92             _lbl4Of4OutputFileNames = new JLabelOperator(this, "4 of 4 - Output File Names");
93         }
94         return _lbl4Of4OutputFileNames;
95     }
96
97     /** Tries to find null JTextArea in this dialog.
98      * @return JTextAreaOperator
99      */

100     public JTextAreaOperator txtJTextArea() {
101         if (_txtJTextArea==null) {
102             _txtJTextArea = new JTextAreaOperator(this);
103         }
104         return _txtJTextArea;
105     }
106
107     /** Tries to find "Handler Interface:" JLabel in this dialog.
108      * @return JLabelOperator
109      */

110     public JLabelOperator lblHandlerInterface() {
111         if (_lblHandlerInterface==null) {
112             _lblHandlerInterface = new JLabelOperator(this, "Handler Interface:");
113         }
114         return _lblHandlerInterface;
115     }
116
117     /** Tries to find null ValidatingTextField in this dialog.
118      * @return JTextFieldOperator
119      */

120     public JTextFieldOperator txtHandlerInterface() {
121         if (_txtHandlerInterface==null) {
122             _txtHandlerInterface = new JTextFieldOperator(this);
123         }
124         return _txtHandlerInterface;
125     }
126
127     /** Tries to find "Handler Implementation:" JLabel in this dialog.
128      * @return JLabelOperator
129      */

130     public JLabelOperator lblHandlerImplementation() {
131         if (_lblHandlerImplementation==null) {
132             _lblHandlerImplementation = new JLabelOperator(this, "Handler Implementation:");
133         }
134         return _lblHandlerImplementation;
135     }
136
137     /** Tries to find null ValidatingTextField in this dialog.
138      * @return JTextFieldOperator
139      */

140     public JTextFieldOperator txtHandlerImplementation() {
141         if (_txtHandlerImplementation==null) {
142             _txtHandlerImplementation = new JTextFieldOperator(this, 1);
143         }
144         return _txtHandlerImplementation;
145     }
146
147     /** Tries to find "Generated Parser:" JLabel in this dialog.
148      * @return JLabelOperator
149      */

150     public JLabelOperator lblGeneratedParser() {
151         if (_lblGeneratedParser==null) {
152             _lblGeneratedParser = new JLabelOperator(this, "Generated Parser:");
153         }
154         return _lblGeneratedParser;
155     }
156
157     /** Tries to find null ValidatingTextField in this dialog.
158      * @return JTextFieldOperator
159      */

160     public JTextFieldOperator txtGeneratedParser() {
161         if (_txtGeneratedParser==null) {
162             _txtGeneratedParser = new JTextFieldOperator(this, 2);
163         }
164         return _txtGeneratedParser;
165     }
166
167     /** Tries to find "Data Convertor Interface:" JLabel in this dialog.
168      * @return JLabelOperator
169      */

170     public JLabelOperator lblDataConvertorInterface() {
171         if (_lblDataConvertorInterface==null) {
172             _lblDataConvertorInterface = new JLabelOperator(this, "Data Convertor Interface:");
173         }
174         return _lblDataConvertorInterface;
175     }
176
177     /** Tries to find null ValidatingTextField in this dialog.
178      * @return JTextFieldOperator
179      */

180     public JTextFieldOperator txtDataConvertorInterface() {
181         if (_txtDataConvertorInterface==null) {
182             _txtDataConvertorInterface = new JTextFieldOperator(this, 3);
183         }
184         return _txtDataConvertorInterface;
185     }
186
187     /** Tries to find "Data Convertor Implementation:" JLabel in this dialog.
188      * @return JLabelOperator
189      */

190     public JLabelOperator lblDataConvertorImplementation() {
191         if (_lblDataConvertorImplementation==null) {
192             _lblDataConvertorImplementation = new JLabelOperator(this, "Data Convertor Implementation:");
193         }
194         return _lblDataConvertorImplementation;
195     }
196
197     /** Tries to find null ValidatingTextField in this dialog.
198      * @return JTextFieldOperator
199      */

200     public JTextFieldOperator txtDataConvertorImplementation() {
201         if (_txtDataConvertorImplementation==null) {
202             _txtDataConvertorImplementation = new JTextFieldOperator(this, 4);
203         }
204         return _txtDataConvertorImplementation;
205     }
206
207     /** Tries to find " Save Customized Bindings" JCheckBox in this dialog.
208      * @return JCheckBoxOperator
209      */

210     public JCheckBoxOperator cbSaveCustomizedBindings() {
211         if (_cbSaveCustomizedBindings==null) {
212             _cbSaveCustomizedBindings = new JCheckBoxOperator(this, " Save Customized Bindings");
213         }
214         return _cbSaveCustomizedBindings;
215     }
216
217     /** Tries to find "Location:" JLabel in this dialog.
218      * @return JLabelOperator
219      */

220     public JLabelOperator lblLocation() {
221         if (_lblLocation==null) {
222             _lblLocation = new JLabelOperator(this, "Location:");
223         }
224         return _lblLocation;
225     }
226
227     /** Tries to find null ValidatingTextField in this dialog.
228      * @return JTextFieldOperator
229      */

230     public JTextFieldOperator txtLocation() {
231         if (_txtLocation==null) {
232             _txtLocation = new JTextFieldOperator(this, 5);
233         }
234         return _txtLocation;
235     }
236
237     /** Tries to find "Cancel" JButton in this dialog.
238      * @return JButtonOperator
239      */

240     public JButtonOperator btCancel() {
241         if (_btCancel==null) {
242             _btCancel = new JButtonOperator(this, "Cancel");
243         }
244         return _btCancel;
245     }
246
247     /** Tries to find "Help" JButton in this dialog.
248      * @return JButtonOperator
249      */

250     public JButtonOperator btHelp() {
251         if (_btHelp==null) {
252             _btHelp = new JButtonOperator(this, "Help");
253         }
254         return _btHelp;
255     }
256
257
258     //****************************************
259
// Low-level functionality definition part
260
//****************************************
261

262     /** gets text for txtJTextArea
263      * @return String text
264      */

265     public String JavaDoc getJTextArea() {
266         return txtJTextArea().getText();
267     }
268
269     /** sets text for txtJTextArea
270      * @param text String text
271      */

272     public void setJTextArea(String JavaDoc text) {
273         txtJTextArea().setText(text);
274     }
275
276     /** types text for txtJTextArea
277      * @param text String text
278      */

279     public void typeJTextArea(String JavaDoc text) {
280         txtJTextArea().typeText(text);
281     }
282
283     /** gets text for txtHandlerInterface
284      * @return String text
285      */

286     public String JavaDoc getHandlerInterface() {
287         return txtHandlerInterface().getText();
288     }
289
290     /** sets text for txtHandlerInterface
291      * @param text String text
292      */

293     public void setHandlerInterface(String JavaDoc text) {
294         txtHandlerInterface().setText(text);
295     }
296
297     /** types text for txtHandlerInterface
298      * @param text String text
299      */

300     public void typeHandlerInterface(String JavaDoc text) {
301         txtHandlerInterface().typeText(text);
302     }
303
304     /** gets text for txtHandlerImplementation
305      * @return String text
306      */

307     public String JavaDoc getHandlerImplementation() {
308         return txtHandlerImplementation().getText();
309     }
310
311     /** sets text for txtHandlerImplementation
312      * @param text String text
313      */

314     public void setHandlerImplementation(String JavaDoc text) {
315         txtHandlerImplementation().setText(text);
316     }
317
318     /** types text for txtHandlerImplementation
319      * @param text String text
320      */

321     public void typeHandlerImplementation(String JavaDoc text) {
322         txtHandlerImplementation().typeText(text);
323     }
324
325     /** gets text for txtGeneratedParser
326      * @return String text
327      */

328     public String JavaDoc getGeneratedParser() {
329         return txtGeneratedParser().getText();
330     }
331
332     /** sets text for txtGeneratedParser
333      * @param text String text
334      */

335     public void setGeneratedParser(String JavaDoc text) {
336         txtGeneratedParser().setText(text);
337     }
338
339     /** types text for txtGeneratedParser
340      * @param text String text
341      */

342     public void typeGeneratedParser(String JavaDoc text) {
343         txtGeneratedParser().typeText(text);
344     }
345
346     /** gets text for txtDataConvertorInterface
347      * @return String text
348      */

349     public String JavaDoc getDataConvertorInterface() {
350         return txtDataConvertorInterface().getText();
351     }
352
353     /** sets text for txtDataConvertorInterface
354      * @param text String text
355      */

356     public void setDataConvertorInterface(String JavaDoc text) {
357         txtDataConvertorInterface().setText(text);
358     }
359
360     /** types text for txtDataConvertorInterface
361      * @param text String text
362      */

363     public void typeDataConvertorInterface(String JavaDoc text) {
364         txtDataConvertorInterface().typeText(text);
365     }
366
367     /** gets text for txtDataConvertorImplementation
368      * @return String text
369      */

370     public String JavaDoc getDataConvertorImplementation() {
371         return txtDataConvertorImplementation().getText();
372     }
373
374     /** sets text for txtDataConvertorImplementation
375      * @param text String text
376      */

377     public void setDataConvertorImplementation(String JavaDoc text) {
378         txtDataConvertorImplementation().setText(text);
379     }
380
381     /** types text for txtDataConvertorImplementation
382      * @param text String text
383      */

384     public void typeDataConvertorImplementation(String JavaDoc text) {
385         txtDataConvertorImplementation().typeText(text);
386     }
387
388     /** checks or unchecks given JCheckBox
389      * @param state boolean requested state
390      */

391     public void checkSaveCustomizedBindings(boolean state) {
392         if (cbSaveCustomizedBindings().isSelected()!=state) {
393             cbSaveCustomizedBindings().push();
394         }
395     }
396
397     /** gets text for txtLocation
398      * @return String text
399      */

400     public String JavaDoc getBindingsLocation() {
401         return txtLocation().getText();
402     }
403
404     /** sets text for txtLocation
405      * @param text String text
406      */

407     public void setLocation(String JavaDoc text) {
408         txtLocation().setText(text);
409     }
410
411     /** types text for txtLocation
412      * @param text String text
413      */

414     public void typeLocation(String JavaDoc text) {
415         txtLocation().typeText(text);
416     }
417
418     /** clicks on "Cancel" JButton
419      */

420     public void cancel() {
421         btCancel().push();
422     }
423
424     /** clicks on "Help" JButton
425      */

426     public void help() {
427         btHelp().push();
428     }
429
430
431     //*****************************************
432
// High-level functionality definition part
433
//*****************************************
434

435     /** Performs verification of SAXDocumentHandlerWizardPage4 by accessing all its components.
436      */

437     public void verify() {
438         lblSteps();
439         lstSteps();
440         lbl4Of4OutputFileNames();
441         txtJTextArea();
442         lblHandlerInterface();
443         txtHandlerInterface();
444         lblHandlerImplementation();
445         txtHandlerImplementation();
446         lblGeneratedParser();
447         txtGeneratedParser();
448         lblDataConvertorInterface();
449         txtDataConvertorInterface();
450         lblDataConvertorImplementation();
451         txtDataConvertorImplementation();
452         cbSaveCustomizedBindings();
453         lblLocation();
454         txtLocation();
455         btCancel();
456         btHelp();
457     }
458
459     /** Performs simple test of SAXDocumentHandlerWizardPage4
460     * @param args the command line arguments
461     */

462     public static void main(String JavaDoc args[]) {
463         new SAXDocumentHandlerWizardPage4().verify();
464         System.out.println("SAXDocumentHandlerWizardPage4 verification finished.");
465     }
466 }
467
468
Popular Tags