Source Code Cross Referenced for ColumnViewerEditorActivationEvent.java in  » IDE-Eclipse » jface » org » eclipse » jface » viewers » 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 Eclipse » jface » org.eclipse.jface.viewers 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2007 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         ******************************************************************************/package org.eclipse.jface.viewers;
011:
012:        import java.util.EventObject;
013:
014:        import org.eclipse.swt.events.KeyEvent;
015:        import org.eclipse.swt.events.MouseEvent;
016:        import org.eclipse.swt.events.TraverseEvent;
017:
018:        /**
019:         * This event is passed on when a cell-editor is going to be activated
020:         * 
021:         * @since 3.3
022:         * 
023:         */
024:        public class ColumnViewerEditorActivationEvent extends EventObject {
025:            /**
026:             * 
027:             */
028:            private static final long serialVersionUID = 1L;
029:
030:            /**
031:             * if a key is pressed on a selected cell
032:             */
033:            public static final int KEY_PRESSED = 1;
034:
035:            /**
036:             * if a cell is selected using a single click of the mouse
037:             */
038:            public static final int MOUSE_CLICK_SELECTION = 2;
039:
040:            /**
041:             * if a cell is selected using double clicking of the mouse
042:             */
043:            public static final int MOUSE_DOUBLE_CLICK_SELECTION = 3;
044:
045:            /**
046:             * if a cell is activated using code like e.g
047:             * {@link ColumnViewer#editElement(Object, int)}
048:             */
049:            public static final int PROGRAMMATIC = 4;
050:
051:            /**
052:             * is a cell is activated by traversing
053:             */
054:            public static final int TRAVERSAL = 5;
055:
056:            /**
057:             * the original event triggered
058:             */
059:            public EventObject sourceEvent;
060:
061:            /**
062:             * The time the event is triggered
063:             */
064:            public int time;
065:
066:            /**
067:             * The event type triggered:
068:             * <ul>
069:             * <li>{@link #KEY_PRESSED} if a key is pressed on a selected cell</li>
070:             * <li>{@link #MOUSE_CLICK_SELECTION} if a cell is selected using a single
071:             * click of the mouse</li>
072:             * <li>{@link #MOUSE_DOUBLE_CLICK_SELECTION} if a cell is selected using
073:             * double clicking of the mouse</li>
074:             * </ul>
075:             */
076:            public int eventType;
077:
078:            /**
079:             * <b>Only set for {@link #KEY_PRESSED}</b>
080:             */
081:            public int keyCode;
082:
083:            /**
084:             * <b>Only set for {@link #KEY_PRESSED}</b>
085:             */
086:            public char character;
087:
088:            /**
089:             * The statemask
090:             */
091:            public int stateMask;
092:
093:            /**
094:             * Cancel the event (=> editor is not activated)
095:             */
096:            public boolean cancel = false;
097:
098:            /**
099:             * This constructor can be used when no event exists. The type set is
100:             * {@link #PROGRAMMATIC}
101:             * 
102:             * @param cell
103:             *            the cell
104:             */
105:            public ColumnViewerEditorActivationEvent(ViewerCell cell) {
106:                super (cell);
107:                eventType = PROGRAMMATIC;
108:            }
109:
110:            /**
111:             * This constructor is used for all types of mouse events. Currently the
112:             * type is can be {@link #MOUSE_CLICK_SELECTION} and
113:             * {@link #MOUSE_DOUBLE_CLICK_SELECTION}
114:             * 
115:             * @param cell
116:             *            the cell source of the event
117:             * @param event
118:             *            the event
119:             */
120:            public ColumnViewerEditorActivationEvent(ViewerCell cell,
121:                    MouseEvent event) {
122:                super (cell);
123:
124:                if (event.count >= 2) {
125:                    eventType = MOUSE_DOUBLE_CLICK_SELECTION;
126:                } else {
127:                    eventType = MOUSE_CLICK_SELECTION;
128:                }
129:
130:                this .sourceEvent = event;
131:                this .time = event.time;
132:            }
133:
134:            /**
135:             * @param cell
136:             *            the cell source of the event
137:             * @param event
138:             *            the event
139:             */
140:            public ColumnViewerEditorActivationEvent(ViewerCell cell,
141:                    KeyEvent event) {
142:                super (cell);
143:                this .eventType = KEY_PRESSED;
144:                this .sourceEvent = event;
145:                this .time = 0;
146:                this .keyCode = event.keyCode;
147:                this .character = event.character;
148:                this .stateMask = event.stateMask;
149:            }
150:
151:            /**
152:             * This constructor is used to mark the activation triggered by a traversal
153:             * 
154:             * @param cell
155:             *            the cell source of the event
156:             * @param event
157:             *            the event
158:             */
159:            public ColumnViewerEditorActivationEvent(ViewerCell cell,
160:                    TraverseEvent event) {
161:                super(cell);
162:                this.eventType = TRAVERSAL;
163:                this.sourceEvent = event;
164:            }
165:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.