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


001:        /**
002:         * <copyright></copyright> $Id: RenderSwitch.java 21450 2006-09-15 21:43:17Z jeichar $
003:         */package net.refractions.udig.project.internal.render.util;
004:
005:        import java.util.List;
006:
007:        import net.refractions.udig.project.IAbstractContext;
008:        import net.refractions.udig.project.ILayer;
009:        import net.refractions.udig.project.internal.AbstractContext;
010:        import net.refractions.udig.project.internal.render.CompositeRenderContext;
011:        import net.refractions.udig.project.internal.render.MultiLayerRenderer;
012:        import net.refractions.udig.project.internal.render.RenderContext;
013:        import net.refractions.udig.project.internal.render.RenderExecutor;
014:        import net.refractions.udig.project.internal.render.RenderManager;
015:        import net.refractions.udig.project.internal.render.RenderPackage;
016:        import net.refractions.udig.project.internal.render.Renderer;
017:        import net.refractions.udig.project.internal.render.RendererCreator;
018:        import net.refractions.udig.project.internal.render.ViewportModel;
019:        import net.refractions.udig.project.render.ICompositeRenderContext;
020:        import net.refractions.udig.project.render.IMultiLayerRenderer;
021:        import net.refractions.udig.project.render.IRenderContext;
022:        import net.refractions.udig.project.render.IRenderManager;
023:        import net.refractions.udig.project.render.IRenderer;
024:        import net.refractions.udig.project.render.IViewportModel;
025:        import net.refractions.udig.project.render.displayAdapter.IMapDisplayListener;
026:
027:        import org.eclipse.emf.ecore.EClass;
028:        import org.eclipse.emf.ecore.EObject;
029:
030:        /**
031:         * <!-- begin-user-doc --> The <b>Switch </b> for the model's inheritance hierarchy. It supports the
032:         * call {@link #doSwitch(EObject) doSwitch(object)}to invoke the <code>caseXXX</code> method for
033:         * each class of the model, starting with the actual class of the object and proceeding up the
034:         * inheritance hierarchy until a non-null result is returned, which is the result of the switch.
035:         * <!-- end-user-doc -->
036:         * 
037:         * @see net.refractions.udig.project.internal.render.RenderPackage
038:         * @generated
039:         */
040:        public class RenderSwitch {
041:            /**
042:             * <!-- begin-user-doc --> <!-- end-user-doc -->
043:             * 
044:             * @generated
045:             */
046:            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$
047:
048:            /**
049:             * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
050:             * 
051:             * @generated NOT
052:             */
053:            static RenderPackage modelPackage;
054:
055:            /**
056:             * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc -->
057:             * 
058:             * @generated
059:             */
060:            public RenderSwitch() {
061:                if (modelPackage == null) {
062:                    modelPackage = RenderPackage.eINSTANCE;
063:                }
064:            }
065:
066:            /**
067:             * Calls <code>caseXXX</code> for each class of the model until one returns a non null result;
068:             * it yields that result. <!-- begin-user-doc --> <!-- end-user-doc -->
069:             * 
070:             * @return the first non-null result returned by a <code>caseXXX</code> call.
071:             * @generated
072:             */
073:            public Object doSwitch(EObject theEObject) {
074:                return doSwitch(theEObject.eClass(), theEObject);
075:            }
076:
077:            /**
078:             * Calls <code>caseXXX</code> for each class of the model until one returns a non null result;
079:             * it yields that result. <!-- begin-user-doc --> <!-- end-user-doc -->
080:             * 
081:             * @return the first non-null result returned by a <code>caseXXX</code> call.
082:             * @generated
083:             */
084:            protected Object doSwitch(EClass theEClass, EObject theEObject) {
085:                if (theEClass.eContainer() == modelPackage) {
086:                    return doSwitch(theEClass.getClassifierID(), theEObject);
087:                } else {
088:                    List eSuperTypes = theEClass.getESuperTypes();
089:                    return eSuperTypes.isEmpty() ? defaultCase(theEObject)
090:                            : doSwitch((EClass) eSuperTypes.get(0), theEObject);
091:                }
092:            }
093:
094:            /**
095:             * Calls <code>caseXXX</code> for each class of the model until one returns a non null result;
096:             * it yields that result. <!-- begin-user-doc --> <!-- end-user-doc -->
097:             * 
098:             * @return the first non-null result returned by a <code>caseXXX</code> call.
099:             * @generated
100:             */
101:            protected Object doSwitch(int classifierID, EObject theEObject) {
102:                switch (classifierID) {
103:                case RenderPackage.MULTI_LAYER_RENDERER: {
104:                    MultiLayerRenderer multiLayerRenderer = (MultiLayerRenderer) theEObject;
105:                    Object result = caseMultiLayerRenderer(multiLayerRenderer);
106:                    if (result == null)
107:                        result = caseRenderer(multiLayerRenderer);
108:                    if (result == null)
109:                        result = caseIMultiLayerRenderer(multiLayerRenderer);
110:                    if (result == null)
111:                        result = caseIRenderer(multiLayerRenderer);
112:                    if (result == null)
113:                        result = defaultCase(theEObject);
114:                    return result;
115:                }
116:                case RenderPackage.RENDER_EXECUTOR: {
117:                    RenderExecutor renderExecutor = (RenderExecutor) theEObject;
118:                    Object result = caseRenderExecutor(renderExecutor);
119:                    if (result == null)
120:                        result = caseRenderer(renderExecutor);
121:                    if (result == null)
122:                        result = caseIRenderer(renderExecutor);
123:                    if (result == null)
124:                        result = defaultCase(theEObject);
125:                    return result;
126:                }
127:                case RenderPackage.RENDER_MANAGER: {
128:                    RenderManager renderManager = (RenderManager) theEObject;
129:                    Object result = caseRenderManager(renderManager);
130:                    if (result == null)
131:                        result = caseIRenderManager(renderManager);
132:                    if (result == null)
133:                        result = defaultCase(theEObject);
134:                    return result;
135:                }
136:                case RenderPackage.VIEWPORT_MODEL: {
137:                    ViewportModel viewportModel = (ViewportModel) theEObject;
138:                    Object result = caseViewportModel(viewportModel);
139:                    if (result == null)
140:                        result = caseIMapDisplayListener(viewportModel);
141:                    if (result == null)
142:                        result = caseIViewportModel(viewportModel);
143:                    if (result == null)
144:                        result = defaultCase(theEObject);
145:                    return result;
146:                }
147:                case RenderPackage.RENDERER: {
148:                    Renderer renderer = (Renderer) theEObject;
149:                    Object result = caseRenderer(renderer);
150:                    if (result == null)
151:                        result = caseIRenderer(renderer);
152:                    if (result == null)
153:                        result = defaultCase(theEObject);
154:                    return result;
155:                }
156:                default:
157:                    return defaultCase(theEObject);
158:                }
159:            }
160:
161:            /**
162:             * Returns the result of interpretting the object as an instance of '<em>IRender Manager</em>'.
163:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
164:             * terminate the switch. <!-- end-user-doc -->
165:             * 
166:             * @param object the target of the switch.
167:             * @return the result of interpretting the object as an instance of '<em>IRender Manager</em>'.
168:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
169:             * @generated
170:             */
171:            public Object caseIRenderManager(IRenderManager object) {
172:                return null;
173:            }
174:
175:            /**
176:             * Returns the result of interpretting the object as an instance of '<em>IViewport Model</em>'.
177:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
178:             * terminate the switch. <!-- end-user-doc -->
179:             * 
180:             * @param object the target of the switch.
181:             * @return the result of interpretting the object as an instance of '<em>IViewport Model</em>'.
182:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
183:             * @generated
184:             */
185:            public Object caseIViewportModel(IViewportModel object) {
186:                return null;
187:            }
188:
189:            /**
190:             * Returns the result of interpretting the object as an instance of '<em>IComposite Render Context</em>'.
191:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
192:             * terminate the switch. <!-- end-user-doc -->
193:             * 
194:             * @param object the target of the switch.
195:             * @return the result of interpretting the object as an instance of '<em>IComposite Render Context</em>'.
196:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
197:             * @generated
198:             */
199:            public Object caseICompositeRenderContext(
200:                    ICompositeRenderContext object) {
201:                return null;
202:            }
203:
204:            /**
205:             * Returns the result of interpretting the object as an instance of '<em>IMulti Layer Renderer</em>'.
206:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
207:             * terminate the switch. <!-- end-user-doc -->
208:             * 
209:             * @param object the target of the switch.
210:             * @return the result of interpretting the object as an instance of '<em>IMulti Layer Renderer</em>'.
211:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
212:             * @generated
213:             */
214:            public Object caseIMultiLayerRenderer(IMultiLayerRenderer object) {
215:                return null;
216:            }
217:
218:            /**
219:             * Returns the result of interpretting the object as an instance of '<em>IRender Context</em>'.
220:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
221:             * terminate the switch. <!-- end-user-doc -->
222:             * 
223:             * @param object the target of the switch.
224:             * @return the result of interpretting the object as an instance of '<em>IRender Context</em>'.
225:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
226:             * @generated
227:             */
228:            public Object caseIRenderContext(IRenderContext object) {
229:                return null;
230:            }
231:
232:            /**
233:             * Returns the result of interpretting the object as an instance of '<em>IRenderer</em>'.
234:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
235:             * terminate the switch. <!-- end-user-doc -->
236:             * 
237:             * @param object the target of the switch.
238:             * @return the result of interpretting the object as an instance of '<em>IRenderer</em>'.
239:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
240:             * @generated
241:             */
242:            public Object caseIRenderer(IRenderer object) {
243:                return null;
244:            }
245:
246:            /**
247:             * Returns the result of interpretting the object as an instance of '<em>ILayer</em>'. <!--
248:             * begin-user-doc --> This implementation returns null; returning a non-null result will
249:             * terminate the switch. <!-- end-user-doc -->
250:             * 
251:             * @param object the target of the switch.
252:             * @return the result of interpretting the object as an instance of '<em>ILayer</em>'.
253:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
254:             * @generated
255:             */
256:            public Object caseILayer(ILayer object) {
257:                return null;
258:            }
259:
260:            /**
261:             * Returns the result of interpretting the object as an instance of '<em>Manager</em>'. <!--
262:             * begin-user-doc --> This implementation returns null; returning a non-null result will
263:             * terminate the switch. <!-- end-user-doc -->
264:             * 
265:             * @param object the target of the switch.
266:             * @return the result of interpretting the object as an instance of '<em>Manager</em>'.
267:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
268:             * @generated
269:             */
270:            public Object caseRenderManager(RenderManager object) {
271:                return null;
272:            }
273:
274:            /**
275:             * Returns the result of interpretting the object as an instance of '<em>er</em>'. <!--
276:             * begin-user-doc --> This implementation returns null; returning a non-null result will
277:             * terminate the switch. <!-- end-user-doc -->
278:             * 
279:             * @param object the target of the switch.
280:             * @return the result of interpretting the object as an instance of '<em>er</em>'.
281:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
282:             * @generated
283:             */
284:            public Object caseRenderer(Renderer object) {
285:                return null;
286:            }
287:
288:            /**
289:             * Returns the result of interpretting the object as an instance of '<em>Renderer Creator</em>'.
290:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
291:             * terminate the switch. <!-- end-user-doc -->
292:             * 
293:             * @param object the target of the switch.
294:             * @return the result of interpretting the object as an instance of '<em>Renderer Creator</em>'.
295:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
296:             * @generated
297:             */
298:            public Object caseRendererCreator(RendererCreator object) {
299:                return null;
300:            }
301:
302:            /**
303:             * Returns the result of interpretting the object as an instance of '<em>Viewport Model</em>'.
304:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
305:             * terminate the switch. <!-- end-user-doc -->
306:             * 
307:             * @param object the target of the switch.
308:             * @return the result of interpretting the object as an instance of '<em>Viewport Model</em>'.
309:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
310:             * @generated
311:             */
312:            public Object caseViewportModel(ViewportModel object) {
313:                return null;
314:            }
315:
316:            /**
317:             * Returns the result of interpretting the object as an instance of '<em>Executor</em>'.
318:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
319:             * terminate the switch. <!-- end-user-doc -->
320:             * 
321:             * @param object the target of the switch.
322:             * @return the result of interpretting the object as an instance of '<em>Executor</em>'.
323:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
324:             * @generated
325:             */
326:            public Object caseRenderExecutor(RenderExecutor object) {
327:                return null;
328:            }
329:
330:            /**
331:             * Returns the result of interpretting the object as an instance of '<em>Context</em>'. <!--
332:             * begin-user-doc --> This implementation returns null; returning a non-null result will
333:             * terminate the switch. <!-- end-user-doc -->
334:             * 
335:             * @param object the target of the switch.
336:             * @return the result of interpretting the object as an instance of '<em>Context</em>'.
337:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
338:             * @generated
339:             */
340:            public Object caseRenderContext(RenderContext object) {
341:                return null;
342:            }
343:
344:            /**
345:             * Returns the result of interpretting the object as an instance of '<em>Composite Render Context</em>'.
346:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
347:             * terminate the switch. <!-- end-user-doc -->
348:             * 
349:             * @param object the target of the switch.
350:             * @return the result of interpretting the object as an instance of '<em>Composite Render Context</em>'.
351:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
352:             * @generated
353:             */
354:            public Object caseCompositeRenderContext(
355:                    CompositeRenderContext object) {
356:                return null;
357:            }
358:
359:            /**
360:             * Returns the result of interpretting the object as an instance of '<em>Comparable</em>'.
361:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
362:             * terminate the switch. <!-- end-user-doc -->
363:             * 
364:             * @param object the target of the switch.
365:             * @return the result of interpretting the object as an instance of '<em>Comparable</em>'.
366:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
367:             * @generated
368:             */
369:            public Object caseComparable(Comparable object) {
370:                return null;
371:            }
372:
373:            /**
374:             * Returns the result of interpretting the object as an instance of '<em>Multi Layer Renderer</em>'.
375:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
376:             * terminate the switch. <!-- end-user-doc -->
377:             * 
378:             * @param object the target of the switch.
379:             * @return the result of interpretting the object as an instance of '<em>Multi Layer Renderer</em>'.
380:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
381:             * @generated
382:             */
383:            public Object caseMultiLayerRenderer(MultiLayerRenderer object) {
384:                return null;
385:            }
386:
387:            /**
388:             * Returns the result of interpretting the object as an instance of '<em>Cloneable</em>'.
389:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
390:             * terminate the switch. <!-- end-user-doc -->
391:             * 
392:             * @param object the target of the switch.
393:             * @return the result of interpretting the object as an instance of '<em>Cloneable</em>'.
394:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
395:             * @generated
396:             */
397:            public Object caseCloneable(Cloneable object) {
398:                return null;
399:            }
400:
401:            /**
402:             * Returns the result of interpretting the object as an instance of '<em>IAbstract Context</em>'.
403:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
404:             * terminate the switch. <!-- end-user-doc -->
405:             * 
406:             * @param object the target of the switch.
407:             * @return the result of interpretting the object as an instance of '<em>IAbstract Context</em>'.
408:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
409:             * @generated
410:             */
411:            public Object caseIAbstractContext(IAbstractContext object) {
412:                return null;
413:            }
414:
415:            /**
416:             * Returns the result of interpretting the object as an instance of '<em>Abstract Context</em>'.
417:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
418:             * terminate the switch. <!-- end-user-doc -->
419:             * 
420:             * @param object the target of the switch.
421:             * @return the result of interpretting the object as an instance of '<em>Abstract Context</em>'.
422:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
423:             * @generated
424:             */
425:            public Object caseAbstractContext(AbstractContext object) {
426:                return null;
427:            }
428:
429:            /**
430:             * Returns the result of interpretting the object as an instance of '<em>IMap Display Listener</em>'.
431:             * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
432:             * terminate the switch. <!-- end-user-doc -->
433:             * 
434:             * @param object the target of the switch.
435:             * @return the result of interpretting the object as an instance of '<em>IMap Display Listener</em>'.
436:             * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
437:             * @generated
438:             */
439:            public Object caseIMapDisplayListener(IMapDisplayListener object) {
440:                return null;
441:            }
442:
443:            /**
444:             * Returns the result of interpretting the object as an instance of '<em>EObject</em>'. <!--
445:             * begin-user-doc --> This implementation returns null; returning a non-null result will
446:             * terminate the switch, but this is the last case anyway. <!-- end-user-doc -->
447:             * 
448:             * @param object the target of the switch.
449:             * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
450:             * @see #doSwitch(org.eclipse.emf.ecore.EObject)
451:             * @generated
452:             */
453:            public Object defaultCase(EObject object) {
454:                return null;
455:            }
456:
457:        } // RenderSwitch
w___w___w__.__j__a__v__a_2__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.