Source Code Cross Referenced for CVSRootStepOperator.java in  » IDE-Netbeans » jellytools » org » netbeans » jellytools » modules » javacvs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » jellytools » org.netbeans.jellytools.modules.javacvs 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         *
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * The contents of this file are subject to the terms of either the GNU
007:         * General Public License Version 2 only ("GPL") or the Common
008:         * Development and Distribution License("CDDL") (collectively, the
009:         * "License"). You may not use this file except in compliance with the
010:         * License. You can obtain a copy of the License at
011:         * http://www.netbeans.org/cddl-gplv2.html
012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013:         * specific language governing permissions and limitations under the
014:         * License.  When distributing the software, include this License Header
015:         * Notice in each file and include the License file at
016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
017:         * particular file as subject to the "Classpath" exception as provided
018:         * by Sun in the GPL Version 2 section of the License file that
019:         * accompanied this code. If applicable, add the following below the
020:         * License Header, with the fields enclosed by brackets [] replaced by
021:         * your own identifying information:
022:         * "Portions Copyrighted [year] [name of copyright owner]"
023:         *
024:         * Contributor(s):
025:         *
026:         * The Original Software is NetBeans. The Initial Developer of the Original
027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028:         * Microsystems, Inc. All Rights Reserved.
029:         *
030:         * If you wish your version of this file to be governed by only the CDDL
031:         * or only the GPL Version 2, indicate your decision by adding
032:         * "[Contributor] elects to include this software in this distribution
033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
034:         * single choice of license, a recipient has the option to distribute
035:         * your version of this file under either the CDDL, the GPL Version 2 or
036:         * to extend the choice of license to its licensees as provided above.
037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
038:         * Version 2 license, then the option applies only if the new code is
039:         * made subject to such option by the copyright holder.
040:         */
041:        package org.netbeans.jellytools.modules.javacvs;
042:
043:        import javax.swing.JTextField;
044:        import org.netbeans.jellytools.Bundle;
045:        import org.netbeans.jellytools.OptionsOperator;
046:        import org.netbeans.jellytools.WizardOperator;
047:        import org.netbeans.jemmy.operators.JButtonOperator;
048:        import org.netbeans.jemmy.operators.JCheckBoxOperator;
049:        import org.netbeans.jemmy.operators.JComboBoxOperator;
050:        import org.netbeans.jemmy.operators.JLabelOperator;
051:        import org.netbeans.jemmy.operators.JPasswordFieldOperator;
052:        import org.netbeans.jemmy.operators.JRadioButtonOperator;
053:        import org.netbeans.jemmy.operators.JTextFieldOperator;
054:
055:        /** Class implementing all necessary methods for handling "CVS Root" panel of
056:         * Checkout or Import wizard.
057:         * <br>
058:         * Usage:<br>
059:         * <pre>
060:         *      CheckoutWizardOperator.invoke();
061:         *      CVSRootStepOperator cvsRootOper = new CVSRootStepOperator();
062:         *      cvsRootOper.setPassword("password");
063:         *      cvsRootOper.setCVSRoot(":pserver:user@host:repository");
064:         *      cvsRootOper.next();
065:         *      ModuleToCheckoutStepOperator moduleOper = new ModuleToCheckoutStepOperator();
066:         *      moduleOper.setModule("module");
067:         *      moduleOper.setBranch("branch");
068:         *      moduleOper.setLocalFolder("/tmp");
069:         *      moduleOper.finish();
070:         * </pre>
071:         * @see CheckoutWizardOperator
072:         * @see ImportWizardOperator
073:         * @see EditCVSRootOperator
074:         *
075:         * @author Jiri.Skrivanek@sun.com
076:         */
077:        public class CVSRootStepOperator extends WizardOperator {
078:
079:            /** Waits for CVS Root panel. */
080:            public CVSRootStepOperator() {
081:                // It can be in either Checkout or Import Project Options wizards
082:                super ("");
083:                stepsWaitSelectedValue(Bundle
084:                        .getString(
085:                                "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
086:                                "BK0006"));
087:            }
088:
089:            private JLabelOperator _lblCVSRoot;
090:            private JComboBoxOperator _cboCVSRoot;
091:            /** :fork: item. */
092:            public static final String ITEM_FORK = ":fork:"; // NOI18N
093:            /** :local: item. */
094:            public static final String ITEM_LOCAL = ":local:"; // NOI18N
095:            private JButtonOperator _btEdit;
096:            private JLabelOperator _lblPassword;
097:            private JPasswordFieldOperator _txtPassword;
098:            private JButtonOperator _btProxyConfiguration;
099:            // for "ext" CVS root
100:            private JRadioButtonOperator _rbUseInternalSSH;
101:            private JCheckBoxOperator _cbRememberPassword;
102:            private JRadioButtonOperator _rbUseExternalShell;
103:            private JLabelOperator _lblSSHCommand;
104:            private JTextFieldOperator _txtSSHCommand;
105:
106:            //******************************
107:            // Subcomponents definition part
108:            //******************************
109:
110:            /** Tries to find "CVS Root:" JLabel in this dialog.
111:             * @return JLabelOperator
112:             */
113:            public JLabelOperator lblCVSRoot() {
114:                if (_lblCVSRoot == null) {
115:                    _lblCVSRoot = new JLabelOperator(
116:                            this ,
117:                            Bundle
118:                                    .getStringTrimmed(
119:                                            "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
120:                                            "BK0002"));
121:                }
122:                return _lblCVSRoot;
123:            }
124:
125:            /** Tries to find null JComboBox in this dialog.
126:             * @return JComboBoxOperator
127:             */
128:            public JComboBoxOperator cboCVSRoot() {
129:                if (_cboCVSRoot == null) {
130:                    _cboCVSRoot = new JComboBoxOperator(this );
131:                }
132:                return _cboCVSRoot;
133:            }
134:
135:            /** Tries to find "Edit..." JButton in this dialog.
136:             * @return JButtonOperator
137:             */
138:            public JButtonOperator btEdit() {
139:                if (_btEdit == null) {
140:                    _btEdit = new JButtonOperator(
141:                            this ,
142:                            Bundle
143:                                    .getStringTrimmed(
144:                                            "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
145:                                            "BK1105"));
146:                }
147:                return _btEdit;
148:            }
149:
150:            /** Tries to find "Password:" JLabel in this dialog.
151:             * @return JLabelOperator
152:             */
153:            public JLabelOperator lblPassword() {
154:                if (_lblPassword == null) {
155:                    _lblPassword = new JLabelOperator(
156:                            this ,
157:                            Bundle
158:                                    .getStringTrimmed(
159:                                            "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
160:                                            "BK0003"));
161:                }
162:                return _lblPassword;
163:            }
164:
165:            /** Tries to find null JPasswordField in this dialog.
166:             * @return JPasswordFieldOperator
167:             */
168:            public JPasswordFieldOperator txtPassword() {
169:                if (_txtPassword == null) {
170:                    _txtPassword = new JPasswordFieldOperator(this );
171:                }
172:                return _txtPassword;
173:            }
174:
175:            /** Tries to find "Proxy Configuration..." JButton in this dialog.
176:             * @return JButtonOperator
177:             */
178:            public JButtonOperator btProxyConfiguration() {
179:                if (_btProxyConfiguration == null) {
180:                    _btProxyConfiguration = new JButtonOperator(
181:                            this ,
182:                            Bundle
183:                                    .getStringTrimmed(
184:                                            "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
185:                                            "BK0005"));
186:                }
187:                return _btProxyConfiguration;
188:            }
189:
190:            //**********  ext CVS root ********************
191:
192:            /** Tries to find "Use Internal SSH" JRadioButton in this dialog.
193:             * @return JRadioButtonOperator
194:             */
195:            public JRadioButtonOperator rbUseInternalSSH() {
196:                if (_rbUseInternalSSH == null) {
197:                    _rbUseInternalSSH = new JRadioButtonOperator(
198:                            this ,
199:                            Bundle
200:                                    .getStringTrimmed(
201:                                            "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
202:                                            "BK1100"));
203:                }
204:                return _rbUseInternalSSH;
205:            }
206:
207:            /** Tries to find "Remember Password" JCheckBox in this dialog.
208:             * @return JCheckBoxOperator
209:             */
210:            public JCheckBoxOperator cbRememberPassword() {
211:                if (_cbRememberPassword == null) {
212:                    _cbRememberPassword = new JCheckBoxOperator(
213:                            this ,
214:                            Bundle
215:                                    .getStringTrimmed(
216:                                            "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
217:                                            "BK1012"));
218:                }
219:                return _cbRememberPassword;
220:            }
221:
222:            /** Tries to find "Use External Shell" JRadioButton in this dialog.
223:             * @return JRadioButtonOperator
224:             */
225:            public JRadioButtonOperator rbUseExternalShell() {
226:                if (_rbUseExternalShell == null) {
227:                    _rbUseExternalShell = new JRadioButtonOperator(
228:                            this ,
229:                            Bundle
230:                                    .getStringTrimmed(
231:                                            "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
232:                                            "BK1101"));
233:                }
234:                return _rbUseExternalShell;
235:            }
236:
237:            /** Tries to find "SSH Command:" JLabel in this dialog.
238:             * @return JLabelOperator
239:             */
240:            public JLabelOperator lblSSHCommand() {
241:                if (_lblSSHCommand == null) {
242:                    _lblSSHCommand = new JLabelOperator(
243:                            this ,
244:                            Bundle
245:                                    .getStringTrimmed(
246:                                            "org.netbeans.modules.versioning.system.cvss.ui.wizards.Bundle",
247:                                            "BK1013"));
248:                }
249:                return _lblSSHCommand;
250:            }
251:
252:            /** Tries to find null JTextField in this dialog.
253:             * @return JTextFieldOperator
254:             */
255:            public JTextFieldOperator txtSSHCommand() {
256:                if (_txtSSHCommand == null) {
257:                    _txtSSHCommand = new JTextFieldOperator(
258:                            (JTextField) lblSSHCommand().getLabelFor());
259:                }
260:                return _txtSSHCommand;
261:            }
262:
263:            //****************************************
264:            // Low-level functionality definition part
265:            //****************************************
266:
267:            /** returns selected item for cboCVSRoot
268:             * @return String item
269:             */
270:            public String getCVSRoot() {
271:                return cboCVSRoot().getSelectedItem().toString();
272:            }
273:
274:            /** selects item for cboCVSRoot
275:             * @param item String item
276:             */
277:            public void selectCVSRoot(String item) {
278:                cboCVSRoot().selectItem(item);
279:            }
280:
281:            /** types text for cboCVSRoot
282:             * @param text String text
283:             */
284:            public void setCVSRoot(String text) {
285:                cboCVSRoot().clearText();
286:                cboCVSRoot().typeText(text);
287:                // value typed in combo box editor is not taken into account otherwise
288:                EditCVSRootOperator editOper = edit();
289:                // confirm when enabled otherwise cancel
290:                if (editOper.btOK().isEnabled()) {
291:                    editOper.ok();
292:                } else {
293:                    editOper.cancel();
294:                }
295:            }
296:
297:            /** clicks on "Edit..." JButton and returns instance of EditCVSRootOperator.
298:             * @return instance of EditCVSRootOperator
299:             */
300:            public EditCVSRootOperator edit() {
301:                btEdit().pushNoBlock();
302:                return new EditCVSRootOperator();
303:            }
304:
305:            /** sets text for txtPassword
306:             * @param text String text
307:             */
308:            public void setPassword(String text) {
309:                txtPassword().clearText();
310:                txtPassword().typeText(text);
311:            }
312:
313:            /** clicks on "Proxy Configuration..." JButton and returns OptionsOperator.
314:             * @return instance of OptionsOperator
315:             */
316:            public OptionsOperator proxyConfiguration() {
317:                btProxyConfiguration().pushNoBlock();
318:                return new OptionsOperator();
319:            }
320:
321:            //************* for ext CVS root ***************************
322:
323:            /** clicks on "Use Internal SSH" JRadioButton
324:             */
325:            public void useInternalSSH() {
326:                rbUseInternalSSH().push();
327:            }
328:
329:            /** checks or unchecks given JCheckBox
330:             * @param state boolean requested state
331:             */
332:            public void checkRememberPassword(boolean state) {
333:                if (cbRememberPassword().isSelected() != state) {
334:                    cbRememberPassword().push();
335:                }
336:            }
337:
338:            /** clicks on "Use External Shell" JRadioButton
339:             */
340:            public void useExternalShell() {
341:                rbUseExternalShell().push();
342:            }
343:
344:            /** types text for txtSSHCommand
345:             * @param text String text
346:             */
347:            public void setSSHCommand(String text) {
348:                txtSSHCommand().clearText();
349:                txtSSHCommand().typeText(text);
350:            }
351:
352:            //*****************************************
353:            // High-level functionality definition part
354:            //*****************************************
355:
356:            /** Performs verification of Checkout by accessing all its components.
357:             */
358:            public void verify() {
359:                lblCVSRoot();
360:                cboCVSRoot();
361:                btEdit();
362:                lblPassword();
363:                txtPassword();
364:                btProxyConfiguration();
365:            }
366:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.