KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > qa > form > NewBeanFormSuperclassOperator


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 package org.netbeans.qa.form;
21
22 import org.netbeans.jemmy.operators.*;
23
24 /**
25  *Class implementing all necessary methods for handling "New File" NbDialog.
26  * Most parts of code are generated by jelly tools.*
27  *
28  * @author Jiri Vagner
29  */

30 public class NewBeanFormSuperclassOperator extends JDialogOperator {
31
32     /** Creates new NewFile that can handle it.
33      */

34     public NewBeanFormSuperclassOperator() {
35         super("New File"); // NOI18N
36
}
37
38     private JLabelOperator _lblSteps;
39     private JListOperator _lstSteps;
40     public static final String JavaDoc ITEM_3 = "3."; // NOI18N
41
private JLabelOperator _lblFormSuperclass;
42     private JLabelOperator _lblSuperclass;
43     private JTextFieldOperator _txtSuperclass;
44     private JLabelOperator _lblWizardDescriptor$FixedHeightLabel;
45     private JButtonOperator _btBack;
46     private JButtonOperator _btNext;
47     private JButtonOperator _btFinish;
48     private JButtonOperator _btCancel;
49     private JButtonOperator _btHelp;
50
51
52     //******************************
53
// Subcomponents definition part
54
//******************************
55

56     /** Tries to find "Steps" JLabel in this dialog.
57      * @return JLabelOperator
58      */

59     public JLabelOperator lblSteps() {
60         if (_lblSteps==null) {
61             _lblSteps = new JLabelOperator(this, "Steps"); // NOI18N
62
}
63         return _lblSteps;
64     }
65
66     /** Tries to find null JList in this dialog.
67      * @return JListOperator
68      */

69     public JListOperator lstSteps() {
70         if (_lstSteps==null) {
71             _lstSteps = new JListOperator(this);
72         }
73         return _lstSteps;
74     }
75
76     /** Tries to find "Form Superclass" JLabel in this dialog.
77      * @return JLabelOperator
78      */

79     public JLabelOperator lblFormSuperclass() {
80         if (_lblFormSuperclass==null) {
81             _lblFormSuperclass = new JLabelOperator(this, "Form Superclass"); // NOI18N
82
}
83         return _lblFormSuperclass;
84     }
85
86     /** Tries to find "Superclass:" JLabel in this dialog.
87      * @return JLabelOperator
88      */

89     public JLabelOperator lblSuperclass() {
90         if (_lblSuperclass==null) {
91             _lblSuperclass = new JLabelOperator(this, "Superclass:"); // NOI18N
92
}
93         return _lblSuperclass;
94     }
95
96     /** Tries to find null JTextField in this dialog.
97      * @return JTextFieldOperator
98      */

99     public JTextFieldOperator txtSuperclass() {
100         if (_txtSuperclass==null) {
101             _txtSuperclass = new JTextFieldOperator(this);
102         }
103         return _txtSuperclass;
104     }
105
106     /** Tries to find " " WizardDescriptor$FixedHeightLabel in this dialog.
107      * @return JLabelOperator
108      */

109     public JLabelOperator lblWizardDescriptor$FixedHeightLabel() {
110         if (_lblWizardDescriptor$FixedHeightLabel==null) {
111             _lblWizardDescriptor$FixedHeightLabel = new JLabelOperator(this, " ", 1); // NOI18N
112
}
113         return _lblWizardDescriptor$FixedHeightLabel;
114     }
115
116     /** Tries to find "< Back" JButton in this dialog.
117      * @return JButtonOperator
118      */

119     public JButtonOperator btBack() {
120         if (_btBack==null) {
121             _btBack = new JButtonOperator(this, "< Back"); // NOI18N
122
}
123         return _btBack;
124     }
125
126     /** Tries to find "Next >" JButton in this dialog.
127      * @return JButtonOperator
128      */

129     public JButtonOperator btNext() {
130         if (_btNext==null) {
131             _btNext = new JButtonOperator(this, "Next >"); // NOI18N
132
}
133         return _btNext;
134     }
135
136     /** Tries to find "Finish" JButton in this dialog.
137      * @return JButtonOperator
138      */

139     public JButtonOperator btFinish() {
140         if (_btFinish==null) {
141             _btFinish = new JButtonOperator(this, "Finish"); // NOI18N
142
}
143         return _btFinish;
144     }
145
146     /** Tries to find "Cancel" JButton in this dialog.
147      * @return JButtonOperator
148      */

149     public JButtonOperator btCancel() {
150         if (_btCancel==null) {
151             _btCancel = new JButtonOperator(this, "Cancel"); // NOI18N
152
}
153         return _btCancel;
154     }
155
156     /** Tries to find "Help" JButton in this dialog.
157      * @return JButtonOperator
158      */

159     public JButtonOperator btHelp() {
160         if (_btHelp==null) {
161             _btHelp = new JButtonOperator(this, "Help"); // NOI18N
162
}
163         return _btHelp;
164     }
165
166
167     //****************************************
168
// Low-level functionality definition part
169
//****************************************
170

171     /** gets text for txtSuperclass
172      * @return String text
173      */

174     public String JavaDoc getSuperclass() {
175         return txtSuperclass().getText();
176     }
177
178     /** sets text for txtSuperclass
179      * @param text String text
180      */

181     public void setSuperclass(String JavaDoc text) {
182         txtSuperclass().setText(text);
183     }
184
185     /** types text for txtSuperclass
186      * @param text String text
187      */

188     public void typeSuperclass(String JavaDoc text) {
189         txtSuperclass().typeText(text);
190     }
191
192     /** clicks on "< Back" JButton
193      */

194     public void back() {
195         btBack().push();
196     }
197
198     /** clicks on "Next >" JButton
199      */

200     public void next() {
201         btNext().push();
202     }
203
204     /** clicks on "Finish" JButton
205      */

206     public void finish() {
207         btFinish().push();
208     }
209
210     /** clicks on "Cancel" JButton
211      */

212     public void cancel() {
213         btCancel().push();
214     }
215
216     /** clicks on "Help" JButton
217      */

218     public void help() {
219         btHelp().push();
220     }
221 }
222
223
Popular Tags