Source Code Cross Referenced for PageUpPageDownScriptingEditor.java in  » IDE-Netbeans » performance » gui » action » 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 » performance » gui.action 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * To change this template, choose Tools | Templates
003:         * and open the template in the editor.
004:         */
005:
006:        package gui.action;
007:
008:        import gui.Projects;
009:        import java.awt.event.KeyEvent;
010:        import org.netbeans.jellytools.EditorOperator;
011:        import org.netbeans.jellytools.EditorWindowOperator;
012:        import org.netbeans.jellytools.ProjectsTabOperator;
013:        import org.netbeans.jellytools.actions.Action.Shortcut;
014:        import org.netbeans.jellytools.actions.ActionNoBlock;
015:        import org.netbeans.jellytools.actions.OpenAction;
016:        import org.netbeans.jellytools.nodes.Node;
017:        import org.netbeans.jemmy.operators.ComponentOperator;
018:        import org.netbeans.performance.test.guitracker.LoggingRepaintManager;
019:
020:        /**
021:         *
022:         * @author Administrator
023:         */
024:        public class PageUpPageDownScriptingEditor extends
025:                org.netbeans.performance.test.utilities.PerformanceTestCase {
026:
027:            private boolean pgup;
028:            private EditorOperator editorOperator;
029:            protected static ProjectsTabOperator projectsTab = null;
030:
031:            protected Node fileToBeOpened;
032:            protected String testProject;
033:            protected String fileName;
034:            protected String nodePath;
035:
036:            public PageUpPageDownScriptingEditor(String testName) {
037:                super (testName);
038:                expectedTime = UI_RESPONSE;
039:                WAIT_AFTER_OPEN = 200;
040:            }
041:
042:            public PageUpPageDownScriptingEditor(String testName,
043:                    String performanceDataName) {
044:                super (testName, performanceDataName);
045:                expectedTime = UI_RESPONSE;
046:                WAIT_AFTER_OPEN = 200;
047:            }
048:
049:            @Override
050:            public void initialize() {
051:                EditorOperator.closeDiscardAll();
052:
053:                String path = nodePath + "|" + fileName;
054:                fileToBeOpened = new Node(getProjectNode(testProject), path);
055:                new OpenAction().performAPI(fileToBeOpened);
056:                editorOperator = EditorWindowOperator.getEditor(fileName);
057:                waitNoEvent(2000);
058:
059:                repaintManager().addRegionFilter(
060:                        LoggingRepaintManager.EDITOR_FILTER);
061:                setJavaEditorCaretFilteringOn(); //????
062:                ///setEditorCaretFilteringOn(arg0);   //Which classes I can use???
063:
064:            }
065:
066:            protected Node getProjectNode(String projectName) {
067:                if (projectsTab == null)
068:                    projectsTab = new ProjectsTabOperator();
069:
070:                return projectsTab.getProjectRootNode(projectName);
071:            }
072:
073:            @Override
074:            public void prepare() {
075:                // scroll to the place where we start
076:                if (pgup)
077:                    // press CTRL+END
078:                    new ActionNoBlock(null, null, new Shortcut(KeyEvent.VK_END,
079:                            KeyEvent.CTRL_MASK)).perform(editorOperator);
080:                else
081:                    // go to the first line
082:                    editorOperator.setCaretPositionToLine(1);
083:            }
084:
085:            @Override
086:            public ComponentOperator open() {
087:                if (pgup)
088:                    new ActionNoBlock(null, null, new Shortcut(
089:                            KeyEvent.VK_PAGE_UP)).perform(editorOperator);
090:                else
091:                    new ActionNoBlock(null, null, new Shortcut(
092:                            KeyEvent.VK_PAGE_DOWN)).perform(editorOperator);
093:                return null;
094:            }
095:
096:            @Override
097:            public void close() {
098:                log("close");
099:            }
100:
101:            @Override
102:            public void shutdown() {
103:                log("shutdown");
104:                super .shutdown();
105:                repaintManager().resetRegionFilters();
106:                EditorOperator.closeDiscardAll();
107:            }
108:
109:            public void testPgUp_In_RBEditor() {
110:                testProject = Projects.RUBY_PROJECT;
111:                fileName = "ruby20kb.rb";
112:                nodePath = "Source Files";
113:                pgup = true;
114:                doMeasurement();
115:            }
116:
117:            public void testPgDn_In_RBEditor() {
118:                testProject = Projects.RUBY_PROJECT;
119:                fileName = "ruby20kb.rb";
120:                nodePath = "Source Files";
121:                pgup = false;
122:                doMeasurement();
123:            }
124:
125:            public void testPgUp_In_RHTMLEditor() {
126:                testProject = Projects.RAILS_PROJECT;
127:                fileName = "rhtml20kb.rhtml";
128:                nodePath = "Views";
129:                pgup = true;
130:                doMeasurement();
131:            }
132:
133:            public void testPgDn_In_RHTMLEditor() {
134:                testProject = Projects.RAILS_PROJECT;
135:                fileName = "rhtml20kb.rhtml";
136:                nodePath = "Views";
137:                pgup = false;
138:                doMeasurement();
139:            }
140:
141:            public void testPgUp_In_JSEditor() {
142:                testProject = Projects.SCRIPTING_PROJECT;
143:                nodePath = "Web Pages";
144:                fileName = "javascript20kb.js";
145:                pgup = true;
146:                doMeasurement();
147:            }
148:
149:            public void testPgDn_In_JSEditor() {
150:                testProject = Projects.SCRIPTING_PROJECT;
151:                nodePath = "Web Pages";
152:                fileName = "javascript20kb.js";
153:                pgup = false;
154:                doMeasurement();
155:            }
156:
157:            public void testPgUp_In_CSSEditor() {
158:                testProject = Projects.SCRIPTING_PROJECT;
159:                nodePath = "Web Pages";
160:                fileName = "css20kb.css";
161:                pgup = true;
162:                doMeasurement();
163:            }
164:
165:            public void testPgDn_In_CSSEditor() {
166:                testProject = Projects.SCRIPTING_PROJECT;
167:                nodePath = "Web Pages";
168:                fileName = "css20kb.css";
169:                pgup = false;
170:                doMeasurement();
171:            }
172:
173:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.