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


001:        /*******************************************************************************
002:         * Copyright (c) 2006 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.ui;
011:
012:        import java.util.EventObject;
013:
014:        /**
015:         * Event object describing a change to a set of Saveable objects.
016:         * 
017:         * @since 3.2
018:         */
019:        public class SaveablesLifecycleEvent extends EventObject {
020:
021:            /**
022:             * Serial version UID for this class.
023:             * <p>
024:             * Note: This class is not intended to be serialized.
025:             * </p>
026:             */
027:            private static final long serialVersionUID = -3530773637989046452L;
028:
029:            /**
030:             * Event type constant specifying that the given saveables have been opened.
031:             */
032:            public static final int POST_OPEN = 1;
033:
034:            /**
035:             * Event type constant specifying that the given saveables are about to be
036:             * closed. Listeners may veto the closing if isForce() is false.
037:             */
038:            public static final int PRE_CLOSE = 2;
039:
040:            /**
041:             * Event type constant specifying that the given saveables have been closed.
042:             */
043:            public static final int POST_CLOSE = 3;
044:
045:            /**
046:             * Event type constant specifying that the dirty state of the given saveables
047:             * has changed.
048:             */
049:            public static final int DIRTY_CHANGED = 4;
050:
051:            private int eventType;
052:
053:            private Saveable[] saveables;
054:
055:            private boolean force;
056:
057:            private boolean veto = false;
058:
059:            /**
060:             * Creates a new SaveablesLifecycleEvent.
061:             * 
062:             * @param source
063:             *            The source of the event. If an ISaveablesSource notifies
064:             *            about changes to the saveables returned by
065:             *            {@link ISaveablesSource#getSaveables()}, the source must be
066:             *            the ISaveablesSource object.
067:             * @param eventType
068:             *            the event type, currently one of POST_OPEN, PRE_CLOSE,
069:             *            POST_CLOSE, DIRTY_CHANGED
070:             * @param saveables
071:             *            The affected saveables
072:             * @param force
073:             *            true if the event type is PRE_CLOSE and this is a closed force
074:             *            that cannot be canceled.
075:             */
076:            public SaveablesLifecycleEvent(Object source, int eventType,
077:                    Saveable[] saveables, boolean force) {
078:                super (source);
079:                this .eventType = eventType;
080:                this .saveables = saveables;
081:                this .force = force;
082:            }
083:
084:            /**
085:             * Returns the eventType, currently one of POST_OPEN, PRE_CLOSE, POST_CLOSE,
086:             * DIRTY_CHANGED. Listeners should silently ignore unknown event types since
087:             * new event types might be added in the future.
088:             * 
089:             * @return the eventType
090:             */
091:            public int getEventType() {
092:                return eventType;
093:            }
094:
095:            /**
096:             * Returns the affected saveables.
097:             * 
098:             * @return the saveables
099:             */
100:            public Saveable[] getSaveables() {
101:                return saveables;
102:            }
103:
104:            /**
105:             * Returns the veto. This value is ignored for POST_OPEN,POST_CLOSE, and
106:             * DIRTY_CHANGED.
107:             * 
108:             * @return Returns the veto.
109:             */
110:            public boolean isVeto() {
111:                return veto;
112:            }
113:
114:            /**
115:             * @param veto
116:             *            The veto to set.
117:             */
118:            public void setVeto(boolean veto) {
119:                this .veto = veto;
120:            }
121:
122:            /**
123:             * Sets the force flag. This value is ignored for POST_OPEN, POST_CLOSE, and
124:             * DIRTY_CHANGED.
125:             * 
126:             * @return Returns the force.
127:             */
128:            public boolean isForce() {
129:                return force;
130:            }
131:
132:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.