Source Code Cross Referenced for ControllerSettings.java in  » Workflow-Engines » JaWE » org » enhydra » jawe » base » controller » 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 » Workflow Engines » JaWE » org.enhydra.jawe.base.controller 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Miroslav Popov, Dec 1, 2005 miroslav.popov@gmail.com
003:         */package org.enhydra.jawe.base.controller;
004:
005:        import java.net.URL;
006:        import java.util.List;
007:        import java.util.Properties;
008:
009:        import javax.swing.Action;
010:        import javax.swing.ImageIcon;
011:
012:        import org.enhydra.jawe.ActionBase;
013:        import org.enhydra.jawe.AdditionalResourceManager;
014:        import org.enhydra.jawe.JaWEAction;
015:        import org.enhydra.jawe.JaWEComponent;
016:        import org.enhydra.jawe.JaWEComponentSettings;
017:        import org.enhydra.jawe.ResourceManager;
018:        import org.enhydra.jawe.Utils;
019:        import org.enhydra.jawe.base.controller.actions.Close;
020:        import org.enhydra.jawe.base.controller.actions.Exit;
021:        import org.enhydra.jawe.base.controller.actions.ExternalApplications;
022:        import org.enhydra.jawe.base.controller.actions.ExternalParticipants;
023:        import org.enhydra.jawe.base.controller.actions.ExternalProcesses;
024:        import org.enhydra.jawe.base.controller.actions.HelpAbout;
025:        import org.enhydra.jawe.base.controller.actions.NewPackage;
026:        import org.enhydra.jawe.base.controller.actions.Open;
027:        import org.enhydra.jawe.base.controller.actions.PackageAddExternalPackage;
028:        import org.enhydra.jawe.base.controller.actions.PackageApplications;
029:        import org.enhydra.jawe.base.controller.actions.PackageCheckValidity;
030:        import org.enhydra.jawe.base.controller.actions.PackageExternalPackages;
031:        import org.enhydra.jawe.base.controller.actions.PackageNamespaces;
032:        import org.enhydra.jawe.base.controller.actions.PackageNewProcess;
033:        import org.enhydra.jawe.base.controller.actions.PackageParticipants;
034:        import org.enhydra.jawe.base.controller.actions.PackageProcesses;
035:        import org.enhydra.jawe.base.controller.actions.PackageProperties;
036:        import org.enhydra.jawe.base.controller.actions.PackageReferredDocument;
037:        import org.enhydra.jawe.base.controller.actions.PackageRemoveExternalPackage;
038:        import org.enhydra.jawe.base.controller.actions.PackageTypeDeclarations;
039:        import org.enhydra.jawe.base.controller.actions.PackageWorkflowRelevantData;
040:        import org.enhydra.jawe.base.controller.actions.ProcessActivitiesOverview;
041:        import org.enhydra.jawe.base.controller.actions.ProcessActivitySetsOverview;
042:        import org.enhydra.jawe.base.controller.actions.ProcessApplications;
043:        import org.enhydra.jawe.base.controller.actions.ProcessFormalParameters;
044:        import org.enhydra.jawe.base.controller.actions.ProcessParticipants;
045:        import org.enhydra.jawe.base.controller.actions.ProcessProperties;
046:        import org.enhydra.jawe.base.controller.actions.ProcessTransitionsOverview;
047:        import org.enhydra.jawe.base.controller.actions.ProcessWorkflowRelevantData;
048:        import org.enhydra.jawe.base.controller.actions.Reopen;
049:        import org.enhydra.jawe.base.controller.actions.Save;
050:        import org.enhydra.jawe.base.controller.actions.SaveAs;
051:
052:        /**
053:         * @author Miroslav Popov
054:         */
055:        public class ControllerSettings extends JaWEComponentSettings {
056:
057:            public void init(JaWEComponent comp) {
058:                PROPERTYFILE_PATH = "org/enhydra/jawe/base/controller/properties/";
059:                PROPERTYFILE_NAME = "togwecontroller.properties";
060:                super .init(comp);
061:            }
062:
063:            public void loadDefault(JaWEComponent comp, Properties properties) {
064:                // defaults
065:                arm = new AdditionalResourceManager(properties);
066:
067:                componentSettings.put("AllowInvalidPackageSaving", new Boolean(
068:                        properties.getProperty("AllowInvalidPackageSaving",
069:                                "true").equals("true")));
070:                componentSettings.put("AskOnDeletion", new Boolean(properties
071:                        .getProperty("AskOnDeletion", "false").equals("true")));
072:                componentSettings.put("AskOnDeletionOfReferencedElements",
073:                        new Boolean(properties.getProperty(
074:                                "AskOnDeletionOfReferencedElements", "true")
075:                                .equals("true")));
076:                componentSettings.put(
077:                        "DoNotAskOnDeletionOfReferencedElementTypes",
078:                        properties.getProperty(
079:                                "DoNotAskOnDeletionOfReferencedElementTypes",
080:                                "Activity Transition"));
081:                componentSettings.put("DesignTimeValidation", new Boolean(
082:                        properties.getProperty("DesignTimeValidation", "true")
083:                                .equals("true")));
084:                componentSettings.put("InitialXPDLValidation", new Boolean(
085:                        properties.getProperty("InitialXPDLValidation", "true")
086:                                .equals("true")));
087:                componentSettings.put("StartMaximized", new Boolean(properties
088:                        .getProperty("StartMaximized", "true").equals("true")));
089:                componentSettings.put("ShowTooltip", new Boolean(properties
090:                        .getProperty("ShowTooltip", "true").equals("true")));
091:                componentSettings.put("UndoHistoryManager.Class", properties
092:                        .getProperty("UndoHistoryManager.Class",
093:                                "org.enhydra.jawe.UndoHistoryMgr"));
094:                componentSettings.put("UndoHistorySize", new Integer(properties
095:                        .getProperty("UndoHistorySize", "-1")));
096:
097:                componentSettings.put("Encoding", properties.getProperty(
098:                        "Encoding", "UTF-8"));
099:                componentSettings.put("FrameSettings", properties.getProperty(
100:                        "FrameSettings", "V; special H tree; main H other"));
101:                componentSettings
102:                        .put(
103:                                "DefaultActionsEditOrder",
104:                                properties
105:                                        .getProperty(
106:                                                "DefaultActions.Edit.ActionOrder",
107:                                                "Undo Redo - Cut Copy Paste Delete - EditProperties"));
108:                componentSettings
109:                        .put(
110:                                "TypeResolverClass",
111:                                properties
112:                                        .getProperty("TypeResolverClass",
113:                                                "org.enhydra.jawe.base.controller.JaWETypeResolver"));
114:
115:                componentSettings.put("MainDividerLocation", new Integer(
116:                        properties.getProperty("MainDividerLocation", "230")));
117:                componentSettings.put("FirstSmallDividerLocation", new Integer(
118:                        properties.getProperty("FirstSmallDividerLocation",
119:                                "230")));
120:                componentSettings.put("SecondSmallDividerLocation",
121:                        new Integer(properties.getProperty(
122:                                "SecondSmallDividerLocation", "400")));
123:
124:                ImageIcon appIcon;
125:                URL iconURL = ResourceManager.getResource(properties,
126:                        "ApplicationIcon");
127:                if (iconURL != null)
128:                    appIcon = new ImageIcon(iconURL);
129:                else
130:                    appIcon = new ImageIcon(ResourceManager.class
131:                            .getClassLoader().getResource(
132:                                    "org/enhydra/jawe/images/jawe.gif"));
133:                componentSettings.put("ApplicationIcon", appIcon);
134:
135:                ImageIcon hicon;
136:                hicon = new ImageIcon(ResourceManager.class.getClassLoader()
137:                        .getResource("org/enhydra/jawe/images/together.gif"));
138:                componentSettings.put("Sponsore1Logo", hicon);
139:
140:                hicon = new ImageIcon(ResourceManager.class.getClassLoader()
141:                        .getResource("org/enhydra/jawe/images/Abacus.jpg"));
142:                componentSettings.put("Sponsore2Logo", hicon);
143:
144:                ImageIcon actionIcon;
145:                iconURL = ResourceManager.getResource(properties,
146:                        "DefaultAction.Icon." + JaWEActions.NEW_ACTION);
147:                if (iconURL != null)
148:                    actionIcon = new ImageIcon(iconURL);
149:                else
150:                    actionIcon = new ImageIcon(ResourceManager.class
151:                            .getClassLoader().getResource(
152:                                    "org/enhydra/jawe/images/new.gif"));
153:                componentSettings.put("DefaultImage" + JaWEActions.NEW_ACTION,
154:                        actionIcon);
155:
156:                iconURL = ResourceManager.getResource(properties,
157:                        "DefaultAction.Icon." + JaWEActions.DUPLICATE_ACTION);
158:                if (iconURL != null)
159:                    actionIcon = new ImageIcon(iconURL);
160:                else
161:                    actionIcon = new ImageIcon(ResourceManager.class
162:                            .getClassLoader().getResource(
163:                                    "org/enhydra/jawe/images/duplicate.png"));
164:                componentSettings.put("DefaultImage"
165:                        + JaWEActions.DUPLICATE_ACTION, actionIcon);
166:
167:                iconURL = ResourceManager.getResource(properties,
168:                        "DefaultAction.Icon." + JaWEActions.REFERENCES);
169:                if (iconURL != null)
170:                    actionIcon = new ImageIcon(iconURL);
171:                else
172:                    actionIcon = new ImageIcon(ResourceManager.class
173:                            .getClassLoader().getResource(
174:                                    "org/enhydra/jawe/images/references.gif"));
175:                componentSettings.put("DefaultImage" + JaWEActions.REFERENCES,
176:                        actionIcon);
177:
178:                iconURL = ResourceManager.getResource(properties,
179:                        "DefaultAction.Icon." + JaWEActions.UNDO_ACTION);
180:                if (iconURL != null)
181:                    actionIcon = new ImageIcon(iconURL);
182:                else
183:                    actionIcon = new ImageIcon(
184:                            ResourceManager.class
185:                                    .getClassLoader()
186:                                    .getResource(
187:                                            "org/enhydra/jawe/images/nav_left_blue.png"));
188:                componentSettings.put("DefaultImage" + JaWEActions.UNDO_ACTION,
189:                        actionIcon);
190:
191:                iconURL = ResourceManager.getResource(properties,
192:                        "DefaultAction.Icon." + JaWEActions.REDO_ACTION);
193:                if (iconURL != null)
194:                    actionIcon = new ImageIcon(iconURL);
195:                else
196:                    actionIcon = new ImageIcon(
197:                            ResourceManager.class
198:                                    .getClassLoader()
199:                                    .getResource(
200:                                            "org/enhydra/jawe/images/nav_right_blue.png"));
201:                componentSettings.put("DefaultImage" + JaWEActions.REDO_ACTION,
202:                        actionIcon);
203:
204:                iconURL = ResourceManager.getResource(properties,
205:                        "DefaultAction.Icon." + JaWEActions.CUT_ACTION);
206:                if (iconURL != null)
207:                    actionIcon = new ImageIcon(iconURL);
208:                else
209:                    actionIcon = new ImageIcon(ResourceManager.class
210:                            .getClassLoader().getResource(
211:                                    "org/enhydra/jawe/images/cut.gif"));
212:                componentSettings.put("DefaultImage" + JaWEActions.CUT_ACTION,
213:                        actionIcon);
214:
215:                iconURL = ResourceManager.getResource(properties,
216:                        "DefaultAction.Icon." + JaWEActions.COPY_ACTION);
217:                if (iconURL != null)
218:                    actionIcon = new ImageIcon(iconURL);
219:                else
220:                    actionIcon = new ImageIcon(ResourceManager.class
221:                            .getClassLoader().getResource(
222:                                    "org/enhydra/jawe/images/copy.gif"));
223:                componentSettings.put("DefaultImage" + JaWEActions.COPY_ACTION,
224:                        actionIcon);
225:
226:                iconURL = ResourceManager.getResource(properties,
227:                        "DefaultAction.Icon." + JaWEActions.PASTE_ACTION);
228:                if (iconURL != null)
229:                    actionIcon = new ImageIcon(iconURL);
230:                else
231:                    actionIcon = new ImageIcon(ResourceManager.class
232:                            .getClassLoader().getResource(
233:                                    "org/enhydra/jawe/images/paste.gif"));
234:                componentSettings.put(
235:                        "DefaultImage" + JaWEActions.PASTE_ACTION, actionIcon);
236:
237:                iconURL = ResourceManager.getResource(properties,
238:                        "DefaultAction.Icon." + JaWEActions.DELETE_ACTION);
239:                if (iconURL != null)
240:                    actionIcon = new ImageIcon(iconURL);
241:                else
242:                    actionIcon = new ImageIcon(ResourceManager.class
243:                            .getClassLoader().getResource(
244:                                    "org/enhydra/jawe/images/delete.gif"));
245:                componentSettings.put("DefaultImage"
246:                        + JaWEActions.DELETE_ACTION, actionIcon);
247:
248:                iconURL = ResourceManager.getResource(properties,
249:                        "DefaultAction.Icon."
250:                                + JaWEActions.EDIT_PROPERTIES_ACTION);
251:                if (iconURL != null)
252:                    actionIcon = new ImageIcon(iconURL);
253:                else
254:                    actionIcon = new ImageIcon(ResourceManager.class
255:                            .getClassLoader().getResource(
256:                                    "org/enhydra/jawe/images/properties.gif"));
257:                componentSettings.put("DefaultImage"
258:                        + JaWEActions.EDIT_PROPERTIES_ACTION, actionIcon);
259:
260:                // menus, toolbars and actions
261:                componentSettings
262:                        .put(
263:                                "MainMenu",
264:                                properties
265:                                        .getProperty(
266:                                                "MainMenu.ActionOrder",
267:                                                "*File jawe_editmenu *Search *Package *Process *ExternalPackages *Settings *Help"));
268:
269:                loadDefaultMenusToolbarsAndActions(comp);
270:                componentSettings.putAll(Utils
271:                        .loadAllMenusAndToolbars(properties));
272:                componentAction.putAll(Utils.loadActions(properties, comp,
273:                        componentAction));
274:
275:                List compAct = ResourceManager.getResourceStrings(properties,
276:                        "Action.JaWEComponentClass.", false);
277:                for (int i = 0; i < compAct.size(); i++) {
278:                    String className = ResourceManager.getResourceString(
279:                            properties, "Action.JaWEComponentClass."
280:                                    + compAct.get(i));
281:                    componentSettings.put(compAct.get(i) + "ClassName",
282:                            className);
283:                }
284:                // ********
285:            }
286:
287:            protected void loadDefaultMenusToolbarsAndActions(JaWEComponent comp) {
288:                // menu
289:                componentSettings
290:                        .put("FileMenu",
291:                                "NewPackage Open Reopen Close - Save SaveAs - @RecentFiles - Exit");
292:                componentSettings.put("FileLangName", "file");
293:                componentSettings.put("SearchMenu",
294:                        "Search jaweAction_References");
295:                componentSettings.put("SearchLangName", "search");
296:                componentSettings
297:                        .put(
298:                                "PackageMenu",
299:                                "PackageCheckValidity - PackageNewProcess - PackageNamespaces PackageProperties PackageProcesses PackageExternalPackages PackageAddExternalPackage PackageRemoveExternalPackage PackageTypeDeclarations PackageParticipants PackageApplications PackageWorkflowRelevantData PackageReferredDocument");
300:                componentSettings.put("PackageLangName", "package");
301:                componentSettings
302:                        .put(
303:                                "ProcessMenu",
304:                                "ProcessProperties ProcessParticipants ProcessApplications ProcessWorkflowRelevantData ProcessFormalParameters - ProcessActivitySetsOverview ProcessActivitiesOverview ProcessTransitionsOverview");
305:                componentSettings.put("ProcessLangName", "process");
306:                componentSettings
307:                        .put("ExternalPackagesMenu",
308:                                "ExternalParticipants ExternalProcesses ExternalApplications");
309:                componentSettings.put("ExternalPackagesLangName",
310:                        "externalPackage");
311:                componentSettings.put("SettingsMenu",
312:                        "@LanguageSwitcher @Reconfigurator");
313:                componentSettings.put("SettingsLangName", "settings");
314:                componentSettings.put("HelpMenu", "HelpManual HelpAbout");
315:                componentSettings.put("HelpLangName", "help");
316:
317:                // toolbar
318:                componentSettings
319:                        .put(
320:                                "defaultToolbarToolbar",
321:                                "*filetoolbar jawe_edittoolbar *searchtoolbar *packagetoolbar *externaltoolbar *processtoolbar");
322:                componentSettings.put("filetoolbarToolbar",
323:                        "NewPackage Open Reopen Close - Save SaveAs - Exit");
324:                componentSettings.put("searchtoolbarToolbar",
325:                        "Search jaweAction_References");
326:                componentSettings
327:                        .put(
328:                                "packagetoolbarToolbar",
329:                                "PackageCheckValidity - PackageNewProcess - PackageNamespaces PackageProperties PackageProcesses PackageExternalPackages PackageAddExternalPackage PackageRemoveExternalPackage PackageTypeDeclarations PackageParticipants PackageApplications PackageWorkflowRelevantData");
330:                componentSettings
331:                        .put(
332:                                "processtoolbarToolbar",
333:                                "ProcessProperties ProcessParticipants ProcessApplications ProcessWorkflowRelevantData ProcessFormalParameters");
334:                componentSettings
335:                        .put("externaltoolbarToolbar",
336:                                "ExternalParticipants ExternalProcesses ExternalApplications");
337:
338:                // actions
339:                ActionBase action;
340:                ImageIcon icon;
341:                String langDepName;
342:                JaWEAction ja;
343:
344:                // Close
345:                action = new Close(comp);
346:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
347:                        .getResource("org/enhydra/jawe/images/close.gif"));
348:                langDepName = "Close";
349:                ja = new JaWEAction(action, icon, langDepName);
350:                componentAction.put("Close", ja);
351:
352:                // Exit
353:                action = new Exit(comp);
354:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
355:                        .getResource("org/enhydra/jawe/images/exit.gif"));
356:                langDepName = "Exit";
357:                ja = new JaWEAction(action, icon, langDepName);
358:                componentAction.put("Exit", ja);
359:
360:                // HelpAbout
361:                action = new HelpAbout(comp);
362:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
363:                        .getResource("org/enhydra/jawe/images/jawe.gif"));
364:                langDepName = "HelpAbout";
365:                ja = new JaWEAction(action, icon, langDepName);
366:                componentAction.put("HelpAbout", ja);
367:
368:                // HelpManual
369:                try {
370:                    String clsName = "org.enhydra.jawe.base.controller.actions.HelpManual";
371:                    try {
372:                        action = (ActionBase) Class.forName(clsName)
373:                                .getConstructor(
374:                                        new Class[] { JaWEComponent.class })
375:                                .newInstance(new Object[] { comp });
376:                    } catch (Exception e) {
377:                        action = null;
378:                    }
379:                    icon = new ImageIcon(ResourceManager.class.getClassLoader()
380:                            .getResource("org/enhydra/jawe/images/manual.gif"));
381:                    langDepName = "HelpManual";
382:                    ja = new JaWEAction(action, icon, langDepName);
383:                    componentAction.put("HelpManual", ja);
384:                } catch (Exception ex) {
385:                }
386:
387:                // Language Switcher
388:                componentSettings
389:                        .put("LanguageSwitcherClassName",
390:                                "org.enhydra.jawe.components.languageswitcher.LanguageSwitcherManager");
391:                componentSettings
392:                        .put("LanguageSwitcherSettingsName",
393:                                "org.enhydra.jawe.components.languageswitcher.LanguageSwitcherSettings");
394:
395:                // Reconfigurator
396:                componentSettings
397:                        .put("ReconfiguratorClassName",
398:                                "org.enhydra.jawe.components.reconfiguration.ReconfiguratorManager");
399:                componentSettings
400:                        .put("ReconfiguratorSettingsName",
401:                                "org.enhydra.jawe.components.reconfiguration.ReconfiguratorSettings");
402:
403:                // NewPackage
404:                action = new NewPackage(comp);
405:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
406:                        .getResource("org/enhydra/jawe/images/new.gif"));
407:                langDepName = "NewPackage";
408:                ja = new JaWEAction(action, icon, langDepName);
409:                componentAction.put("NewPackage", ja);
410:
411:                // Open
412:                action = new Open(comp);
413:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
414:                        .getResource("org/enhydra/jawe/images/open.gif"));
415:                langDepName = "Open";
416:                ja = new JaWEAction(action, icon, langDepName);
417:                componentAction.put("Open", ja);
418:
419:                // RecentFiles
420:                componentSettings.put("RecentFilesClassName",
421:                        "org.enhydra.jawe.base.recentfiles.RecentFilesManager");
422:                componentSettings
423:                        .put("RecentFilesSettingsName",
424:                                "org.enhydra.jawe.base.recentfiles.RecentFilesSettings");
425:
426:                // Reopen
427:                action = new Reopen(comp);
428:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
429:                        .getResource("org/enhydra/jawe/images/reopen.gif"));
430:                langDepName = "Reopen";
431:                ja = new JaWEAction(action, icon, langDepName);
432:                componentAction.put("Reopen", ja);
433:
434:                // Save
435:                action = new Save(comp);
436:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
437:                        .getResource("org/enhydra/jawe/images/save.gif"));
438:                langDepName = "Save";
439:                ja = new JaWEAction(action, icon, langDepName);
440:                componentAction.put("Save", ja);
441:
442:                // SaveAs
443:                action = new SaveAs(comp);
444:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
445:                        .getResource("org/enhydra/jawe/images/saveas.gif"));
446:                langDepName = "SaveAs";
447:                ja = new JaWEAction(action, icon, langDepName);
448:                componentAction.put("SaveAs", ja);
449:
450:                // Search
451:                try {
452:                    String clsName = "org.enhydra.jawe.base.controller.actions.Search";
453:                    try {
454:                        action = (ActionBase) Class.forName(clsName)
455:                                .getConstructor(
456:                                        new Class[] { JaWEComponent.class })
457:                                .newInstance(new Object[] { comp });
458:                    } catch (Exception e) {
459:                        action = null;
460:                    }
461:                    icon = new ImageIcon(ResourceManager.class.getClassLoader()
462:                            .getResource("org/enhydra/jawe/images/search.png"));
463:                    langDepName = "Search";
464:                    ja = new JaWEAction(action, icon, langDepName);
465:                    componentAction.put("Search", ja);
466:                } catch (Exception ex) {
467:                }
468:
469:                // Package
470:                // PackageApplications
471:                action = new PackageApplications(comp);
472:                icon = new ImageIcon(
473:                        ResourceManager.class
474:                                .getClassLoader()
475:                                .getResource(
476:                                        "org/enhydra/jawe/images/packageapplications.gif"));
477:                langDepName = "PackageApplications";
478:                ja = new JaWEAction(action, icon, langDepName);
479:                componentAction.put("PackageApplications", ja);
480:
481:                // PackageCheckValidity
482:                action = new PackageCheckValidity(comp);
483:                icon = new ImageIcon(
484:                        ResourceManager.class.getClassLoader().getResource(
485:                                "org/enhydra/jawe/images/packagecheck.gif"));
486:                langDepName = "PackageCheckValidity";
487:                ja = new JaWEAction(action, icon, langDepName);
488:                componentAction.put("PackageCheckValidity", ja);
489:
490:                // PackageExternalPackages
491:                action = new PackageExternalPackages(comp);
492:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
493:                        .getResource(
494:                                "org/enhydra/jawe/images/externalpackages.gif"));
495:                langDepName = "PackageExternalPackages";
496:                ja = new JaWEAction(action, icon, langDepName);
497:                componentAction.put("PackageExternalPackages", ja);
498:
499:                // PackageAddExternalPackage
500:                action = new PackageAddExternalPackage(comp);
501:                icon = new ImageIcon(
502:                        ResourceManager.class
503:                                .getClassLoader()
504:                                .getResource(
505:                                        "org/enhydra/jawe/images/externalpackagesadd.gif"));
506:                langDepName = "PackageAddExternalPackage";
507:                ja = new JaWEAction(action, icon, langDepName);
508:                componentAction.put("PackageAddExternalPackage", ja);
509:
510:                // PackageRemoveExternalPackage
511:                action = new PackageRemoveExternalPackage(comp);
512:                icon = new ImageIcon(
513:                        ResourceManager.class
514:                                .getClassLoader()
515:                                .getResource(
516:                                        "org/enhydra/jawe/images/externalpackagesremove.gif"));
517:                langDepName = "PackageRemoveExternalPackage";
518:                ja = new JaWEAction(action, icon, langDepName);
519:                componentAction.put("PackageRemoveExternalPackage", ja);
520:
521:                // PackageNamespaces
522:                action = new PackageNamespaces(comp);
523:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
524:                        .getResource("org/enhydra/jawe/images/namespaces.gif"));
525:                langDepName = "PackageNamespaces";
526:                ja = new JaWEAction(action, icon, langDepName);
527:                componentAction.put("PackageNamespaces", ja);
528:
529:                // PackageNewProcess
530:                action = new PackageNewProcess(comp);
531:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
532:                        .getResource("org/enhydra/jawe/images/processnew.gif"));
533:                langDepName = "PackageNewProcess";
534:                ja = new JaWEAction(action, icon, langDepName);
535:                componentAction.put("PackageNewProcess", ja);
536:
537:                // PackageParticipants
538:                action = new PackageParticipants(comp);
539:                icon = new ImageIcon(
540:                        ResourceManager.class
541:                                .getClassLoader()
542:                                .getResource(
543:                                        "org/enhydra/jawe/images/packageparticipants.gif"));
544:                langDepName = "PackageParticipants";
545:                ja = new JaWEAction(action, icon, langDepName);
546:                componentAction.put("PackageParticipants", ja);
547:
548:                // PackageProcesses
549:                action = new PackageProcesses(comp);
550:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
551:                        .getResource("org/enhydra/jawe/images/processes.gif"));
552:                langDepName = "PackageProcesses";
553:                ja = new JaWEAction(action, icon, langDepName);
554:                componentAction.put("PackageProcesses", ja);
555:
556:                // PackageProperties
557:                action = new PackageProperties(comp);
558:                icon = new ImageIcon(
559:                        ResourceManager.class
560:                                .getClassLoader()
561:                                .getResource(
562:                                        "org/enhydra/jawe/images/packageproperties.gif"));
563:                langDepName = "PackageProperties";
564:                ja = new JaWEAction(action, icon, langDepName);
565:                componentAction.put("PackageProperties", ja);
566:
567:                // PackageTypeDeclarations
568:                action = new PackageTypeDeclarations(comp);
569:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
570:                        .getResource(
571:                                "org/enhydra/jawe/images/typedeclarations.gif"));
572:                langDepName = "PackageTypeDeclarations";
573:                ja = new JaWEAction(action, icon, langDepName);
574:                componentAction.put("PackageTypeDeclarations", ja);
575:
576:                // PackageWorkflowRelevantData
577:                action = new PackageWorkflowRelevantData(comp);
578:                icon = new ImageIcon(
579:                        ResourceManager.class
580:                                .getClassLoader()
581:                                .getResource(
582:                                        "org/enhydra/jawe/images/packageworkflowrelevantdata.gif"));
583:                langDepName = "PackageWorkflowRelevantData";
584:                ja = new JaWEAction(action, icon, langDepName);
585:                componentAction.put("PackageWorkflowRelevantData", ja);
586:
587:                // PackageReferredDocument
588:                action = new PackageReferredDocument(comp);
589:                icon = new ImageIcon(
590:                        ResourceManager.class
591:                                .getClassLoader()
592:                                .getResource(
593:                                        "org/enhydra/jawe/images/referred_document.png"));
594:                langDepName = "PackageReferredDocument";
595:                ja = new JaWEAction(action, icon, langDepName);
596:                componentAction.put(action.getValue(Action.NAME), ja);
597:
598:                // Process
599:                // ProcessActivitiesOverview
600:                action = new ProcessActivitiesOverview(comp);
601:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
602:                        .getResource("org/enhydra/jawe/images/activities.gif"));
603:                langDepName = "ProcessActivitiesOverview";
604:                ja = new JaWEAction(action, icon, langDepName);
605:                componentAction.put("ProcessActivitiesOverview", ja);
606:
607:                // ProcessActivitySetsOverview
608:                action = new ProcessActivitySetsOverview(comp);
609:                icon = new ImageIcon(
610:                        ResourceManager.class.getClassLoader().getResource(
611:                                "org/enhydra/jawe/images/activitysets.gif"));
612:                langDepName = "ProcessActivitySetsOverview";
613:                ja = new JaWEAction(action, icon, langDepName);
614:                componentAction.put("ProcessActivitySetsOverview", ja);
615:
616:                // ProcessApplications
617:                action = new ProcessApplications(comp);
618:                icon = new ImageIcon(
619:                        ResourceManager.class
620:                                .getClassLoader()
621:                                .getResource(
622:                                        "org/enhydra/jawe/images/processapplications.gif"));
623:                langDepName = "ProcessApplications";
624:                ja = new JaWEAction(action, icon, langDepName);
625:                componentAction.put("ProcessApplications", ja);
626:
627:                // ProcessFormalParameters
628:                action = new ProcessFormalParameters(comp);
629:                icon = new ImageIcon(
630:                        ResourceManager.class
631:                                .getClassLoader()
632:                                .getResource(
633:                                        "org/enhydra/jawe/images/processformalparameters.gif"));
634:                langDepName = "ProcessFormalParameters";
635:                ja = new JaWEAction(action, icon, langDepName);
636:                componentAction.put("ProcessFormalParameters", ja);
637:
638:                // ProcessParticipants
639:                action = new ProcessParticipants(comp);
640:                icon = new ImageIcon(
641:                        ResourceManager.class
642:                                .getClassLoader()
643:                                .getResource(
644:                                        "org/enhydra/jawe/images/processparticipants.gif"));
645:                langDepName = "ProcessParticipants";
646:                ja = new JaWEAction(action, icon, langDepName);
647:                componentAction.put("ProcessParticipants", ja);
648:
649:                // ProcessProperties
650:                action = new ProcessProperties(comp);
651:                icon = new ImageIcon(
652:                        ResourceManager.class
653:                                .getClassLoader()
654:                                .getResource(
655:                                        "org/enhydra/jawe/images/processproperties.gif"));
656:                langDepName = "ProcessProperties";
657:                ja = new JaWEAction(action, icon, langDepName);
658:                componentAction.put("ProcessProperties", ja);
659:
660:                // ProcessTransitionsOverview
661:                action = new ProcessTransitionsOverview(comp);
662:                icon = new ImageIcon(ResourceManager.class.getClassLoader()
663:                        .getResource("org/enhydra/jawe/images/transitions.gif"));
664:                langDepName = "ProcessTransitionsOverview";
665:                ja = new JaWEAction(action, icon, langDepName);
666:                componentAction.put("ProcessTransitionsOverview", ja);
667:
668:                // ProcessWorkflowRelevantData
669:                action = new ProcessWorkflowRelevantData(comp);
670:                icon = new ImageIcon(
671:                        ResourceManager.class
672:                                .getClassLoader()
673:                                .getResource(
674:                                        "org/enhydra/jawe/images/processworkflowrelevantdata.gif"));
675:                langDepName = "ProcessWorkflowRelevantData";
676:                ja = new JaWEAction(action, icon, langDepName);
677:                componentAction.put("ProcessWorkflowRelevantData", ja);
678:
679:                // External Packages
680:                // External Applications
681:                action = new ExternalApplications(comp);
682:                icon = new ImageIcon(
683:                        ResourceManager.class
684:                                .getClassLoader()
685:                                .getResource(
686:                                        "org/enhydra/jawe/images/externalapplications.gif"));
687:                langDepName = "ExternalApplications";
688:                ja = new JaWEAction(action, icon, langDepName);
689:                componentAction.put("ExternalApplications", ja);
690:
691:                // ExternalParticipants
692:                action = new ExternalParticipants(comp);
693:                icon = new ImageIcon(
694:                        ResourceManager.class
695:                                .getClassLoader()
696:                                .getResource(
697:                                        "org/enhydra/jawe/images/externalparticipants.gif"));
698:                langDepName = "ExternalParticipants";
699:                ja = new JaWEAction(action, icon, langDepName);
700:                componentAction.put("ExternalParticipants", ja);
701:
702:                // ExternalProcesses
703:                action = new ExternalProcesses(comp);
704:                icon = new ImageIcon(
705:                        ResourceManager.class
706:                                .getClassLoader()
707:                                .getResource(
708:                                        "org/enhydra/jawe/images/externalprocesses.gif"));
709:                langDepName = "ExternalProcesses";
710:                ja = new JaWEAction(action, icon, langDepName);
711:                componentAction.put("ExternalProcesses", ja);
712:            }
713:
714:            public String getMainMenuActionOrder() {
715:                return (String) componentSettings.get("MainMenu");
716:            }
717:
718:            public String getMenuActionOrder(String menuName) {
719:                return (String) componentSettings.get(menuName + "Menu");
720:            }
721:
722:            public String getToolbarActionOrder(String toolbarName) {
723:                return (String) componentSettings.get(toolbarName + "Toolbar");
724:            }
725:
726:            public boolean allowInvalidPackageSaving() {
727:                return ((Boolean) componentSettings
728:                        .get("AllowInvalidPackageSaving")).booleanValue();
729:            }
730:
731:            public boolean isDesingTimeValidationEnabled() {
732:                return ((Boolean) componentSettings.get("DesignTimeValidation"))
733:                        .booleanValue();
734:            }
735:
736:            public boolean isInitialXPDLValidationEnabled() {
737:                return ((Boolean) componentSettings
738:                        .get("InitialXPDLValidation")).booleanValue();
739:            }
740:
741:            public boolean shoudAskOnDeletion() {
742:                return ((Boolean) componentSettings.get("AskOnDeletion"))
743:                        .booleanValue();
744:            }
745:
746:            public boolean shouldAskOnDeletionOfReferencedElements() {
747:                return ((Boolean) componentSettings
748:                        .get("AskOnDeletionOfReferencedElements"))
749:                        .booleanValue();
750:            }
751:
752:            public boolean shoudStartMaximized() {
753:                return ((Boolean) componentSettings.get("StartMaximized"))
754:                        .booleanValue();
755:            }
756:
757:            public boolean showTooltip() {
758:                return ((Boolean) componentSettings.get("ShowTooltip"))
759:                        .booleanValue();
760:            }
761:
762:            public String undoHistoryManagerClass() {
763:                return (String) componentSettings
764:                        .get("UndoHistoryManager.Class");
765:            }
766:
767:            public int undoHistorySize() {
768:                return ((Integer) componentSettings.get("UndoHistorySize"))
769:                        .intValue();
770:            }
771:
772:            public String getEncoding() {
773:                return (String) componentSettings.get("Encoding");
774:            }
775:
776:            public String getFrameSettings() {
777:                return (String) componentSettings.get("FrameSettings");
778:            }
779:
780:            public String getDefaultActionsEditOrder() {
781:                return (String) componentSettings
782:                        .get("DefaultActionsEditOrder");
783:            }
784:
785:            public String getResolverTypeClassName() {
786:                return (String) componentSettings.get("TypeResolverClass");
787:            }
788:
789:            public String doNotAskOnDeletionOfReferencedElementTypes() {
790:                return (String) componentSettings
791:                        .get("DoNotAskOnDeletionOfReferencedElementTypes");
792:            }
793:
794:            public int getMainDividerLocation() {
795:                return ((Integer) componentSettings.get("MainDividerLocation"))
796:                        .intValue();
797:            }
798:
799:            public int getFirstSmallDividerLocation() {
800:                return ((Integer) componentSettings
801:                        .get("FirstSmallDividerLocation")).intValue();
802:            }
803:
804:            public int getSecondSmallDividerLocation() {
805:                return ((Integer) componentSettings
806:                        .get("SecondSmallDividerLocation")).intValue();
807:            }
808:
809:            public ImageIcon getApplicationIcon() {
810:                return (ImageIcon) componentSettings.get("ApplicationIcon");
811:            }
812:
813:            public ImageIcon getIconFor(String actionName) {
814:                return (ImageIcon) componentSettings.get("DefaultImage"
815:                        + actionName);
816:            }
817:
818:            public ImageIcon getSponsore1LogoIcon() {
819:                return (ImageIcon) componentSettings.get("Sponsore1Logo");
820:            }
821:
822:            public ImageIcon getSponsore2LogoIcon() {
823:                return (ImageIcon) componentSettings.get("Sponsore2Logo");
824:            }
825:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.