KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > jellytools > modules > xml > catalog > XMLCatalogCustomizerDialogOperator


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  * XMLCatalogCustomizerDialogDialogOperator.java
21  *
22  * Created on 11/13/03 4:25 PM
23  */

24 package org.netbeans.jellytools.modules.xml.catalog;
25
26 import org.netbeans.jemmy.operators.*;
27 import org.netbeans.jellytools.*;
28 import org.netbeans.jellytools.properties.PropertySheetOperator;
29
30 /** Class implementing all necessary methods for handling "Customizer Dialog" NbDialog.
31  *
32  * @author ms113234
33  * @version 1.0
34  */

35 public class XMLCatalogCustomizerDialogOperator extends NbDialogOperator {
36
37     /** Creates new XMLCatalogCustomizerDialogDialogOperator that can handle it.
38      */

39     public XMLCatalogCustomizerDialogOperator() {
40         super("Customizer Dialog");
41     }
42
43     private JLabelOperator _lblXMLCatalogURL;
44     private JTextFieldOperator _txtXMLCatalogURL;
45     private JTextAreaOperator _txtJTextArea;
46
47
48     //******************************
49
// Subcomponents definition part
50
//******************************
51

52     /** Tries to find "XML Catalog URL:" JLabel in this dialog.
53      * @return JLabelOperator
54      */

55     public JLabelOperator lblXMLCatalogURL() {
56         if (_lblXMLCatalogURL==null) {
57             _lblXMLCatalogURL = new JLabelOperator(this, "XML Catalog URL:");
58         }
59         return _lblXMLCatalogURL;
60     }
61
62     /** Tries to find null JTextField in this dialog.
63      * @return JTextFieldOperator
64      */

65     public JTextFieldOperator txtXMLCatalogURL() {
66         if (_txtXMLCatalogURL==null) {
67             _txtXMLCatalogURL = new JTextFieldOperator(this);
68         }
69         return _txtXMLCatalogURL;
70     }
71
72     /** Tries to find null JTextArea in this dialog.
73      * @return JTextAreaOperator
74      */

75     public JTextAreaOperator txtJTextArea() {
76         if (_txtJTextArea==null) {
77             _txtJTextArea = new JTextAreaOperator(this);
78         }
79         return _txtJTextArea;
80     }
81
82
83     //****************************************
84
// Low-level functionality definition part
85
//****************************************
86

87     /** gets text for txtXMLCatalogURL
88      * @return String text
89      */

90     public String JavaDoc getXMLCatalogURL() {
91         return txtXMLCatalogURL().getText();
92     }
93
94     /** sets text for txtXMLCatalogURL
95      * @param text String text
96      */

97     public void setXMLCatalogURL(String JavaDoc text) {
98         txtXMLCatalogURL().setText(text);
99     }
100
101     /** types text for txtXMLCatalogURL
102      * @param text String text
103      */

104     public void typeXMLCatalogURL(String JavaDoc text) {
105         txtXMLCatalogURL().typeText(text);
106     }
107
108     /** gets text for txtJTextArea
109      * @return String text
110      */

111     public String JavaDoc getJTextArea() {
112         return txtJTextArea().getText();
113     }
114
115     /** sets text for txtJTextArea
116      * @param text String text
117      */

118     public void setJTextArea(String JavaDoc text) {
119         txtJTextArea().setText(text);
120     }
121
122     /** types text for txtJTextArea
123      * @param text String text
124      */

125     public void typeJTextArea(String JavaDoc text) {
126         txtJTextArea().typeText(text);
127     }
128
129
130     //*****************************************
131
// High-level functionality definition part
132
//*****************************************
133

134     /** Performs verification of XMLCatalogCustomizerDialogDialogOperator by accessing all its components.
135      */

136     public void verify() {
137         lblXMLCatalogURL();
138         txtXMLCatalogURL();
139         txtJTextArea();
140     }
141
142     /** Performs simple test of XMLCatalogCustomizerDialogDialogOperator
143     * @param args the command line arguments
144     */

145     public static void main(String JavaDoc args[]) {
146         new XMLCatalogCustomizerDialogOperator().verify();
147         System.out.println("XMLCatalogCustomizerDialogDialogOperator verification finished.");
148     }
149 }
150
151
Popular Tags