KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * CommitStepOperator.java
3  *
4  * Created on 10/05/06 14:53
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 "CommitStepOperator" NbDialog.
12  *
13  *
14  * @author peter
15  * @version 1.0
16  */

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

22     public CommitStepOperator() {
23         super();
24         stepsWaitSelectedValue("Files to Import");
25     }
26
27     private JLabelOperator _lblSteps;
28     private JListOperator _lstSteps;
29     private JLabelOperator _lblFilesToImport;
30     private JTableOperator _tabFiles;
31     private JButtonOperator _btWindowsScrollBarUI$WindowsArrowButton;
32     private JButtonOperator _btWindowsScrollBarUI$WindowsArrowButton2;
33     private JLabelOperator _lblCommitFiles;
34     private JLabelOperator _lblWizardDescriptor$FixedHeightLabel;
35     private JButtonOperator _btBack;
36     private JButtonOperator _btNext;
37     private JButtonOperator _btFinish;
38     private JButtonOperator _btCancel;
39     private JButtonOperator _btHelp;
40
41
42     //******************************
43
// Subcomponents definition part
44
//******************************
45

46     /** Tries to find "Steps" JLabel in this dialog.
47      * @return JLabelOperator
48      */

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

59     public JListOperator lstSteps() {
60         if (_lstSteps==null) {
61             _lstSteps = new JListOperator(this);
62         }
63         return _lstSteps;
64     }
65
66     /**
67      * Tries to find "Files to CommitStepOperator" JLabel in this dialog.
68      *
69      * @return JLabelOperator
70      */

71     public JLabelOperator lblFilesToImport() {
72         if (_lblFilesToImport==null) {
73             _lblFilesToImport = new JLabelOperator(this, "Files to Import");
74         }
75         return _lblFilesToImport;
76     }
77
78     /** Tries to find null JTable in this dialog.
79      * @return JTableOperator
80      */

81     public JTableOperator tabFiles() {
82         if (_tabFiles==null) {
83             _tabFiles = new JTableOperator(this);
84         }
85         return _tabFiles;
86     }
87
88     /** Tries to find null WindowsScrollBarUI$WindowsArrowButton in this dialog.
89      * @return JButtonOperator
90      */

91     public JButtonOperator btWindowsScrollBarUI$WindowsArrowButton() {
92         if (_btWindowsScrollBarUI$WindowsArrowButton==null) {
93             _btWindowsScrollBarUI$WindowsArrowButton = new JButtonOperator(this);
94         }
95         return _btWindowsScrollBarUI$WindowsArrowButton;
96     }
97
98     /** Tries to find null WindowsScrollBarUI$WindowsArrowButton in this dialog.
99      * @return JButtonOperator
100      */

101     public JButtonOperator btWindowsScrollBarUI$WindowsArrowButton2() {
102         if (_btWindowsScrollBarUI$WindowsArrowButton2==null) {
103             _btWindowsScrollBarUI$WindowsArrowButton2 = new JButtonOperator(this, 1);
104         }
105         return _btWindowsScrollBarUI$WindowsArrowButton2;
106     }
107
108     /** Tries to find "Commit files" JLabel in this dialog.
109      * @return JLabelOperator
110      */

111     public JLabelOperator lblCommitFiles() {
112         if (_lblCommitFiles==null) {
113             _lblCommitFiles = new JLabelOperator(this, "Files to Commit");
114         }
115         return _lblCommitFiles;
116     }
117
118     /** Tries to find " " WizardDescriptor$FixedHeightLabel in this dialog.
119      * @return JLabelOperator
120      */

121     public JLabelOperator lblWizardDescriptor$FixedHeightLabel() {
122         if (_lblWizardDescriptor$FixedHeightLabel==null) {
123             _lblWizardDescriptor$FixedHeightLabel = new JLabelOperator(this, " ", 2);
124         }
125         return _lblWizardDescriptor$FixedHeightLabel;
126     }
127
128     /** Tries to find "< Back" JButton in this dialog.
129      * @return JButtonOperator
130      */

