Package org.enhydra.jawe.base.controller

Examples of org.enhydra.jawe.base.controller.JaWEType


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

        toolbar.setName(controller.getSettings().getLanguageDependentString(toolbarName + BarFactory.LABEL_POSTFIX));
View Full Code Here

TOP

Related Classes of org.enhydra.jawe.base.controller.JaWEType

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.