controllersettings.java
来自「jawe的最新版本,基于Java的图形化工作流编辑器。图形化工作流编辑器 。使用」· Java 代码 · 共 707 行 · 第 1/3 页
JAVA
707 行
loadDefaultMenusToolbarsAndActions(comp); componentSettings.putAll(Utils.loadAllMenusAndToolbars(properties)); componentAction.putAll(Utils.loadActions(properties, comp, componentAction)); List compAct = ResourceManager.getResourceStrings(properties, "Action.JaWEComponentClass.", false); for (int i = 0; i < compAct.size(); i++) { String className = ResourceManager.getResourceString(properties, "Action.JaWEComponentClass." + compAct.get(i)); componentSettings.put(compAct.get(i) + "ClassName", className); } // ******** } protected void loadDefaultMenusToolbarsAndActions(JaWEComponent comp) { // menu componentSettings.put("FileMenu", "NewPackage Open Reopen Close - Save SaveAs - @RecentFiles - Exit"); componentSettings.put("FileLangName", "file"); componentSettings.put("SearchMenu", "Search jaweAction_References"); componentSettings.put("SearchLangName", "search"); componentSettings.put("PackageMenu", "PackageCheckValidity - PackageNewProcess - PackageNamespaces PackageProperties PackageProcesses PackageExternalPackages PackageAddExternalPackage PackageRemoveExternalPackage PackageTypeDeclarations PackageParticipants PackageApplications PackageWorkflowRelevantData PackageReferredDocument"); componentSettings.put("PackageLangName", "package"); componentSettings.put("ProcessMenu", "ProcessProperties ProcessParticipants ProcessApplications ProcessWorkflowRelevantData ProcessFormalParameters - ProcessActivitySetsOverview ProcessActivitiesOverview ProcessTransitionsOverview"); componentSettings.put("ProcessLangName", "process"); componentSettings.put("ExternalPackagesMenu", "ExternalParticipants ExternalProcesses ExternalApplications"); componentSettings.put("ExternalPackagesLangName", "externalPackage"); componentSettings.put("SettingsMenu", "@LanguageSwitcher @Reconfigurator"); componentSettings.put("SettingsLangName", "settings"); componentSettings.put("HelpMenu", "HelpManual HelpAbout"); componentSettings.put("HelpLangName", "help"); // toolbar componentSettings.put("defaultToolbarToolbar", "*filetoolbar jawe_edittoolbar *searchtoolbar *packagetoolbar *externaltoolbar *processtoolbar"); componentSettings.put("filetoolbarToolbar", "NewPackage Open Reopen Close - Save SaveAs - Exit"); componentSettings.put("searchtoolbarToolbar", "Search jaweAction_References"); componentSettings.put("packagetoolbarToolbar", "PackageCheckValidity - PackageNewProcess - PackageNamespaces PackageProperties PackageProcesses PackageExternalPackages PackageAddExternalPackage PackageRemoveExternalPackage PackageTypeDeclarations PackageParticipants PackageApplications PackageWorkflowRelevantData"); componentSettings.put("processtoolbarToolbar", "ProcessProperties ProcessParticipants ProcessApplications ProcessWorkflowRelevantData ProcessFormalParameters"); componentSettings.put("externaltoolbarToolbar", "ExternalParticipants ExternalProcesses ExternalApplications"); // actions ActionBase action; ImageIcon icon; String langDepName; JaWEAction ja; // Close action = new Close(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/close.gif")); langDepName = "Close"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("Close", ja); // Exit action = new Exit(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/exit.gif")); langDepName = "Exit"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("Exit", ja); // HelpAbout action = new HelpAbout(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/jawe.gif")); langDepName = "HelpAbout"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("HelpAbout", ja); // HelpManual try { String clsName = "org.enhydra.jawe.base.controller.actions.HelpManual"; try { action = (ActionBase) Class.forName(clsName).getConstructor(new Class[] { JaWEComponent.class }).newInstance(new Object[] { comp }); } catch (Exception e) { action = null; } icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/manual.gif")); langDepName = "HelpManual"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("HelpManual", ja); } catch (Exception ex) { } // Language Switcher componentSettings.put("LanguageSwitcherClassName", "org.enhydra.jawe.components.languageswitcher.LanguageSwitcherManager"); componentSettings.put("LanguageSwitcherSettingsName", "org.enhydra.jawe.components.languageswitcher.LanguageSwitcherSettings"); // Reconfigurator componentSettings.put("ReconfiguratorClassName", "org.enhydra.jawe.components.reconfiguration.ReconfiguratorManager"); componentSettings.put("ReconfiguratorSettingsName", "org.enhydra.jawe.components.reconfiguration.ReconfiguratorSettings"); // NewPackage action = new NewPackage(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/new.gif")); langDepName = "NewPackage"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("NewPackage", ja); // Open action = new Open(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/open.gif")); langDepName = "Open"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("Open", ja); // RecentFiles componentSettings.put("RecentFilesClassName", "org.enhydra.jawe.base.recentfiles.RecentFilesManager"); componentSettings.put("RecentFilesSettingsName", "org.enhydra.jawe.base.recentfiles.RecentFilesSettings"); // Reopen action = new Reopen(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/reopen.gif")); langDepName = "Reopen"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("Reopen", ja); // Save action = new Save(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/save.gif")); langDepName = "Save"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("Save", ja); // SaveAs action = new SaveAs(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/saveas.gif")); langDepName = "SaveAs"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("SaveAs", ja); // Search try { String clsName = "org.enhydra.jawe.base.controller.actions.Search"; try { action = (ActionBase) Class.forName(clsName).getConstructor(new Class[] { JaWEComponent.class }).newInstance(new Object[] { comp }); } catch (Exception e) { action = null; } icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/search.png")); langDepName = "Search"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("Search", ja); } catch (Exception ex) { } // Package // PackageApplications action = new PackageApplications(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/packageapplications.gif")); langDepName = "PackageApplications"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("PackageApplications", ja); // PackageCheckValidity action = new PackageCheckValidity(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/packagecheck.gif")); langDepName = "PackageCheckValidity"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("PackageCheckValidity", ja); // PackageExternalPackages action = new PackageExternalPackages(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/externalpackages.gif")); langDepName = "PackageExternalPackages"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("PackageExternalPackages", ja); // PackageAddExternalPackage action = new PackageAddExternalPackage(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/externalpackagesadd.gif")); langDepName = "PackageAddExternalPackage"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("PackageAddExternalPackage", ja); // PackageRemoveExternalPackage action = new PackageRemoveExternalPackage(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/externalpackagesremove.gif")); langDepName = "PackageRemoveExternalPackage"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("PackageRemoveExternalPackage", ja); // PackageNamespaces action = new PackageNamespaces(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/namespaces.gif")); langDepName = "PackageNamespaces"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("PackageNamespaces", ja); // PackageNewProcess action = new PackageNewProcess(comp); icon = new ImageIcon(ResourceManager.class.getClassLoader() .getResource("org/enhydra/jawe/images/processnew.gif")); langDepName = "PackageNewProcess"; ja = new JaWEAction(action, icon, langDepName); componentAction.put("PackageNewProcess", ja); // PackageParticipants
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?