Source Code Cross Referenced for ModelAdapterFactory.java in  » GIS » udig-1.1 » net » refractions » udig » printing » model » util » 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.printing.model.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * <copyright>
003:         * </copyright>
004:         *
005:         * $Id: ModelAdapterFactory.java 18807 2006-03-25 01:16:09Z chorner $
006:         */package net.refractions.udig.printing.model.util;
007:
008:        import net.refractions.udig.printing.model.Box;
009:        import net.refractions.udig.printing.model.Connection;
010:        import net.refractions.udig.printing.model.DecoratorBox;
011:        import net.refractions.udig.printing.model.Element;
012:        import net.refractions.udig.printing.model.ModelPackage;
013:        import net.refractions.udig.printing.model.Page;
014:        import net.refractions.udig.project.IProjectElement;
015:        import net.refractions.udig.project.internal.ProjectElement;
016:
017:        import org.eclipse.core.runtime.IAdaptable;
018:        import org.eclipse.emf.common.notify.Adapter;
019:        import org.eclipse.emf.common.notify.Notifier;
020:        import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
021:        import org.eclipse.emf.ecore.EObject;
022:
023:        /**
024:         * <!-- begin-user-doc -->
025:         * The <b>Adapter Factory</b> for the model.
026:         * It provides an adapter <code>createXXX</code> method for each class of the model.
027:         * <!-- end-user-doc -->
028:         * @see net.refractions.udig.printing.model.ModelPackage
029:         * @generated
030:         */
031:        public class ModelAdapterFactory extends AdapterFactoryImpl {
032:            /**
033:             * The cached model package.
034:             * <!-- begin-user-doc -->
035:             * <!-- end-user-doc -->
036:             * @generated
037:             */
038:            protected static ModelPackage modelPackage;
039:
040:            /**
041:             * Creates an instance of the adapter factory.
042:             * <!-- begin-user-doc -->
043:             * <!-- end-user-doc -->
044:             * @generated
045:             */
046:            public ModelAdapterFactory() {
047:                if (modelPackage == null) {
048:                    modelPackage = ModelPackage.eINSTANCE;
049:                }
050:            }
051:
052:            /**
053:             * Returns whether this factory is applicable for the type of the object.
054:             * <!-- begin-user-doc -->
055:             * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
056:             * <!-- end-user-doc -->
057:             * @return whether this factory is applicable for the type of the object.
058:             * @generated
059:             */
060:            public boolean isFactoryForType(Object object) {
061:                if (object == modelPackage) {
062:                    return true;
063:                }
064:                if (object instanceof  EObject) {
065:                    return ((EObject) object).eClass().getEPackage() == modelPackage;
066:                }
067:                return false;
068:            }
069:
070:            /**
071:             * The switch the delegates to the <code>createXXX</code> methods.
072:             * <!-- begin-user-doc -->
073:             * <!-- end-user-doc -->
074:             * @generated
075:             */
076:            protected ModelSwitch modelSwitch = new ModelSwitch() {
077:                public Object caseBox(Box object) {
078:                    return createBoxAdapter();
079:                }
080:
081:                public Object caseConnection(Connection object) {
082:                    return createConnectionAdapter();
083:                }
084:
085:                public Object caseDecoratorBox(DecoratorBox object) {
086:                    return createDecoratorBoxAdapter();
087:                }
088:
089:                public Object caseElement(Element object) {
090:                    return createElementAdapter();
091:                }
092:
093:                public Object casePage(Page object) {
094:                    return createPageAdapter();
095:                }
096:
097:                public Object caseIProjectElement(IProjectElement object) {
098:                    return createIProjectElementAdapter();
099:                }
100:
101:                public Object caseIAdaptable(IAdaptable object) {
102:                    return createIAdaptableAdapter();
103:                }
104:
105:                public Object caseProjectElement(ProjectElement object) {
106:                    return createProjectElementAdapter();
107:                }
108:
109:                public Object defaultCase(EObject object) {
110:                    return createEObjectAdapter();
111:                }
112:            };
113:
114:            /**
115:             * Creates an adapter for the <code>target</code>.
116:             * <!-- begin-user-doc -->
117:             * <!-- end-user-doc -->
118:             * @param target the object to adapt.
119:             * @return the adapter for the <code>target</code>.
120:             * @generated
121:             */
122:            public Adapter createAdapter(Notifier target) {
123:                return (Adapter) modelSwitch.doSwitch((EObject) target);
124:            }
125:
126:            /**
127:             * Creates a new adapter for an object of class '{@link net.refractions.udig.printing.model.Box <em>Box</em>}'.
128:             * <!-- begin-user-doc -->
129:             * This default implementation returns null so that we can easily ignore cases;
130:             * it's useful to ignore a case when inheritance will catch all the cases anyway.
131:             * <!-- end-user-doc -->
132:             * @return the new adapter.
133:             * @see net.refractions.udig.printing.model.Box
134:             * @generated
135:             */
136:            public Adapter createBoxAdapter() {
137:                return null;
138:            }
139:
140:            /**
141:             * Creates a new adapter for an object of class '{@link net.refractions.udig.printing.model.Connection <em>Connection</em>}'.
142:             * <!-- begin-user-doc -->
143:             * This default implementation returns null so that we can easily ignore cases;
144:             * it's useful to ignore a case when inheritance will catch all the cases anyway.
145:             * <!-- end-user-doc -->
146:             * @return the new adapter.
147:             * @see net.refractions.udig.printing.model.Connection
148:             * @generated
149:             */
150:            public Adapter createConnectionAdapter() {
151:                return null;
152:            }
153:
154:            /**
155:             * Creates a new adapter for an object of class '{@link net.refractions.udig.printing.model.DecoratorBox <em>Decorator Box</em>}'.
156:             * <!-- begin-user-doc -->
157:             * This default implementation returns null so that we can easily ignore cases;
158:             * it's useful to ignore a case when inheritance will catch all the cases anyway.
159:             * <!-- end-user-doc -->
160:             * @return the new adapter.
161:             * @see net.refractions.udig.printing.model.DecoratorBox
162:             * @generated
163:             */
164:            public Adapter createDecoratorBoxAdapter() {
165:                return null;
166:            }
167:
168:            /**
169:             * Creates a new adapter for an object of class '{@link net.refractions.udig.printing.model.Element <em>Element</em>}'.
170:             * <!-- begin-user-doc -->
171:             * This default implementation returns null so that we can easily ignore cases;
172:             * it's useful to ignore a case when inheritance will catch all the cases anyway.
173:             * <!-- end-user-doc -->
174:             * @return the new adapter.
175:             * @see net.refractions.udig.printing.model.Element
176:             * @generated
177:             */
178:            public Adapter createElementAdapter() {
179:                return null;
180:            }
181:
182:            /**
183:             * Creates a new adapter for an object of class '{@link net.refractions.udig.printing.model.Page <em>Page</em>}'.
184:             * <!-- begin-user-doc -->
185:             * This default implementation returns null so that we can easily ignore cases;
186:             * it's useful to ignore a case when inheritance will catch all the cases anyway.
187:             * <!-- end-user-doc -->
188:             * @return the new adapter.
189:             * @see net.refractions.udig.printing.model.Page
190:             * @generated
191:             */
192:            public Adapter createPageAdapter() {
193:                return null;
194:            }
195:
196:            /**
197:             * Creates a new adapter for an object of class '{@link net.refractions.udig.project.IProjectElement <em>IProject Element</em>}'.
198:             * <!-- begin-user-doc -->
199:             * This default implementation returns null so that we can easily ignore cases;
200:             * it's useful to ignore a case when inheritance will catch all the cases anyway.
201:             * <!-- end-user-doc -->
202:             * @return the new adapter.
203:             * @see net.refractions.udig.project.IProjectElement
204:             * @generated
205:             */
206:            public Adapter createIProjectElementAdapter() {
207:                return null;
208:            }
209:
210:            /**
211:             * Creates a new adapter for an object of class '{@link org.eclipse.core.runtime.IAdaptable <em>IAdaptable</em>}'.
212:             * <!-- begin-user-doc -->
213:             * This default implementation returns null so that we can easily ignore cases;
214:             * it's useful to ignore a case when inheritance will catch all the cases anyway.
215:             * <!-- end-user-doc -->
216:             * @return the new adapter.
217:             * @see org.eclipse.core.runtime.IAdaptable
218:             * @generated
219:             */
220:            public Adapter createIAdaptableAdapter() {
221:                return null;
222:            }
223:
224:            /**
225:             * Creates a new adapter for an object of class '{@link net.refractions.udig.project.internal.ProjectElement <em>Element</em>}'.
226:             * <!-- begin-user-doc -->
227:             * This default implementation returns null so that we can easily ignore cases;
228:             * it's useful to ignore a case when inheritance will catch all the cases anyway.
229:             * <!-- end-user-doc -->
230:             * @return the new adapter.
231:             * @see net.refractions.udig.project.internal.ProjectElement
232:             * @generated
233:             */
234:            public Adapter createProjectElementAdapter() {
235:                return null;
236:            }
237:
238:            /**
239:             * Creates a new adapter for the default case.
240:             * <!-- begin-user-doc -->
241:             * This default implementation returns null.
242:             * <!-- end-user-doc -->
243:             * @return the new adapter.
244:             * @generated
245:             */
246:            public Adapter createEObjectAdapter() {
247:                return null;
248:            }
249:
250:        } //ModelAdapterFactory
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.