Package org.enhydra.jawe

Examples of org.enhydra.jawe.JaWEAction


            String message = getSuggestionMessage(error, ResourceManager.getLanguageDependentString("GUIDE_ERROR_START_END"));
            int result = JOptionPane.showConfirmDialog(this.getRootPane(), message, ResourceManager.getLanguageDependentString("GUIDE_TITLE"), JOptionPane.YES_NO_OPTION);
            if (result == JOptionPane.YES_OPTION) {
                // insert missing start/end
                GraphController gc = (GraphController)JaWEManager.getInstance().getComponentManager().getComponent("GraphComponent");
                JaWEAction action = gc.getGraphSettings().getAction("InsertMissingStartAndEndBubbles");
                action.getAction().actionPerformed(null);
            }

        } else if (error.equals(ResourceManager.getLanguageDependentString("WARNING_CONDITIONAL_TRANSITION_WITHOUT_EXPRESSION"))
                || error.equals(ResourceManager.getLanguageDependentString("WARNING_EXCEPTION_TRANSITION_WITHOUT_EXPRESSION"))
                || error.equals(ResourceManager.getLanguageDependentString("WARNING_UNCONDITIONAL_TRANSITION_WITH_EXPRESSION"))
View Full Code Here


        for (int j = 0; j < act.length; j++) {
            if (act[j].equals(BarFactory.ACTION_SEPARATOR)) {
                toolbar.addSeparator();
            } else if (act[j].equals("SetSelectMode")) {
                JaWEAction ja = new JaWEAction();
                ja.setAction(new SetSelectMode(controller));
                ja.setIcon(((GraphSettings) controller.getSettings()).getSelectionIcon());
                ja.setLangDepName(controller.getSettings().getLanguageDependentString("SelectionKey"));
                JButton b = BarFactory.createToolbarButton(ja, controller);
                decorateToolboxButton(b, ja);
                toolbar.add(b);
                controller.getSettings().addAction("SetSelectMode", ja);
            } else if (act[j].equals("SetParticipantModeCommonExpression")) {
                JaWEAction ja = new JaWEAction();
                try {
                    String clsName = "org.enhydra.jawe.components.graph.actions.SetParticipantModeCommonExpression";
                    ActionBase action = (ActionBase) Class.forName(clsName).getConstructor(new Class[]{
                                GraphController.class
                            }).newInstance(new Object[]{
                                controller
                            });
                    ja.setAction(action);
                } catch (Exception ex) {
                }
                ja.setIcon(((GraphSettings) controller.getSettings()).getCommonExpresionParticipantIcon());
                ja.setLangDepName(controller.getSettings().getLanguageDependentString("CommonExpressionParticipantKey"));
                JButton b = BarFactory.createToolbarButton(ja, controller);
                decorateToolboxButton(b, ja);
                toolbar.add(b);
                controller.getSettings().addAction("SetParticipantModeCommonExpression", ja);
            } else if (act[j].equals("SetParticipantModeFreeTextExpression")) {
                JaWEAction ja = new JaWEAction();
                ja.setAction(new SetParticipantModeFreeTextExpression(controller));
                ja.setIcon(((GraphSettings) controller.getSettings()).getFreeTextParticipantIcon());
                ja.setLangDepName(controller.getSettings().getLanguageDependentString("FreeTextExpressionParticipantKey"));
                JButton b = BarFactory.createToolbarButton(ja, controller);
                decorateToolboxButton(b, ja);
                toolbar.add(b);
                controller.getSettings().addAction("SetParticipantModeFreeTextExpression", ja);
            } //CUSTOM
            else if (act[j].equals("SetStartMode")) {
                JaWEAction ja = new JaWEAction();
                ja.setAction(new SetStartMode(controller));
                ja.setIcon(((GraphSettings) controller.getSettings()).getBubbleStartIcon());
                ja.setLangDepName(controller.getSettings().getLanguageDependentString("StartBubbleKey"));
                JButton b = BarFactory.createToolbarButton(ja, controller);
                decorateToolboxButton(b, ja);
                toolbar.add(b);
                controller.getSettings().addAction("SetStartMode", ja);
            } else if (act[j].equals("SetEndMode")) {
                JaWEAction ja = new JaWEAction();
                ja.setAction(new SetEndMode(controller));
                ja.setIcon(((GraphSettings) controller.getSettings()).getBubbleEndIcon());
                ja.setLangDepName(controller.getSettings().getLanguageDependentString("EndBubbleKey"));
                JButton b = BarFactory.createToolbarButton(ja, controller);
                decorateToolboxButton(b, ja);
                toolbar.add(b);
                controller.getSettings().addAction("SetEndMode", ja);
                //END CUSTOM
            } else if (act[j].startsWith("SetParticipantMode")) {
                String type = act[j].substring("SetParticipantMode".length());
                if (type.equals("*")) {
                    List parTypes = jts.getTypes(Participant.class);
                    for (int i = 0; i < parTypes.size(); i++) {
                        JaWEType jt = (JaWEType) parTypes.get(i);
                        JaWEAction ja = new JaWEAction();
                        ja.setAction(new SetParticipantMode(controller, jt.getTypeId()));
                        ja.setIcon(jt.getIcon());
                        ja.setLangDepName(jt.getDisplayName());
                        JButton b = BarFactory.createToolbarButton(ja, controller);
                        decorateToolboxButton(b, ja);
                        toolbar.add(b);
                        controller.getSettings().addAction(jt.getTypeId(), ja);
                    }
                } else if (!(type.equals("SetParticipantModeCommonExpression") || type.equals("SetParticipantModeFreeTextExpression"))) {
                    JaWEType jt = jts.getType(type);
                    if (jt == null) {
                        continue;
                    }
                    JaWEAction ja = new JaWEAction();
                    ja.setAction(new SetParticipantMode(controller, jt.getTypeId()));
                    ja.setIcon(jt.getIcon());
                    ja.setLangDepName(jt.getDisplayName());
                    JButton b = BarFactory.createToolbarButton(ja, controller);
                    decorateToolboxButton(b, ja);
                    toolbar.add(b);
                    controller.getSettings().addAction(jt.getTypeId(), ja);
                }
            } else if (act[j].startsWith("SetActivityMode")) {
                String type = act[j].substring("SetActivityMode".length());
                if (type.equals("*")) {
                    List actTypes = jts.getTypes(Activity.class);
                    for (int i = 0; i < actTypes.size(); i++) {
                        JaWEType jt = (JaWEType) actTypes.get(i);
                        JaWEAction ja = new JaWEAction();
                        ja.setAction(new SetActivityMode(controller, jt.getTypeId()));
                        ja.setIcon(jt.getIcon());
                        ja.setLangDepName(jt.getDisplayName());
                        JButton b = BarFactory.createToolbarButton(ja, controller);
                        decorateToolboxButton(b, ja);
                        toolbar.add(b);
                        controller.getSettings().addAction(jt.getTypeId(), ja);
                    }
                } else {
                    JaWEType jt = jts.getType(type);
                    if (jt == null) {
                        continue;
                    }
                    JaWEAction ja = new JaWEAction();
                    ja.setAction(new SetActivityMode(controller, jt.getTypeId()));
                    ja.setIcon(jt.getIcon());
                    ja.setLangDepName(jt.getDisplayName());
                    JButton b = BarFactory.createToolbarButton(ja, controller);
                    decorateToolboxButton(b, ja);
                    toolbar.add(b);
                    controller.getSettings().addAction(jt.getTypeId(), ja);
                }
            } else if (act[j].startsWith("SetTransitionMode")) {
                String type = act[j].substring("SetTransitionMode".length());
                if (type.equals("*")) {
                    List traTypes = jts.getTypes(Transition.class);
                    for (int i = 0; i < traTypes.size(); i++) {
                        JaWEType jt = (JaWEType) traTypes.get(i);
                        JaWEAction ja = new JaWEAction();
                        ja.setAction(new SetTransitionMode(controller, jt.getTypeId()));
                        ja.setIcon(jt.getIcon());
                        ja.setLangDepName(jt.getDisplayName());
                        JButton b = BarFactory.createToolbarButton(ja, controller);
                        decorateToolboxButton(b, ja);
                        toolbar.add(b);
                        controller.getSettings().addAction(jt.getTypeId(), ja);
                    }
                } else {
                    JaWEType jt = jts.getType(type);
                    if (jt == null) {
                        continue;
                    }
                    JaWEAction ja = new JaWEAction();
                    ja.setAction(new SetTransitionMode(controller, jt.getTypeId()));
                    ja.setIcon(jt.getIcon());
                    ja.setLangDepName(jt.getDisplayName());
                    JButton b = BarFactory.createToolbarButton(ja, controller);
                    decorateToolboxButton(b, ja);
                    toolbar.add(b);
                    controller.getSettings().addAction(jt.getTypeId(), ja);
                }
View Full Code Here

        // actions
        ActionBase action = null;
        ImageIcon icon;
        String langDepName;
        JaWEAction ja;

        // SetPerformerExpression
        try {
            String clsName = "org.enhydra.jawe.components.graph.actions.SetPerformerExpression";
            try {
                action = (ActionBase) Class.forName(clsName).getConstructor(new Class[]{
                            JaWEComponent.class
                        }).newInstance(new Object[]{
                            comp
                        });
            } catch (Exception e) {
            }
            icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/commonexpparticipantsetexp.png"));
            langDepName = "SetPerformerExpression";
            ja = new JaWEAction(action, icon, langDepName);
            componentAction.put(langDepName, ja);
        } catch (Exception ex) {
        }
        // ActualSize
        action = new ActualSize(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/actualsize.gif"));
        langDepName = "ActualSize";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // ActivityReferredDocument
        action = new ActivityReferredDocument(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/referred_document.png"));
        langDepName = "ActivityReferredDocument";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SelectConnectingTransitionsForSelectedActivities
        try {
            String clsName = "org.enhydra.jawe.components.graph.actions.SelectConnectingTransitionsForSelectedActivities";
            try {
                action = (ActionBase) Class.forName(clsName).getConstructor(new Class[]{
                            JaWEComponent.class
                        }).newInstance(new Object[]{
                            comp
                        });
            } catch (Exception e) {
                action = null;
            }
            icon = null;
            langDepName = "SelectConnectingTransitionsForSelectedActivities";
            ja = new JaWEAction(action, icon, langDepName);
            componentAction.put(langDepName, ja);
        } catch (Exception ex) {
        }

        // AddPoint
        action = new AddPoint(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/addpoint.gif"));
        langDepName = "AddPoint";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // DescendInto
        action = new DescendInto(comp);
        langDepName = "DescendInto";
        ja = new JaWEAction(action, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // GraphPaste
        action = new GraphPaste(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/paste.gif"));
        langDepName = "Paste";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // InsertActivitySet
        action = new InsertActivitySet(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/activitysetnew.gif"));
        langDepName = "InsertActivitySet";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // MoveDownParticipant
        action = new MoveDownParticipant(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/participantdownright.gif"));
        langDepName = "MoveDownParticipant";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // MoveUpParticipant
        action = new MoveUpParticipant(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/participantupleft.gif"));
        langDepName = "MoveUpParticipant";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // NextGraph
        action = new NextGraph(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/nav_right_red.png"));
        langDepName = "NextGraph";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // PreviousGraph
        action = new PreviousGraph(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/nav_left_red.png"));
        langDepName = "PreviousGraph";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // InsertMissingStartAndEndBubbles
        action = new InsertMissingStartAndEndBubbles(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/startend.gif"));
        langDepName = "InsertMissingStartAndEndBubbles";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // RemoveStartAndEndBubbles
        action = new RemoveStartAndEndBubbles(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/startend_remove.gif"));
        langDepName = "RemoveStartAndEndBubbles";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // RemoveParticipant
        action = new RemoveParticipant(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/participantremove.png"));
        langDepName = "RemoveParticipant";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // RemovePoint
        action = new RemovePoint(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/removepoint.gif"));
        langDepName = "RemovePoint";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // RotateProcess
        try {
            String clsName = "org.enhydra.jawe.components.graph.actions.RotateProcess";
            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/process_rotate.gif"));
            langDepName = "RotateProcess";
            ja = new JaWEAction(action, icon, langDepName);
            componentAction.put(langDepName, ja);
        } catch (Exception ex) {
        }

        // SimpleGraphLayout
        action = new SimpleGraphLayout(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/graph_layout.png"));
        langDepName = "SimpleGraphLayout";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SaveAsJPG
        action = new SaveAsJPG(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/saveasjpg.gif"));
        langDepName = "SaveAsJPG";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SaveAsSVG
        action = new SaveAsSVG(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/saveassvg.gif"));
        langDepName = "SaveAsSVG";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SetTransitionStyleNoRoutingBezier
        action = new SetTransitionStyleNoRoutingBezier(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/transitionbezier.gif"));
        langDepName = "SetTransitionStyleNoRoutingBezier";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SetTransitionStyleNoRoutingOrthogonal
        action = new SetTransitionStyleNoRoutingOrthogonal(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/transitionortogonal.gif"));
        langDepName = "SetTransitionStyleNoRoutingOrthogonal";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SetTransitionStyleNoRoutingSpline
        action = new SetTransitionStyleNoRoutingSpline(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/transitionspline.gif"));
        langDepName = "SetTransitionStyleNoRoutingSpline";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SetTransitionStyleSimpleRoutingBezier
        action = new SetTransitionStyleNoRoutingBezier(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/transitionbeziersr.gif"));
        langDepName = "SetTransitionStyleSimpleRoutingBezier";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SetTransitionStyleSimpleRoutingOrthogonal
        action = new SetTransitionStyleSimpleRoutingOrthogonal(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/transitionortogonalsr.gif"));
        langDepName = "SetTransitionStyleSimpleRoutingOrthogonal";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SetTransitionStyleSimpleRoutingSpline
        action = new SetTransitionStyleSimpleRoutingSpline(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/transitionsplinesr.gif"));
        langDepName = "SetTransitionStyleSimpleRoutingSpline";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // SelectConnectingActivitiesForSelectedTransitions
        try {
            String clsName = "org.enhydra.jawe.components.graph.actions.SelectConnectingActivitiesForSelectedTransitions";
            try {
                action = (ActionBase) Class.forName(clsName).getConstructor(new Class[]{
                            JaWEComponent.class
                        }).newInstance(new Object[]{
                            comp
                        });
            } catch (Exception e) {
                action = null;
            }
            icon = null;
            langDepName = "SelectConnectingActivitiesForSelectedTransitions";
            ja = new JaWEAction(action, icon, langDepName);
            componentAction.put(langDepName, ja);
        } catch (Exception ex) {
        }

        // ZoomIn
        action = new ZoomIn(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/zoomin.gif"));
        langDepName = "ZoomIn";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // ZoomOut
        action = new ZoomOut(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/zoomout.gif"));
        langDepName = "ZoomOut";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);
    }
View Full Code Here

        // actions
        ActionBase action;
        ImageIcon icon;
        String langDepName;
        JaWEAction ja;

        // CollapseAll
        action = new CollapseAll(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/collapseall.png"));
        langDepName = "CollapseAll";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // ExpandAll
        action = new ExpandAll(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/expandall.png"));
        langDepName = "ExpandAll";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        //CUSTOM
        //NewProcess
        action = new NewProcess(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/processnew.gif"));
        langDepName = "NewProcess";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);
        //END CUSTOM
    }
View Full Code Here

        // 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);

        //CUSTOM
        action = new Deploy(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/new.gif"));
        langDepName = "Deploy";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("Deploy", ja);
        //END CUSTOM

        // 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
        action = new PackageParticipants(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/packageparticipants.gif"));
        langDepName = "PackageParticipants";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("PackageParticipants", ja);

        // PackageProcesses
        action = new PackageProcesses(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/processes.gif"));
        langDepName = "PackageProcesses";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("PackageProcesses", ja);

        // PackageProperties
        action = new PackageProperties(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/packageproperties.gif"));
        langDepName = "PackageProperties";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("PackageProperties", ja);

        // PackageTypeDeclarations
        action = new PackageTypeDeclarations(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/typedeclarations.gif"));
        langDepName = "PackageTypeDeclarations";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("PackageTypeDeclarations", ja);

        // PackageWorkflowRelevantData
        action = new PackageWorkflowRelevantData(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/packageworkflowrelevantdata.gif"));
        langDepName = "PackageWorkflowRelevantData";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("PackageWorkflowRelevantData", ja);

        // PackageReferredDocument
        action = new PackageReferredDocument(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/referred_document.png"));
        langDepName = "PackageReferredDocument";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put(action.getValue(Action.NAME), ja);

        // Process
        // ProcessActivitiesOverview
        action = new ProcessActivitiesOverview(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/activities.gif"));
        langDepName = "ProcessActivitiesOverview";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ProcessActivitiesOverview", ja);

        // ProcessActivitySetsOverview
        action = new ProcessActivitySetsOverview(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/activitysets.gif"));
        langDepName = "ProcessActivitySetsOverview";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ProcessActivitySetsOverview", ja);

        // ProcessApplications
        action = new ProcessApplications(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/processapplications.gif"));
        langDepName = "ProcessApplications";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ProcessApplications", ja);

        // ProcessFormalParameters
        action = new ProcessFormalParameters(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/processformalparameters.gif"));
        langDepName = "ProcessFormalParameters";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ProcessFormalParameters", ja);

        // ProcessParticipants
        action = new ProcessParticipants(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/processparticipants.gif"));
        langDepName = "ProcessParticipants";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ProcessParticipants", ja);

        // ProcessProperties
        action = new ProcessProperties(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/processproperties.gif"));
        langDepName = "ProcessProperties";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ProcessProperties", ja);

        // ProcessTransitionsOverview
        action = new ProcessTransitionsOverview(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/transitions.gif"));
        langDepName = "ProcessTransitionsOverview";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ProcessTransitionsOverview", ja);

        // ProcessWorkflowRelevantData
        action = new ProcessWorkflowRelevantData(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/processworkflowrelevantdata.gif"));
        langDepName = "ProcessWorkflowRelevantData";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ProcessWorkflowRelevantData", ja);

        // External Packages
        // External Applications
        action = new ExternalApplications(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/externalapplications.gif"));
        langDepName = "ExternalApplications";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ExternalApplications", ja);

        // ExternalParticipants
        action = new ExternalParticipants(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/externalparticipants.gif"));
        langDepName = "ExternalParticipants";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ExternalParticipants", ja);

        // ExternalProcesses
        action = new ExternalProcesses(comp);
        icon = new ImageIcon(ResourceManager.class.getClassLoader().getResource("org/enhydra/jawe/images/externalprocesses.gif"));
        langDepName = "ExternalProcesses";
        ja = new JaWEAction(action, icon, langDepName);
        componentAction.put("ExternalProcesses", ja);
    }
View Full Code Here

TOP

Related Classes of org.enhydra.jawe.JaWEAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.