Source Code Cross Referenced for KeyStrokes.java in  » Testing » jakarta-jmeter » org » apache » jmeter » 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 » Testing » jakarta jmeter » org.apache.jmeter.gui.action 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *   http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         * 
017:         */
018:
019:        package org.apache.jmeter.gui.action;
020:
021:        import java.awt.event.KeyEvent;
022:
023:        import javax.swing.KeyStroke;
024:
025:        /*
026:         * Collect all the keystrokes together in one place.
027:         * This helps to ensure that there are no duplicates.
028:         */
029:        public final class KeyStrokes {
030:            // Prevent instantiation
031:            private KeyStrokes() {
032:            }
033:
034:            public static final KeyStroke CUT = KeyStroke.getKeyStroke(
035:                    KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK);
036:            public static final KeyStroke COPY = KeyStroke.getKeyStroke(
037:                    KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK);
038:            public static final KeyStroke PASTE = KeyStroke.getKeyStroke(
039:                    KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK);
040:            public static final KeyStroke REMOVE = KeyStroke.getKeyStroke(
041:                    KeyEvent.VK_DELETE, 0);
042:            public static final KeyStroke SAVE_GRAPHICS = KeyStroke
043:                    .getKeyStroke(KeyEvent.VK_G, KeyEvent.CTRL_DOWN_MASK);
044:            public static final KeyStroke SAVE_GRAPHICS_ALL = KeyStroke
045:                    .getKeyStroke(KeyEvent.VK_G, KeyEvent.CTRL_DOWN_MASK
046:                            | KeyEvent.SHIFT_DOWN_MASK);
047:            public static final KeyStroke HELP = KeyStroke.getKeyStroke(
048:                    KeyEvent.VK_H, KeyEvent.CTRL_DOWN_MASK);
049:            public static final KeyStroke WHAT_CLASS = KeyStroke.getKeyStroke(
050:                    KeyEvent.VK_W, KeyEvent.CTRL_DOWN_MASK);
051:            public static final KeyStroke DEBUG_ON = KeyStroke.getKeyStroke(
052:                    KeyEvent.VK_D, KeyEvent.CTRL_DOWN_MASK
053:                            | KeyEvent.SHIFT_DOWN_MASK);
054:            public static final KeyStroke DEBUG_OFF = KeyStroke.getKeyStroke(
055:                    KeyEvent.VK_D, KeyEvent.CTRL_DOWN_MASK);
056:            public static final KeyStroke FUNCTIONS = KeyStroke.getKeyStroke(
057:                    KeyEvent.VK_F, KeyEvent.CTRL_DOWN_MASK);
058:            public static final KeyStroke SSL_MANAGER = KeyStroke.getKeyStroke(
059:                    KeyEvent.VK_M, KeyEvent.CTRL_DOWN_MASK);
060:            public static final KeyStroke ACTION_START = KeyStroke
061:                    .getKeyStroke(KeyEvent.VK_R, KeyEvent.CTRL_DOWN_MASK);
062:            public static final KeyStroke ACTION_STOP = KeyStroke.getKeyStroke(
063:                    KeyEvent.VK_PERIOD, KeyEvent.CTRL_DOWN_MASK);
064:            public static final KeyStroke ACTION_SHUTDOWN = KeyStroke
065:                    .getKeyStroke(KeyEvent.VK_COMMA, KeyEvent.CTRL_DOWN_MASK);
066:            public static final KeyStroke CLEAR = KeyStroke.getKeyStroke(
067:                    KeyEvent.VK_E, KeyEvent.CTRL_DOWN_MASK
068:                            | KeyEvent.SHIFT_DOWN_MASK);
069:            public static final KeyStroke CLEAR_ALL = KeyStroke.getKeyStroke(
070:                    KeyEvent.VK_E, KeyEvent.CTRL_DOWN_MASK);
071:            public static final KeyStroke REMOTE_START_ALL = KeyStroke
072:                    .getKeyStroke(KeyEvent.VK_R, KeyEvent.CTRL_DOWN_MASK
073:                            | KeyEvent.SHIFT_DOWN_MASK);
074:            public static final KeyStroke REMOTE_STOP_ALL = KeyStroke
075:                    .getKeyStroke(KeyEvent.VK_X, KeyEvent.ALT_DOWN_MASK);
076:            public static final KeyStroke SAVE = KeyStroke.getKeyStroke(
077:                    KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK);
078:            public static final KeyStroke SAVE_ALL_AS = KeyStroke.getKeyStroke(
079:                    KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK
080:                            | KeyEvent.SHIFT_DOWN_MASK);
081:            public static final KeyStroke OPEN = KeyStroke.getKeyStroke(
082:                    KeyEvent.VK_O, KeyEvent.CTRL_DOWN_MASK);
083:            public static final KeyStroke CLOSE = KeyStroke.getKeyStroke(
084:                    KeyEvent.VK_L, KeyEvent.CTRL_DOWN_MASK);
085:            public static final KeyStroke EXIT = KeyStroke.getKeyStroke(
086:                    KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK);
087:            public static final KeyStroke COLLAPSE_ALL = KeyStroke
088:                    .getKeyStroke(KeyEvent.VK_MINUS, KeyEvent.CTRL_DOWN_MASK);
089:            // VK_PLUS + CTRL_DOWN_MASK did not work...
090:            public static final KeyStroke EXPAND_ALL = KeyStroke.getKeyStroke(
091:                    KeyEvent.VK_MINUS, KeyEvent.CTRL_DOWN_MASK
092:                            | KeyEvent.SHIFT_DOWN_MASK);
093:
094:            /**
095:             * Check if an event matches the KeyStroke definition.
096:             * 
097:             * @param e event
098:             * @param k keystroke
099:             * @return true if event matches the keystroke definition
100:             */
101:            public static boolean matches(KeyEvent e, KeyStroke k) {
102:                final int modifiersEx = e.getModifiersEx() | e.getModifiers();// Hack to get full modifier value
103:                return e.getKeyCode() == k.getKeyCode()
104:                        && modifiersEx == k.getModifiers();
105:            }
106:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.