131     public JButtonOperator btBack() {
132         if (_btBack==null) {
133             _btBack = new JButtonOperator(this, "< Back");
134         }
135         return _btBack;
136     }
137
138     /** Tries to find "Next >" JButton in this dialog.
139      * @return JButtonOperator
140      */

141     public JButtonOperator btNext() {
142         if (_btNext==null) {
143             _btNext = new JButtonOperator(this, "Next >");
144         }
145         return _btNext;
146     }
147
148     /** Tries to find "Finish" JButton in this dialog.
149      * @return JButtonOperator
150      */

151     public JButtonOperator btFinish() {
152         if (_btFinish==null) {
153             _btFinish = new JButtonOperator(this, "Finish");
154         }
155         return _btFinish;
156     }
157
158     /** Tries to find "Cancel" JButton in this dialog.
159      * @return JButtonOperator
160      */

161     public JButtonOperator btCancel() {
162         if (_btCancel==null) {
163             _btCancel = new JButtonOperator(this, "Cancel");
164         }
165         return _btCancel;
166     }
167
168     /** Tries to find "Help" JButton in this dialog.
169      * @return JButtonOperator
170      */

171     public JButtonOperator btHelp() {
172         if (_btHelp==null) {
173             _btHelp = new JButtonOperator(this, "Help");
174         }
175         return _btHelp;
176     }
177
178
179     //****************************************
180
// Low-level functionality definition part
181
//****************************************
182

183     /** clicks on null WindowsScrollBarUI$WindowsArrowButton
184      */

185     public void windowsScrollBarUI$WindowsArrowButton() {
186         btWindowsScrollBarUI$WindowsArrowButton().push();
187     }
188
189     /** clicks on null WindowsScrollBarUI$WindowsArrowButton
190      */

191     public void windowsScrollBarUI$WindowsArrowButton2() {
192         btWindowsScrollBarUI$WindowsArrowButton2().push();
193     }
194
195     /** clicks on "< Back" JButton
196      */

197     public void back() {
198         btBack().push();
199     }
200
201     /** clicks on "Next >" JButton
202      */

203     public void next() {
204         btNext().push();
205     }
206
207     /** clicks on "Finish" JButton
208      */

209     public void finish() {
210         btFinish().push();
211     }
212
213     /** clicks on "Cancel" JButton
214      */

215     public void cancel() {
216         btCancel().push();
217     }
218
219     /** clicks on "Help" JButton
220      */

221     public void help() {
222         btHelp().push();
223     }
224
225     /** Selects specified commit action for given row.
226      * @param rowIndex index of row to be selected
227      * @param action name of action to be selected
228      */

229     public void selectCommitAction(int rowIndex, String JavaDoc action) {
230         tabFiles().clickOnCell(rowIndex, 1);
231         JComboBoxOperator combo = new JComboBoxOperator(tabFiles());
232         combo.selectItem(action);
233     }
234
235     /** Selects specified commit action for given row.
236      * @param filename name of file to be selected
237      * @param action name of action to be selected
238      */

239     public void selectCommitAction(String JavaDoc filename, String JavaDoc action) {
240         selectCommitAction(tabFiles().findCellRow(filename), action);
241     }
242
243     //*****************************************
244
// High-level functionality definition part
245
//*****************************************
246

247     /**
248      * Performs verification of CommitStepOperator by accessing all its components.
249      */

250     public void verify() {
251         lblSteps();
252         lstSteps();
253         lblFilesToImport();
254         tabFiles();
255         btWindowsScrollBarUI$WindowsArrowButton();
256         btWindowsScrollBarUI$WindowsArrowButton2();
257 // lblCommitFiles();
258
lblWizardDescriptor$FixedHeightLabel();
259         btBack();
260         btNext();
261         btFinish();
262         btCancel();
263         btHelp();
264     }
265 }
266
267
Popular Tags