Package org.enhydra.jawe.base.controller

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


        deployButton.setPreferredSize(new Dimension(200, 25));
        deployButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("org/enhydra/jawe/images/packagecheck.gif")));
        add(deployButton, BorderLayout.SOUTH);

        // add scrollpane
        final JaWEFrame jf = JaWEManager.getInstance().getJaWEController().getJaWEFrame();
        JScrollPane scrollPane = new JScrollPane();
        scrollPane.setAlignmentX(Component.LEFT_ALIGNMENT);
        scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        add(scrollPane, BorderLayout.CENTER);
View Full Code Here


    public void insertElement(Point whereTo) {
        // if activity is selected
        if (isActivityButtonSelected()) {
            if (!getGraphManager().doesRootParticipantExist()) {
                JaWEFrame frame = JaWEManager.getInstance().getJaWEController().getJaWEFrame();
                JOptionPane.showMessageDialog(frame, getGraphController().getSettings().getLanguageDependentString(
                        "WarningInvalidOperation"), frame.getAppTitle(),
                        JOptionPane.WARNING_MESSAGE);

            } else {
                GraphParticipantInterface gpar = getGraphManager().findParentActivityParticipantForLocation(whereTo, null,
                        null);
                Point partLoc = getGraphManager().getBounds(gpar, null).getBounds().getLocation();
                Point off = new Point(whereTo.x - partLoc.x, whereTo.y - partLoc.y);
                String partId = gpar.getPropertyObject().get("Id").toValue();
                Activities acts = (Activities) getGraph().getXPDLObject().get("Activities");
                Activity act = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(acts, subType, false);
                GraphUtilities.setOffsetPoint(act, off);
                GraphUtilities.setParticipantId(act, partId);
                int acttype = act.getActivityType();
                if (acttype == XPDLConstants.ACTIVITY_TYPE_NO || acttype == XPDLConstants.ACTIVITY_TYPE_TOOL) {
                    if (!partId.equals(FreeTextExpressionParticipant.getInstance().getId())) {
                        act.setPerformer(partId);
                    }
                }
                graphController.setUpdateInProgress(true);
                JaWEManager.getInstance().getJaWEController().startUndouableChange();
                acts.add(act);
                getGraphManager().insertActivity(act);
                List toSelect = new ArrayList();
                toSelect.add(act);
                JaWEManager.getInstance().getJaWEController().endUndouableChange(toSelect);
                getGraph().selectActivity(act, false);
                graphController.setUpdateInProgress(false);
            }
        } // if start button is selected
        else if (isStartButtonSelected()) {
            if (!getGraphManager().doesRootParticipantExist()) {
                JaWEFrame frame = JaWEManager.getInstance().getJaWEController().getJaWEFrame();
                JOptionPane.showMessageDialog(frame, getGraphController().getSettings().getLanguageDependentString(
                        "WarningInvalidOperation"), frame.getAppTitle(),
                        JOptionPane.WARNING_MESSAGE);

            } else {
                GraphParticipantInterface gpar = getGraphManager().findParentActivityParticipantForLocation(whereTo, null,
                        null);
                Point partLoc = getGraphManager().getBounds(gpar, null).getBounds().getLocation();
                Point offset = new Point(whereTo.x - partLoc.x, whereTo.y - partLoc.y);
                String partId = gpar.getPropertyObject().get("Id").toValue();
                graphController.setUpdateInProgress(true);
                JaWEManager.getInstance().getJaWEController().startUndouableChange();
                ExtendedAttribute ea = GraphUtilities.createStartOrEndExtendedAttribute(getGraph().getXPDLObject(), true, partId, offset, subType,
                        true);
                getGraphManager().insertStart(ea);
                List toSelect = new ArrayList();
                toSelect.add(ea);
                JaWEManager.getInstance().getJaWEController().endUndouableChange(toSelect);
                getGraph().selectBubble(ea, false);
                graphController.setUpdateInProgress(false);
            }
        }

        // if end button is selected
        if (isEndButtonSelected()) {
            if (!getGraphManager().doesRootParticipantExist()) {
                JaWEFrame frame = JaWEManager.getInstance().getJaWEController().getJaWEFrame();
                JOptionPane.showMessageDialog(frame, getGraphController().getSettings().getLanguageDependentString(
                        "WarningInvalidOperation"), frame.getAppTitle(),
                        JOptionPane.WARNING_MESSAGE);

            } else {
                GraphParticipantInterface gpar = getGraphManager().findParentActivityParticipantForLocation(whereTo, null,
                        null);
View Full Code Here

TOP

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

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.