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


001:        /*******************************************************************************
002:         * Copyright (c) 2000, 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.activities;
011:
012:        import java.util.Set;
013:
014:        import org.eclipse.ui.internal.util.Util;
015:
016:        /**
017:         * An instance of this class describes changes to an instance of 
018:         * <code>IActivityManager</code>.  This class does not give details as to the 
019:         * specifics of a change, only that the given property on the source object has 
020:         * changed.
021:         * 
022:         * <p>
023:         * This class is not intended to be extended by clients.
024:         * </p>
025:         * 
026:         * @since 3.0
027:         * @see IActivityManagerListener#activityManagerChanged(ActivityManagerEvent)
028:         */
029:        public final class ActivityManagerEvent {
030:            private IActivityManager activityManager;
031:
032:            private boolean definedActivityIdsChanged;
033:
034:            private boolean definedCategoryIdsChanged;
035:
036:            private boolean enabledActivityIdsChanged;
037:
038:            /**
039:             * The set of activity identifiers (strings) that were defined before the
040:             * change occurred. If the defined activities did not changed, then this
041:             * value is <code>null</code>.
042:             */
043:            private final Set previouslyDefinedActivityIds;
044:
045:            /**
046:             * The set of category identifiers (strings) that were defined before the
047:             * change occurred. If the defined category did not changed, then this value
048:             * is <code>null</code>.
049:             */
050:            private final Set previouslyDefinedCategoryIds;
051:
052:            /**
053:             * The set of activity identifiers (strings) that were enabled before the
054:             * change occurred. If the enabled activities did not changed, then this
055:             * value is <code>null</code>.
056:             */
057:            private final Set previouslyEnabledActivityIds;
058:
059:            /**
060:             * Creates a new instance of this class.
061:             * 
062:             * @param activityManager
063:             *            the instance of the interface that changed.
064:             * @param definedActivityIdsChanged
065:             *            <code>true</code>, iff the definedActivityIds property
066:             *            changed.
067:             * @param definedCategoryIdsChanged
068:             *            <code>true</code>, iff the definedCategoryIds property
069:             *            changed.
070:             * @param enabledActivityIdsChanged
071:             *            <code>true</code>, iff the enabledActivityIds property
072:             *            changed.
073:             * @param previouslyDefinedActivityIds
074:             *            the set of identifiers to previously defined activities. This
075:             *            set may be empty. If this set is not empty, it must only
076:             *            contain instances of <code>String</code>. This set must be
077:             *            <code>null</code> if definedActivityIdsChanged is
078:             *            <code>false</code> and must not be null if
079:             *            definedActivityIdsChanged is <code>true</code>.
080:             * @param previouslyDefinedCategoryIds
081:             *            the set of identifiers to previously defined category. This
082:             *            set may be empty. If this set is not empty, it must only
083:             *            contain instances of <code>String</code>. This set must be
084:             *            <code>null</code> if definedCategoryIdsChanged is
085:             *            <code>false</code> and must not be null if
086:             *            definedCategoryIdsChanged is <code>true</code>.
087:             * @param previouslyEnabledActivityIds
088:             *            the set of identifiers to previously enabled activities. This
089:             *            set may be empty. If this set is not empty, it must only
090:             *            contain instances of <code>String</code>. This set must be
091:             *            <code>null</code> if enabledActivityIdsChanged is
092:             *            <code>false</code> and must not be null if
093:             *            enabledActivityIdsChanged is <code>true</code>.
094:             */
095:            public ActivityManagerEvent(IActivityManager activityManager,
096:                    boolean definedActivityIdsChanged,
097:                    boolean definedCategoryIdsChanged,
098:                    boolean enabledActivityIdsChanged,
099:                    final Set previouslyDefinedActivityIds,
100:                    final Set previouslyDefinedCategoryIds,
101:                    final Set previouslyEnabledActivityIds) {
102:                if (activityManager == null) {
103:                    throw new NullPointerException();
104:                }
105:
106:                if (!definedActivityIdsChanged
107:                        && previouslyDefinedActivityIds != null) {
108:                    throw new IllegalArgumentException();
109:                }
110:
111:                if (!definedCategoryIdsChanged
112:                        && previouslyDefinedCategoryIds != null) {
113:                    throw new IllegalArgumentException();
114:                }
115:
116:                if (!enabledActivityIdsChanged
117:                        && previouslyEnabledActivityIds != null) {
118:                    throw new IllegalArgumentException();
119:                }
120:
121:                if (definedActivityIdsChanged) {
122:                    this .previouslyDefinedActivityIds = Util.safeCopy(
123:                            previouslyDefinedActivityIds, String.class);
124:                } else {
125:                    this .previouslyDefinedActivityIds = null;
126:                }
127:
128:                if (definedCategoryIdsChanged) {
129:                    this .previouslyDefinedCategoryIds = Util.safeCopy(
130:                            previouslyDefinedCategoryIds, String.class);
131:                } else {
132:                    this .previouslyDefinedCategoryIds = null;
133:                }
134:
135:                if (enabledActivityIdsChanged) {
136:                    this .previouslyEnabledActivityIds = Util.safeCopy(
137:                            previouslyEnabledActivityIds, String.class);
138:                } else {
139:                    this .previouslyEnabledActivityIds = null;
140:                }
141:
142:                this .activityManager = activityManager;
143:                this .definedActivityIdsChanged = definedActivityIdsChanged;
144:                this .definedCategoryIdsChanged = definedCategoryIdsChanged;
145:                this .enabledActivityIdsChanged = enabledActivityIdsChanged;
146:            }
147:
148:            /**
149:             * Returns the instance of the interface that changed.
150:             * 
151:             * @return the instance of the interface that changed. Guaranteed not to be
152:             *         <code>null</code>.
153:             */
154:            public IActivityManager getActivityManager() {
155:                return activityManager;
156:            }
157:
158:            /**
159:             * Returns the activity identifiers that were previously defined.
160:             * 
161:             * @return The set of defined activity identifiers before the changed; may
162:             *         be empty, but never <code>null</code>. This set will only
163:             *         contain strings.
164:             */
165:            public final Set getPreviouslyDefinedActivityIds() {
166:                return previouslyDefinedActivityIds;
167:            }
168:
169:            /**
170:             * Returns the category identifiers that were previously defined.
171:             * 
172:             * @return The set of defined category identifiers before the changed; may
173:             *         be empty, but never <code>null</code>. This set will only
174:             *         contain strings.
175:             */
176:            public final Set getPreviouslyDefinedCategoryIds() {
177:                return previouslyDefinedCategoryIds;
178:            }
179:
180:            /**
181:             * Returns the activity identifiers that were previously enabled.
182:             * 
183:             * @return The set of enabled activity identifiers before the changed; may
184:             *         be empty, but never <code>null</code>. This set will only
185:             *         contain strings.
186:             */
187:            public final Set getPreviouslyEnabledActivityIds() {
188:                return previouslyEnabledActivityIds;
189:            }
190:
191:            /**
192:             * Returns whether or not the definedActivityIds property changed.
193:             * 
194:             * @return <code>true</code>, iff the definedActivityIds property changed.
195:             */
196:            public boolean haveDefinedActivityIdsChanged() {
197:                return definedActivityIdsChanged;
198:            }
199:
200:            /**
201:             * Returns whether or not the definedCategoryIds property changed.
202:             * 
203:             * @return <code>true</code>, iff the definedCategoryIds property changed.
204:             */
205:            public boolean haveDefinedCategoryIdsChanged() {
206:                return definedCategoryIdsChanged;
207:            }
208:
209:            /**
210:             * Returns whether or not the enabledActivityIds property changed.
211:             * 
212:             * @return <code>true</code>, iff the enabledActivityIds property changed.
213:             */
214:            public boolean haveEnabledActivityIdsChanged() {
215:                return enabledActivityIdsChanged;
216:            }
217:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.