Package org.jbpm.ui.common.command

Examples of org.jbpm.ui.common.command.NodeDeleteCommand


public class NodeComponentEditPolicy extends ComponentEditPolicy {

    @Override
    protected Command createDeleteCommand(GroupRequest request) {
        NodeDeleteCommand nodeDeleteCommand = new NodeDeleteCommand();
        nodeDeleteCommand.setNode((Node) getHost().getModel());
        return nodeDeleteCommand;
    }
View Full Code Here


        executeCommand(command);
    }

    private Command createDeleteCommand(GraphElement element) {
        if (element instanceof Node) {
            NodeDeleteCommand result = new NodeDeleteCommand();
            result.setNode((Node) element);
            return result;
        } else if (element instanceof Transition) {
            TransitionDeleteCommand result = new TransitionDeleteCommand();
            result.setTransition((Transition) element);
            return result;
        } else if (element instanceof Swimlane) {
            ProcessDefinitionRemoveSwimlaneCommand result = new ProcessDefinitionRemoveSwimlaneCommand();
            result.setSwimlane((Swimlane) element);
            result.setProcessDefinition((ProcessDefinition) selectedPart.getParent().getModel());
            return result;
        } else if (element instanceof Action) {
            ActionDeleteCommand command = new ActionDeleteCommand();
            command.setAction((Action) element);
            return command;
View Full Code Here

TOP

Related Classes of org.jbpm.ui.common.command.NodeDeleteCommand

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.