Package org.jbpm.ui.common.action

Source Code of org.jbpm.ui.common.action.RotateForkJoinDelegate

package org.jbpm.ui.common.action;

import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.jface.action.IAction;
import org.jbpm.ui.common.model.Node;

public class RotateForkJoinDelegate extends BaseActionDelegate {

    public void run(IAction action) {
        Node node = (Node) selectedPart.getModel();
        Rectangle oldConstraint = node.getConstraint();
        Rectangle newConstraint = oldConstraint.getCopy();
        newConstraint.width = oldConstraint.height;
        newConstraint.height = oldConstraint.width;
        node.setConstraint(newConstraint);
    }

}
TOP

Related Classes of org.jbpm.ui.common.action.RotateForkJoinDelegate

TOP
Copyright © 2018 www.massapi.com. 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.