KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > test > subversion > operators > FolderToImportStepOperator


1 /*
2  * FolderToImportStepOperator.java
3  *
4  * Created on 10/05/06 14:10
5  */

6 package org.netbeans.test.subversion.operators;
7
8 import org.netbeans.jemmy.operators.*;
9
10 /**
11  * Class implementing all necessary methods for handling "FolderToImportStepOperator" NbDialog.
12  *
13  *
14  *
15  * @author peter
16  * @version 1.0
17  */

18 public class FolderToImportStepOperator extends ImportWizardOperator {
19
20     /**
21      * Creates new FolderToImportStepOperator that can handle it.
22      */

23     public FolderToImportStepOperator() {
24         super();
25         stepsWaitSelectedValue("Repository folder");
26     }
27
28     private JLabelOperator _lblSteps;
29     private JListOperator _lstSteps;
30     private JLabelOperator _lblRepositoryFolder;
31     private JTextAreaOperator _txtImportMessage;
32     private JLabelOperator _lblRepositoryFolder2;
33     private JTextFieldOperator _txtRepositoryFolder;
34     private JButtonOperator _btBrowse;
35     private JLabelOperator _lblSpecifyTheRepositoryFolderYouWantToImportIn;
36     private JLabelOperator _lblSpecifyTheMessage;
37     private JLabelOperator _lblImportMessageRequired;
38     private JButtonOperator _btStop;
39     private JButtonOperator _btBack;
40     private JButtonOperator _btNext;
41     private JButtonOperator _btFinish;
42     private JButtonOperator _btCancel;
43     private JButtonOperator _btHelp;
44
45
46     //******************************
47
// Subcomponents definition part
48
//******************************
49

50     /** Tries to find "Steps" JLabel in this dialog.
51      * @return JLabelOperator
52      */

53     public JLabelOperator lblSteps() {
54         if (_lblSteps==null) {
55             _lblSteps = new JLabelOperator(this, "Steps");
56         }
57         return _lblSteps;
58     }
59
60     /** Tries to find null JList in this dialog.
61      * @return JListOperator
62      */

63     public JListOperator lstSteps() {
64         if (_lstSteps==null) {
65             _lstSteps = new JListOperator(this);
66         }
67         return _lstSteps;
68     }
69
70     /** Tries to find "Repository folder" JLabel in this dialog.
71      * @return JLabelOperator
72      */

73     public JLabelOperator lblRepositoryFolder() {
74         if (_lblRepositoryFolder==null) {
75             _lblRepositoryFolder = new JLabelOperator(this, "Repository folder");
76         }
77         return _lblRepositoryFolder;
78     }
79
80     /** Tries to find null JTextArea in this dialog.
81      * @return JTextAreaOperator
82      */

83     public JTextAreaOperator txtJTextArea() {
84         if (_txtImportMessage==null) {
85             _txtImportMessage = new JTextAreaOperator(this);
86         }
87         return _txtImportMessage;
88     }
89
90     /** Tries to find "Repository Folder:" JLabel in this dialog.
91      * @return JLabelOperator
92      */

93     public JLabelOperator lblRepositoryFolder2() {
94         if (_lblRepositoryFolder2==null) {
95             _lblRepositoryFolder2 = new JLabelOperator(this, "Repository Folder:");
96         }
97         return _lblRepositoryFolder2;
98     }
99
100     /** Tries to find null JTextField in this dialog.
101      * @return JTextFieldOperator
102      */

103     public JTextFieldOperator txtJTextField() {
104         if (_txtRepositoryFolder==null) {
105             _txtRepositoryFolder = new JTextFieldOperator(this);
106         }
107         return _txtRepositoryFolder;
108     }
109     
110     /** Tries to find "Stop" JButton in this dialog.
111      * @return JButtonOperator
112      */

113     public JButtonOperator btStop() {
114         if (_btStop==null) {
115             _btStop = new JButtonOperator(this, "Stop");
116         }
117         return _btStop;
118     }
119
120     /** Tries to find "Browse..." JButton in this dialog.
121      * @return JButtonOperator
122      */

123     public JButtonOperator btBrowse() {
124         if (_btBrowse==null) {
125             _btBrowse = new JButtonOperator(this, "Browse...");
126         }
127         return _btBrowse;
128     }
129
130     /** Tries to find "Specify the repository folder you want to import in" JLabel in this dialog.
131      * @return JLabelOperator
132      */

133     public JLabelOperator lblSpecifyTheRepositoryFolderYouWantToImportIn() {
134         if (_lblSpecifyTheRepositoryFolderYouWantToImportIn==null) {
135             _lblSpecifyTheRepositoryFolderYouWantToImportIn = new JLabelOperator(this, "Specify the repository folder you want to import in");
136         }
137         return _lblSpecifyTheRepositoryFolderYouWantToImportIn;
138     }
139
140     /** Tries to find "Specify the message:" JLabel in this dialog.
141      * @return JLabelOperator
142      */

143     public JLabelOperator lblSpecifyTheMessage() {
144         if (_lblSpecifyTheMessage==null) {
145             _lblSpecifyTheMessage = new JLabelOperator(this, "Specify the message:");
146         }
147         return _lblSpecifyTheMessage;
148     }
149
150     /**
151      * Tries to find "FolderToImportStepOperator message required" WizardDescriptor$FixedHeightLabel in this dialog.
152      *
153      *
154      * @return JLabelOperator
155      */

156     public JLabelOperator lblImportMessageRequired() {
157         if (_lblImportMessageRequired==null) {
158             _lblImportMessageRequired = new JLabelOperator(this, 6);
159         }
160         return _lblImportMessageRequired;
161     }
162
163     /** Tries to find "< Back" JButton in this dialog.
164      * @return JButtonOperator
165      */

166     public JButtonOperator btBack() {
167         if (_btBack==null) {
168             _btBack = new JButtonOperator(this, "< Back");
169         }
170         return _btBack;
171     }
172
173     /** Tries to find "Next >" JButton in this dialog.
174      * @return JButtonOperator
175      */

176     public JButtonOperator btNext() {
177         if (_btNext==null) {
178             _btNext = new JButtonOperator(this, "Next >");
179         }
180         return _btNext;
181     }
182
183     /** Tries to find "Finish" JButton in this dialog.
184      * @return JButtonOperator
185      */

186     public JButtonOperator btFinish() {
187         if (_btFinish==null) {
188             _btFinish = new JButtonOperator(this, "Finish");
189         }
190         return _btFinish;
191     }
192
193     /** Tries to find "Cancel" JButton in this dialog.
194      * @return JButtonOperator
195      */

196     public JButtonOperator btCancel() {
197         if (_btCancel==null) {
198             _btCancel = new JButtonOperator(this, "Cancel");
199         }
200         return _btCancel;
201     }
202
203     /** Tries to find "Help" JButton in this dialog.
204      * @return JButtonOperator
205      */

206     public JButtonOperator btHelp() {
207         if (_btHelp==null) {
208             _btHelp = new JButtonOperator(this, "Help");
209         }
210         return _btHelp;
211     }
212
213
214     //****************************************
215
// Low-level functionality definition part
216
//****************************************
217

218     /** gets text for txtJTextArea
219      * @return String text
220      */

221     public String JavaDoc getImportMessage() {
222         return txtJTextArea().getText();
223     }
224
225     /** sets text for txtJTextArea
226      * @param text String text
227      */

228     public void setImportMessage(String JavaDoc text) {
229         txtJTextArea().clearText();
230         txtJTextArea().setText(text);
231     }
232
233     /** gets text for txtJTextField
234      * @return String text
235      */

236     public String JavaDoc getRepositoryFolder() {
237         return txtJTextField().getText();
238     }
239
240     /** sets text for txtJTextField
241      * @param text String text
242      */

243     public void setRepositoryFolder(String JavaDoc text) {
244         txtJTextField().setText(text);
245     }
246
247     public void browse() {
248         btBrowse().push();
249     }
250     
251     public RepositoryBrowserImpOperator browseRepository() {
252         btBrowse().pushNoBlock();
253         return new RepositoryBrowserImpOperator();
254     }
255
256     /** clicks on "< Back" JButton
257      */

258     public void back() {
259         btBack().push();
260     }
261
262     /** clicks on "Next >" JButton
263      */

264     public void next() {
265         btNext().push();
266     }
267
268     /** clicks on "Finish" JButton
269      */

270     public void finish() {
271         btFinish().push();
272     }
273
274     /** clicks on "Cancel" JButton
275      */

276     public void cancel() {
277         btCancel().push();
278     }
279
280     /** clicks on "Help" JButton
281      */

282     public void help() {
283         btHelp().push();
284     }
285
286
287     //*****************************************
288
// High-level functionality definition part
289
//*****************************************
290

291     /**
292      * Performs verification of FolderToImportStepOperator by accessing all its components.
293      */

294     public void verify() {
295         lblSteps();
296         lstSteps();
297         lblRepositoryFolder();
298         txtJTextArea();
299         lblRepositoryFolder2();
300         txtJTextField();
301         btBrowse();
302         lblSpecifyTheRepositoryFolderYouWantToImportIn();
303         lblSpecifyTheMessage();
304         lblImportMessageRequired();
305         btBack();
306         btNext();
307         btFinish();
308         btCancel();
309         btHelp();
310     }
311 }
312
313
Popular Tags