Source Code Cross Referenced for RenderItemProviderAdapterFactory.java in  » GIS » udig-1.1 » net » refractions » udig » project » internal » render » provider » 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 » GIS » udig 1.1 » net.refractions.udig.project.internal.render.provider 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * <copyright>
003:         * </copyright>
004:         *
005:         * $Id: RenderItemProviderAdapterFactory.java 21423 2006-09-14 19:17:05Z jeichar $
006:         */package net.refractions.udig.project.internal.render.provider;
007:
008:        import java.util.ArrayList;
009:        import java.util.Collection;
010:
011:        import net.refractions.udig.project.internal.render.util.RenderAdapterFactory;
012:
013:        import org.eclipse.emf.common.notify.Adapter;
014:        import org.eclipse.emf.common.notify.Notification;
015:        import org.eclipse.emf.common.notify.Notifier;
016:        import org.eclipse.emf.edit.provider.ChangeNotifier;
017:        import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
018:        import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
019:        import org.eclipse.emf.edit.provider.IChangeNotifier;
020:        import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
021:        import org.eclipse.emf.edit.provider.IItemLabelProvider;
022:        import org.eclipse.emf.edit.provider.IItemPropertySource;
023:        import org.eclipse.emf.edit.provider.INotifyChangedListener;
024:        import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
025:        import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
026:
027:        /**
028:         * This is the factory that is used to provide the interfaces needed to support Viewers. The
029:         * adapters generated by this factory convert EMF adapter notifications into calls to
030:         * {@link #fireNotifyChanged fireNotifyChanged}. The adapters also support Eclipse property sheets.
031:         * Note that most of the adapters are shared among multiple instances. <!-- begin-user-doc --> <!--
032:         * end-user-doc -->
033:         * 
034:         * @generated
035:         */
036:        public class RenderItemProviderAdapterFactory extends
037:                RenderAdapterFactory implements  ComposeableAdapterFactory,
038:                IChangeNotifier {
039:            /**
040:             * <!-- begin-user-doc --> <!-- end-user-doc -->
041:             * 
042:             * @generated
043:             */
044:            public static final String copyright = "uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004, Refractions Research Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details."; //$NON-NLS-1$
045:
046:            /**
047:             * This keeps track of the root adapter factory that delegates to this adapter factory. <!--
048:             * begin-user-doc --> <!-- end-user-doc -->
049:             * 
050:             * @generated
051:             */
052:            protected ComposedAdapterFactory parentAdapterFactory;
053:
054:            /**
055:             * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
056:             * begin-user-doc --> <!-- end-user-doc -->
057:             * 
058:             * @generated
059:             */
060:            protected IChangeNotifier changeNotifier = new ChangeNotifier();
061:
062:            /**
063:             * This keeps track of all the supported types checked by
064:             * {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!-- end-user-doc -->
065:             * 
066:             * @generated
067:             */
068:            protected Collection supportedTypes = new ArrayList();
069:
070:            /**
071:             * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
072:             * 
073:             * @generated
074:             */
075:            public RenderItemProviderAdapterFactory() {
076:                supportedTypes.add(IEditingDomainItemProvider.class);
077:                supportedTypes.add(IStructuredItemContentProvider.class);
078:                supportedTypes.add(ITreeItemContentProvider.class);
079:                supportedTypes.add(IItemLabelProvider.class);
080:                supportedTypes.add(IItemPropertySource.class);
081:            }
082:
083:            /**
084:             * This keeps track of the one adapter used for all
085:             * {@link net.refractions.udig.project.internal.render.RenderManager} instances. <!--
086:             * begin-user-doc --> <!-- end-user-doc -->
087:             * 
088:             * @generated
089:             */
090:            protected RenderManagerItemProvider renderManagerItemProvider;
091:
092:            /**
093:             * This creates an adapter for a
094:             * {@link net.refractions.udig.project.internal.render.RenderManager}. <!-- begin-user-doc -->
095:             * <!-- end-user-doc -->
096:             * 
097:             * @generated
098:             */
099:            public Adapter createRenderManagerAdapter() {
100:                if (renderManagerItemProvider == null) {
101:                    renderManagerItemProvider = new RenderManagerItemProvider(
102:                            this );
103:                }
104:
105:                return renderManagerItemProvider;
106:            }
107:
108:            /**
109:             * This keeps track of the one adapter used for all
110:             * {@link net.refractions.udig.project.internal.render.Style} instances. <!-- begin-user-doc -->
111:             * <!-- end-user-doc -->
112:             * 
113:             * @generated
114:             */
115:            protected StyleItemProvider styleItemProvider;
116:
117:            /**
118:             * This creates an adapter for a {@link net.refractions.udig.project.internal.render.Style}.
119:             * <!-- begin-user-doc --> <!-- end-user-doc -->
120:             * 
121:             * @generated
122:             */
123:            public Adapter createStyleAdapter() {
124:                if (styleItemProvider == null) {
125:                    styleItemProvider = new StyleItemProvider(this );
126:                }
127:
128:                return styleItemProvider;
129:            }
130:
131:            /**
132:             * This keeps track of the one adapter used for all
133:             * {@link net.refractions.udig.project.internal.render.ViewportModel} instances. <!--
134:             * begin-user-doc --> <!-- end-user-doc -->
135:             * 
136:             * @generated
137:             */
138:            protected ViewportModelItemProvider viewportModelItemProvider;
139:
140:            /**
141:             * This creates an adapter for a
142:             * {@link net.refractions.udig.project.internal.render.ViewportModel}. <!-- begin-user-doc -->
143:             * <!-- end-user-doc -->
144:             * 
145:             * @generated
146:             */
147:            public Adapter createViewportModelAdapter() {
148:                if (viewportModelItemProvider == null) {
149:                    viewportModelItemProvider = new ViewportModelItemProvider(
150:                            this );
151:                }
152:
153:                return viewportModelItemProvider;
154:            }
155:
156:            /**
157:             * This keeps track of the one adapter used for all
158:             * {@link net.refractions.udig.project.internal.render.RenderExecutor} instances. <!--
159:             * begin-user-doc --> <!-- end-user-doc -->
160:             * 
161:             * @generated
162:             */
163:            protected RenderExecutorItemProvider renderExecutorItemProvider;
164:
165:            /**
166:             * This creates an adapter for a
167:             * {@link net.refractions.udig.project.internal.render.RenderExecutor}. <!-- begin-user-doc -->
168:             * <!-- end-user-doc -->
169:             * 
170:             * @generated
171:             */
172:            public Adapter createRenderExecutorAdapter() {
173:                if (renderExecutorItemProvider == null) {
174:                    renderExecutorItemProvider = new RenderExecutorItemProvider(
175:                            this );
176:                }
177:
178:                return renderExecutorItemProvider;
179:            }
180:
181:            /**
182:             * This returns the root adapter factory that contains this factory. <!-- begin-user-doc -->
183:             * <!-- end-user-doc -->
184:             * 
185:             * @generated
186:             */
187:            public ComposeableAdapterFactory getRootAdapterFactory() {
188:                return parentAdapterFactory == null ? this 
189:                        : parentAdapterFactory.getRootAdapterFactory();
190:            }
191:
192:            /**
193:             * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc -->
194:             * <!-- end-user-doc -->
195:             * 
196:             * @generated
197:             */
198:            public void setParentAdapterFactory(
199:                    ComposedAdapterFactory parentAdapterFactory) {
200:                this .parentAdapterFactory = parentAdapterFactory;
201:            }
202:
203:            /**
204:             * <!-- begin-user-doc --> <!-- end-user-doc -->
205:             * 
206:             * @generated
207:             */
208:            public boolean isFactoryForType(Object type) {
209:                return supportedTypes.contains(type)
210:                        || super .isFactoryForType(type);
211:            }
212:
213:            /**
214:             * This implementation substitutes the factory itself as the key for the adapter. <!--
215:             * begin-user-doc --> <!-- end-user-doc -->
216:             * 
217:             * @generated
218:             */
219:            public Adapter adapt(Notifier notifier, Object type) {
220:                return super .adapt(notifier, this );
221:            }
222:
223:            /**
224:             * <!-- begin-user-doc --> <!-- end-user-doc -->
225:             * 
226:             * @generated
227:             */
228:            public Object adapt(Object object, Object type) {
229:                if (isFactoryForType(type)) {
230:                    Object adapter = super .adapt(object, type);
231:                    if (!(type instanceof  Class)
232:                            || (((Class) type).isInstance(adapter))) {
233:                        return adapter;
234:                    }
235:                }
236:
237:                return null;
238:            }
239:
240:            /**
241:             * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
242:             * 
243:             * @generated
244:             */
245:            public void addListener(INotifyChangedListener notifyChangedListener) {
246:                changeNotifier.addListener(notifyChangedListener);
247:            }
248:
249:            /**
250:             * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
251:             * 
252:             * @generated
253:             */
254:            public void removeListener(
255:                    INotifyChangedListener notifyChangedListener) {
256:                changeNotifier.removeListener(notifyChangedListener);
257:            }
258:
259:            /**
260:             * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!--
261:             * begin-user-doc --> <!-- end-user-doc -->
262:             * 
263:             * @generated
264:             */
265:            public void fireNotifyChanged(Notification notification) {
266:                changeNotifier.fireNotifyChanged(notification);
267:
268:                if (parentAdapterFactory != null) {
269:                    parentAdapterFactory.fireNotifyChanged(notification);
270:                }
271:            }
272:
273:        }
w__ww_.ja__v_a2___s_.___c_o_m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.