Package org.jbpm.ui.custom

Source Code of org.jbpm.ui.custom.SwimlaneInitializerProvider

package org.jbpm.ui.custom;

import org.eclipse.jface.dialogs.IDialogConstants;
import org.jbpm.ui.common.model.Delegable;
import org.jbpm.ui.common.model.ProcessDefinition;
import org.jbpm.ui.common.model.Swimlane;
import org.jbpm.ui.dialog.SwimlaneConfigDialog;

public class SwimlaneInitializerProvider extends DelegableProvider {

    @Override
    public String showConfigurationDialog(Delegable delegable) {
        Swimlane swimlane = (Swimlane) delegable;
        ProcessDefinition definition = swimlane.getProcessDefinition();

        String path = definition.getSwimlaneGUIConfiguration().getEditorPath(swimlane.getName());
        SwimlaneConfigDialog dialog = new SwimlaneConfigDialog(definition, swimlane, path);
        if (dialog.open() == IDialogConstants.OK_ID) {
            definition.getSwimlaneGUIConfiguration().putSwimlanePath(swimlane.getName(), dialog.getPath());
            return dialog.getConfiguration();
        }
        return null;
    }

}
TOP

Related Classes of org.jbpm.ui.custom.SwimlaneInitializerProvider

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.