Source Code Cross Referenced for GUIRegistry.java in  » Content-Management-System » contelligent » de » finix » contelligent » client » gui » 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 » Content Management System » contelligent » de.finix.contelligent.client.gui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2001-2006 C:1 Financial Services GmbH
003:         *
004:         * This software is free software; you can redistribute it and/or
005:         * modify it under the terms of the GNU Lesser General Public
006:         * License Version 2.1, as published by the Free Software Foundation.
007:         *
008:         * This software is distributed in the hope that it will be useful,
009:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
010:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
011:         * Lesser General Public License for more details.
012:         *
013:         * You should have received a copy of the GNU Lesser General Public
014:         * License along with this library; if not, write to the Free Software
015:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
016:         */
017:
018:        package de.finix.contelligent.client.gui;
019:
020:        import java.util.Collection;
021:        import java.util.Map;
022:        import java.util.TreeMap;
023:
024:        import de.finix.contelligent.client.base.AbstractRegistry;
025:
026:        /**
027:         * Singleton that allows guis to register a mapping from a symbolic to an
028:         * implementation name.
029:         */
030:        public class GUIRegistry extends AbstractRegistry {
031:
032:            public final static String TEMPLATE_GUI_IMPL = "de.finix.contelligent.client.gui.category.TemplateGUI";
033:
034:            public final static String TRANSFORMER_GUI_IMPL = "de.finix.contelligent.client.gui.category.TransformerGUI";
035:
036:            public final static String DEFAULT_TEMPLATE_GUI_IMPL = TEMPLATE_GUI_IMPL;
037:
038:            // XXX make this accessible from outside, as ContelligentEditorKit needs it
039:            public final static String DATA_GUI_NAME = "Subcomponent (Data)";
040:
041:            public final static String ACCESS_GUI_NAME = "Access";
042:
043:            private final static String DEFAULT_GUI_IMPL = "de.finix.contelligent.client.gui.property.PropertyGUI";
044:
045:            protected static GUIRegistry registry = null;
046:
047:            protected Map<String, String> componentGuiEntries;
048:
049:            protected Map<String, String> viewGuiEntries;
050:
051:            protected Map<String, String> templateGuiEntries;
052:
053:            private GUIRegistry() {
054:                super ();
055:                componentGuiEntries = new TreeMap<String, String>();
056:                viewGuiEntries = new TreeMap<String, String>();
057:                templateGuiEntries = new TreeMap<String, String>();
058:
059:                // Aliases for previous names are needed because old versions stored
060:                // GUI mappings by their symbolic name
061:                registerAlias("Default / Properties", "Properties (All)");
062:                registerAlias("Edit properties", "Properties (Edit)");
063:                registerAlias("View", "Subcomponent (View)");
064:                registerAlias("Data", "Subcomponent (Data)");
065:                registerAlias("Content", "Subcomponent (Content)");
066:                registerAlias("Subcomponents", "Subcomponent (First)");
067:
068:                registerAlias("Directory", "RestrictedTree");
069:                registerAlias("PreviewTree", "BasicTree");
070:
071:                // add values that should be retrieved from server in future
072:                registerComponentGui("Properties (All)", DEFAULT_GUI_IMPL);
073:
074:                registerComponentGui(ACCESS_GUI_NAME,
075:                        "de.finix.contelligent.client.gui.access.AccessGUI");
076:                registerComponentGui("Boolean",
077:                        "de.finix.contelligent.client.gui.text.BooleanGUI");
078:
079:                registerComponentGui("Image",
080:                        "de.finix.contelligent.client.gui.image.ImageGUI");
081:                registerComponentGui("File",
082:                        "de.finix.contelligent.client.gui.file.FileGUI");
083:                registerComponentGui("Properties (Edit)",
084:                        "de.finix.contelligent.client.gui.property.EditPropertyGUI");
085:                registerComponentGui("Properties (Develop)",
086:                        "de.finix.contelligent.client.gui.property.DevelopPropertyGUI");
087:
088:                registerComponentGui("String",
089:                        "de.finix.contelligent.client.gui.text.StringGUI");
090:                registerComponentGui("Number",
091:                        "de.finix.contelligent.client.gui.text.NumberGUI");
092:                registerComponentGui("Text",
093:                        "de.finix.contelligent.client.gui.text.TextGUI");
094:                registerComponentGui("StyledText",
095:                        "de.finix.contelligent.client.gui.text.StyledTextGUI");
096:                registerComponentGui("Password",
097:                        "de.finix.contelligent.client.gui.text.PasswordGUI");
098:                registerComponentGui("Date",
099:                        "de.finix.contelligent.client.gui.text.DateGUI");
100:
101:                registerComponentGui("Color",
102:                        "de.finix.contelligent.client.gui.color.ColorGUI");
103:
104:                registerComponentGui("Link",
105:                        "de.finix.contelligent.client.gui.link.LinkGUI");
106:
107:                registerComponentGui("Folder",
108:                        "de.finix.contelligent.client.gui.directory.FolderGUI");
109:
110:                registerComponentGui("Description",
111:                        "de.finix.contelligent.client.gui.property.DescriptionGUI");
112:
113:                registerViewGui("Library",
114:                        "de.finix.contelligent.client.gui.directory.LibraryGUI");
115:                registerViewGui("Container",
116:                        "de.finix.contelligent.client.gui.directory.ContainerGUI");
117:                registerHidden("Pages",
118:                        "de.finix.contelligent.client.gui.directory.PagesGUI");
119:                registerViewGui("RestrictedTree",
120:                        "de.finix.contelligent.client.gui.directory.DirectoryGUI");
121:                registerViewGui("BasicTree",
122:                        "de.finix.contelligent.client.gui.directory.PreviewGUI");
123:                registerViewGui("ExpertTree",
124:                        "de.finix.contelligent.client.gui.directory.ExpertTreeGUI");
125:
126:                registerComponentGui("Action",
127:                        "de.finix.contelligent.client.gui.action.FActionGUI");
128:                registerComponentGui("ActionParameter",
129:                        "de.finix.contelligent.client.gui.property.ActionParameterGUI");
130:                registerComponentGui("Routing",
131:                        "de.finix.contelligent.client.gui.action.RoutingGUI");
132:
133:                registerComponentGui("Subcomponent (View)",
134:                        "de.finix.contelligent.client.gui.delegate.ViewGUI");
135:                registerComponentGui(DATA_GUI_NAME,
136:                        "de.finix.contelligent.client.gui.delegate.DataGUI");
137:                registerComponentGui("Subcomponent (Content)",
138:                        "de.finix.contelligent.client.gui.delegate.ContentGUI");
139:                registerComponentGui("Subcomponent (First)",
140:                        "de.finix.contelligent.client.gui.delegate.SubcomponentGUI");
141:
142:                registerComponentGui("ComposedTabbed",
143:                        "de.finix.contelligent.client.gui.composed.TabbedGUI");
144:                registerComponentGui("ComposedTable",
145:                        "de.finix.contelligent.client.gui.composed.TableGUI");
146:                registerComponentGui("ComposedForm",
147:                        "de.finix.contelligent.client.gui.composed.FormGUI");
148:
149:                registerComponentGui("Metadata",
150:                        "de.finix.contelligent.client.gui.metadata.MetadataGUI");
151:
152:                registerComponentGui("HTML (Block)",
153:                        "de.finix.contelligent.client.gui.text.EkitBlockGUI");
154:                registerComponentGui("HTML (Page)",
155:                        "de.finix.contelligent.client.gui.text.EkitPageGUI");
156:
157:                registerTemplateGui("Template (Normal)", TEMPLATE_GUI_IMPL);
158:                registerTemplateGui("Template (XSL)", TRANSFORMER_GUI_IMPL);
159:
160:            }
161:
162:            public void register(String symbolicName, String impl) {
163:                super .register(symbolicName, impl);
164:                componentGuiEntries.put(symbolicName, impl);
165:                templateGuiEntries.put(symbolicName, impl);
166:                viewGuiEntries.put(symbolicName, impl);
167:            }
168:
169:            public void registerComponentGui(String symbolicName, String impl) {
170:                super .register(symbolicName, impl);
171:                componentGuiEntries.put(symbolicName, impl);
172:            }
173:
174:            public void registerViewGui(String symbolicName, String impl) {
175:                super .register(symbolicName, impl);
176:                viewGuiEntries.put(symbolicName, impl);
177:            }
178:
179:            public void registerTemplateGui(String symbolicName, String impl) {
180:                super .register(symbolicName, impl);
181:                templateGuiEntries.put(symbolicName, impl);
182:            }
183:
184:            public void registerHidden(String symbolicName, String impl) {
185:                super .register(symbolicName, impl);
186:            }
187:
188:            public Collection getComponentGuiSymbolicNames() {
189:                return componentGuiEntries.keySet();
190:            }
191:
192:            public Collection getComponentGuiImpls() {
193:                return componentGuiEntries.values();
194:            }
195:
196:            public Collection getViewGuiSymbolicNames() {
197:                return viewGuiEntries.keySet();
198:            }
199:
200:            public Collection getViewGuiImpls() {
201:                return viewGuiEntries.values();
202:            }
203:
204:            public Collection getTemplateGuiSymbolicNames() {
205:                return templateGuiEntries.keySet();
206:            }
207:
208:            public Collection getTemplateGuiImpls() {
209:                return templateGuiEntries.values();
210:            }
211:
212:            public static GUIRegistry getInstance() {
213:                if (registry == null) {
214:                    registry = new GUIRegistry();
215:                }
216:                return registry;
217:            }
218:
219:            public String getDefaultImpl() {
220:                return DEFAULT_GUI_IMPL;
221:            }
222:
223:            public String getDefaultViewGuiImpl() {
224:                return "de.finix.contelligent.client.gui.directory.ExpertTreeGUI";
225:            }
226:
227:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.