Source Code Cross Referenced for CopyToOperator.java in  » IDE-Netbeans » subversion » org » netbeans » test » subversion » operators » 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 » subversion » org.netbeans.test.subversion.operators 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * CopyToOperator.java
003:         *
004:         * Created on 16/05/06 11:11
005:         */
006:        package org.netbeans.test.subversion.operators;
007:
008:        import org.netbeans.jellytools.NbDialogOperator;
009:        import org.netbeans.jellytools.nodes.Node;
010:        import org.netbeans.jemmy.operators.*;
011:        import org.netbeans.test.subversion.operators.actions.CopyAction;
012:
013:        /** Class implementing all necessary methods for handling "Copy to..." NbDialog.
014:         *
015:         * @author peter
016:         * @version 1.0
017:         */
018:        public class CopyToOperator extends NbDialogOperator {
019:
020:            /**
021:             * Creates new CopyToOperator that can handle it.
022:             */
023:            public CopyToOperator() {
024:                super ("Copy");
025:            }
026:
027:            /** Selects nodes and call copy action on them.
028:             * @param nodes an array of nodes
029:             * @return CopyToOperator instance
030:             */
031:            public static CopyToOperator invoke(Node[] nodes) {
032:                new CopyAction().perform(nodes);
033:                return new CopyToOperator();
034:            }
035:
036:            /** Selects node and call copy action on it.
037:             * @param node node to be selected
038:             * @return CommitOperator instance
039:             */
040:            public static CopyToOperator invoke(Node node) {
041:                return invoke(new Node[] { node });
042:            }
043:
044:            private JTextAreaOperator _txtJTextArea;
045:            private JRadioButtonOperator _rbLocalFolder;
046:            private JRadioButtonOperator _rbRemoteFolder;
047:            private JLabelOperator _lblDescribeTheCopyPurpose;
048:            private JLabelOperator _lblRepositoryFolder;
049:            private JComboBoxOperator _cboJComboBox;
050:            private JButtonOperator _btBrowse;
051:            private JCheckBoxOperator _cbSwitchToCopy;
052:            private JCheckBoxOperator _cbSkip;
053:            private JLabelOperator _lblWarningMessage;
054:            private JButtonOperator _btCopy;
055:            private JButtonOperator _btCancel;
056:            private JButtonOperator _btHelp;
057:
058:            //******************************
059:            // Subcomponents definition part
060:            //******************************
061:
062:            /** Tries to find null JTextArea in this dialog.
063:             * @return JTextAreaOperator
064:             */
065:            public JTextAreaOperator txtJTextArea() {
066:                if (_txtJTextArea == null) {
067:                    _txtJTextArea = new JTextAreaOperator(this );
068:                }
069:                return _txtJTextArea;
070:            }
071:
072:            /** Tries to find "Describe the copy purpose:" JLabel in this dialog.
073:             * @return JLabelOperator
074:             */
075:            public JLabelOperator lblDescribeTheCopyPurpose() {
076:                if (_lblDescribeTheCopyPurpose == null) {
077:                    _lblDescribeTheCopyPurpose = new JLabelOperator(this ,
078:                            "Copy Description");
079:                }
080:                return _lblDescribeTheCopyPurpose;
081:            }
082:
083:            /** Tries to find "Repository Folder:" JLabel in this dialog.
084:             * @return JLabelOperator
085:             */
086:            public JRadioButtonOperator rbLocalFolder() {
087:                if (_rbLocalFolder == null) {
088:                    _rbLocalFolder = new JRadioButtonOperator(this ,
089:                            "Local Folder");
090:                }
091:                return _rbLocalFolder;
092:            }
093:
094:            public JRadioButtonOperator rbRemoteFolder() {
095:                if (_rbRemoteFolder == null) {
096:                    _rbRemoteFolder = new JRadioButtonOperator(this ,
097:                            "Remote Folder");
098:                }
099:                return _rbRemoteFolder;
100:            }
101:
102:            /** Tries to find null JComboBox in this dialog.
103:             * @return JComboBoxOperator
104:             */
105:            public JComboBoxOperator cboJComboBox() {
106:                if (_cboJComboBox == null) {
107:                    _cboJComboBox = new JComboBoxOperator(this );
108:                }
109:                return _cboJComboBox;
110:            }
111:
112:            /** Tries to find "Browse..." JButton in this dialog.
113:             * @return JButtonOperator
114:             */
115:            public JButtonOperator btBrowse() {
116:                if (_btBrowse == null) {
117:                    _btBrowse = new JButtonOperator(this , "Browse...");
118:                }
119:                return _btBrowse;
120:            }
121:
122:            /** Tries to find "Switch to Copy" JCheckBox in this dialog.
123:             * @return JCheckBoxOperator
124:             */
125:            public JCheckBoxOperator cbSwitchToCopy() {
126:                if (_cbSwitchToCopy == null) {
127:                    _cbSwitchToCopy = new JCheckBoxOperator(this ,
128:                            "Switch to Copy");
129:                }
130:                return _cbSwitchToCopy;
131:            }
132:
133:            /** Tries to find "Skip" JCheckBox in this dialog.
134:             * @return JCheckBoxOperator
135:             */
136:            public JCheckBoxOperator cbSkip() {
137:                if (_cbSkip == null) {
138:                    _cbSkip = new JCheckBoxOperator(this , "Skip");
139:                }
140:                return _cbSkip;
141:            }
142:
143:            /** Tries to find "Warning - there are localy modified files!" JLabel in this dialog.
144:             * @return JLabelOperator
145:             */
146:            public JLabelOperator lblWarningMessage() {
147:                if (_lblWarningMessage == null) {
148:                    _lblWarningMessage = new JLabelOperator(this , 2);
149:                }
150:                return _lblWarningMessage;
151:            }
152:
153:            /** Tries to find "Copy" JButton in this dialog.
154:             * @return JButtonOperator
155:             */
156:            public JButtonOperator btCopy() {
157:                if (_btCopy == null) {
158:                    _btCopy = new JButtonOperator(this , "Copy");
159:                }
160:                return _btCopy;
161:            }
162:
163:            /** Tries to find "Cancel" JButton in this dialog.
164:             * @return JButtonOperator
165:             */
166:            public JButtonOperator btCancel() {
167:                if (_btCancel == null) {
168:                    _btCancel = new JButtonOperator(this , "Cancel");
169:                }
170:                return _btCancel;
171:            }
172:
173:            /** Tries to find "Help" JButton in this dialog.
174:             * @return JButtonOperator
175:             */
176:            public JButtonOperator btHelp() {
177:                if (_btHelp == null) {
178:                    _btHelp = new JButtonOperator(this , "Help");
179:                }
180:                return _btHelp;
181:            }
182:
183:            //****************************************
184:            // Low-level functionality definition part
185:            //****************************************
186:
187:            /** gets text for txtJTextArea
188:             * @return String text
189:             */
190:            public String getCopyPurpose() {
191:                return txtJTextArea().getText();
192:            }
193:
194:            /** sets text for txtJTextArea
195:             * @param text String text
196:             */
197:            public void setCopyPurpose(String text) {
198:                txtJTextArea().clearText();
199:                txtJTextArea().typeText(text);
200:            }
201:
202:            /** returns selected item for cboJComboBox
203:             * @return String item
204:             */
205:            public String getSelectedRepositoryFolder() {
206:                return cboJComboBox().getSelectedItem().toString();
207:            }
208:
209:            public String getRepositoryFolder() {
210:                return cboJComboBox().getEditor().getItem().toString();
211:            }
212:
213:            /** selects item for cboJComboBox
214:             * @param item String item
215:             */
216:            public void selectJComboBox(String item) {
217:                cboJComboBox().selectItem(item);
218:            }
219:
220:            /** types text for cboJComboBox
221:             * @param text String text
222:             */
223:            public void setRepositoryFolder(String text) {
224:                cboJComboBox().clearText();
225:                cboJComboBox().typeText(text);
226:            }
227:
228:            /** clicks on "Browse..." JButton
229:             */
230:            public RepositoryBrowserImpOperator browseRepository() {
231:                btBrowse().pushNoBlock();
232:                return new RepositoryBrowserImpOperator();
233:            }
234:
235:            /** checks or unchecks given JCheckBox
236:             * @param state boolean requested state
237:             */
238:            public void checkSwitchToCopy(boolean state) {
239:                if (cbSwitchToCopy().isSelected() != state) {
240:                    cbSwitchToCopy().push();
241:                }
242:            }
243:
244:            /** clicks on "Copy" JButton
245:             */
246:            public void copy() {
247:                btCopy().push();
248:            }
249:
250:            /** clicks on "Cancel" JButton
251:             */
252:            public void cancel() {
253:                btCancel().push();
254:            }
255:
256:            /** clicks on "Help" JButton
257:             */
258:            public void help() {
259:                btHelp().push();
260:            }
261:
262:            //*****************************************
263:            // High-level functionality definition part
264:            //*****************************************
265:
266:            /**
267:             * Performs verification of CopyToOperator by accessing all its components.
268:             */
269:            public void verify() {
270:                txtJTextArea();
271:                lblDescribeTheCopyPurpose();
272:                rbLocalFolder();
273:                rbRemoteFolder();
274:                cboJComboBox();
275:                btBrowse();
276:                cbSwitchToCopy();
277:                cbSkip();
278:                btCopy();
279:                btCancel();
280:                btHelp();
281:            }
282:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.