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


001:        /*
002:         *    uDig - User Friendly Desktop Internet GIS client
003:         *    http://udig.refractions.net
004:         *    (C) 2004, Refractions Research Inc.
005:         *
006:         *    This library is free software; you can redistribute it and/or
007:         *    modify it under the terms of the GNU Lesser General Public
008:         *    License as published by the Free Software Foundation;
009:         *    version 2.1 of the License.
010:         *
011:         *    This library is distributed in the hope that it will be useful,
012:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         *    Lesser General Public License for more details.
015:         *
016:         */
017:        package net.refractions.udig.project.ui.internal;
018:
019:        import java.util.HashMap;
020:        import java.util.Map;
021:
022:        import net.refractions.udig.project.IProjectElement;
023:        import net.refractions.udig.project.ui.UDIGEditorInput;
024:
025:        import org.eclipse.core.runtime.CoreException;
026:        import org.eclipse.core.runtime.IConfigurationElement;
027:
028:        /**
029:         * UDIGEditorInputDescriptor objects create IEditorInput objects that wrap IProjectElements objects.
030:         * <p>
031:         * Since IProjectElements are not editor inputs and cannot be since they are model objects and not
032:         * UI objects an extensible system of turning IProjectElement objects into IEditorInput objects are
033:         * needed. The mapping between a IProjectElements and IEditorInput types are defined by
034:         * net.refractions.udig.project.ui.editorInputs extensions.
035:         * </p>
036:         * 
037:         * @author jones
038:         * @since 0.3
039:         */
040:        public class UDIGEditorInputDescriptor {
041:            protected String editorID;
042:            protected String name;
043:            protected Class type;
044:            protected IConfigurationElement extensionElement;
045:            protected Map<IProjectElement, UDIGEditorInput> instances = new HashMap<IProjectElement, UDIGEditorInput>();
046:
047:            /**
048:             * Creates a UDIGEditorInput
049:             * 
050:             * @param element
051:             * @return the EditorInput
052:             * @throws CoreException
053:             */
054:            public UDIGEditorInput createInput(IProjectElement element) {
055:                if (!instances.containsKey(element)) {
056:                    UDIGEditorInput input;
057:                    try {
058:                        input = (UDIGEditorInput) extensionElement
059:                                .createExecutableExtension("class"); //$NON-NLS-1$
060:                        input.setEditorId(editorID);
061:                    } catch (CoreException e) {
062:                        ProjectUIPlugin.log("Error creating input type", e); //$NON-NLS-1$
063:                        return null;
064:                    } //$NON-NLS-1$
065:                    input.setProjectElement(element);
066:                    instances.put(element, input);
067:                }
068:                return (UDIGEditorInput) instances.get(element);
069:
070:            }
071:
072:            /**
073:             * @return Returns the type.
074:             */
075:            public Class getType() {
076:                return type;
077:            }
078:
079:            /**
080:             * @param type The type to set.
081:             */
082:            public void setType(Class type) {
083:                this .type = type;
084:            }
085:
086:            /**
087:             * @return Returns the editorID.
088:             */
089:            public String getEditorID() {
090:                return editorID;
091:            }
092:
093:            /**
094:             * @param editorID The editorID to set.
095:             */
096:            public void setEditorID(String editorID) {
097:                this .editorID = editorID;
098:            }
099:
100:            /**
101:             * @return Returns the name.
102:             */
103:            public String getName() {
104:                return name;
105:            }
106:
107:            /**
108:             * @param name The name to set.
109:             */
110:            public void setName(String name) {
111:                this .name = name;
112:            }
113:
114:            /**
115:             * @return Returns the extensionElement.
116:             */
117:            public IConfigurationElement getExtensionElement() {
118:                return extensionElement;
119:            }
120:
121:            /**
122:             * @param extensionElement The extensionElement to set.
123:             */
124:            public void setExtensionElement(
125:                    IConfigurationElement extensionElement) {
126:                this.extensionElement = extensionElement;
127:            }
128:
129:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.