Package org.activiti.designer.features

Examples of org.activiti.designer.features.CreateExclusiveGatewayFeature


      newUserTaskButton.setText("new user task"); //$NON-NLS-1$
      newUserTaskButton.setDescription("Create a new task"); //$NON-NLS-1$
      newUserTaskButton.setIconId(PluginImage.IMG_USERTASK.getImageKey());
      data.getDomainSpecificContextButtons().add(newUserTaskButton);

      CreateExclusiveGatewayFeature exclusiveGatewayFeature = new CreateExclusiveGatewayFeature(getFeatureProvider());
      ContextButtonEntry newExclusiveGatewayButton = new ContextButtonEntry(exclusiveGatewayFeature, taskContext);
      newExclusiveGatewayButton.setText("new exclusive gateway"); //$NON-NLS-1$
      newExclusiveGatewayButton.setDescription("Create a new exclusive gateway"); //$NON-NLS-1$
      newExclusiveGatewayButton.setIconId(PluginImage.IMG_GATEWAY_EXCLUSIVE.getImageKey());
      data.getDomainSpecificContextButtons().add(newExclusiveGatewayButton);

      CreateEndEventFeature endFeature = new CreateEndEventFeature(getFeatureProvider());
      ContextButtonEntry newEndButton = new ContextButtonEntry(endFeature, taskContext);
      newEndButton.setText("new end event"); //$NON-NLS-1$
      newEndButton.setDescription("Create a new end event"); //$NON-NLS-1$
      newEndButton.setIconId(PluginImage.IMG_ENDEVENT_NONE.getImageKey());
      data.getDomainSpecificContextButtons().add(newEndButton);
    }

    CreateConnectionContext ccc = new CreateConnectionContext();
    ccc.setSourcePictogramElement(pe);
    Anchor anchor = null;
    if (pe instanceof Anchor) {
      anchor = (Anchor) pe;
    } else if (pe instanceof AnchorContainer) {
      anchor = Graphiti.getPeService().getChopboxAnchor((AnchorContainer) pe);
    }
    ccc.setSourceAnchor(anchor);

    ContextButtonEntry button = new ContextButtonEntry(null, context);
    button.setText("Create connection"); //$NON-NLS-1$
    button.setIconId(PluginImage.IMG_EREFERENCE.getImageKey());
    ICreateConnectionFeature[] features = getFeatureProvider().getCreateConnectionFeatures();
    for (ICreateConnectionFeature feature : features) {
      if (feature.isAvailable(ccc) && feature.canStartConnection(ccc)) {
        button.addDragAndDropFeature(feature);
      }
    }

    if (button.getDragAndDropFeatures().size() > 0) {
      data.getDomainSpecificContextButtons().add(button);
    }

    if (bo instanceof StartEvent || bo instanceof Task || bo instanceof CallActivity || bo instanceof Gateway) {

      ContextButtonEntry otherElementButton = new ContextButtonEntry(null, null);
      otherElementButton.setText("new element"); //$NON-NLS-1$
      otherElementButton.setDescription("Create a new element"); //$NON-NLS-1$
      otherElementButton.setIconId(PluginImage.NEW_ICON.getImageKey());
      data.getDomainSpecificContextButtons().add(otherElementButton);

      addContextButton(otherElementButton, new CreateServiceTaskFeature(getFeatureProvider()), taskContext, "Create service task", "Create a new service task",
              PluginImage.IMG_SERVICETASK);
      addContextButton(otherElementButton, new CreateScriptTaskFeature(getFeatureProvider()), taskContext, "Create script task", "Create a new script task",
              PluginImage.IMG_SCRIPTTASK);
      addContextButton(otherElementButton, new CreateUserTaskFeature(getFeatureProvider()), taskContext, "Create user task", "Create a new user task",
              PluginImage.IMG_USERTASK);
      addContextButton(otherElementButton, new CreateMailTaskFeature(getFeatureProvider()), taskContext, "Create mail task", "Create a new mail task",
              PluginImage.IMG_MAILTASK);
      addContextButton(otherElementButton, new CreateBusinessRuleTaskFeature(getFeatureProvider()), taskContext, "Create business rule task",
              "Create a new business rule task", PluginImage.IMG_BUSINESSRULETASK);
      addContextButton(otherElementButton, new CreateManualTaskFeature(getFeatureProvider()), taskContext, "Create manual task", "Create a new manual task",
              PluginImage.IMG_MANUALTASK);
      addContextButton(otherElementButton, new CreateReceiveTaskFeature(getFeatureProvider()), taskContext, "Create receive task", "Create a new receive task",
              PluginImage.IMG_RECEIVETASK);
      addContextButton(otherElementButton, new CreateCallActivityFeature(getFeatureProvider()), taskContext, "Create call activity",
              "Create a new call activiti", PluginImage.IMG_CALLACTIVITY);
      addContextButton(otherElementButton, new CreateExclusiveGatewayFeature(getFeatureProvider()), taskContext, "Create exclusive gateway",
              "Create a new exclusive gateway", PluginImage.IMG_GATEWAY_EXCLUSIVE);
      addContextButton(otherElementButton, new CreateInclusiveGatewayFeature(getFeatureProvider()), taskContext, "Create inclusive gateway",
              "Create a new inclusive gateway", PluginImage.IMG_GATEWAY_INCLUSIVE);
      addContextButton(otherElementButton, new CreateParallelGatewayFeature(getFeatureProvider()), taskContext, "Create parallel gateway",
              "Create a new parallel gateway", PluginImage.IMG_GATEWAY_PARALLEL);
View Full Code Here


            new CreateMailTaskFeature(this),
            new CreateManualTaskFeature(this),
            new CreateReceiveTaskFeature(this),
            new CreateBusinessRuleTaskFeature(this),
            new CreateParallelGatewayFeature(this),
            new CreateExclusiveGatewayFeature(this),
            new CreateInclusiveGatewayFeature(this),
            new CreateEventGatewayFeature(this),
            new CreateBoundaryTimerFeature(this),
            new CreateBoundaryErrorFeature(this),
            new CreateBoundaryMessageFeature(this),
View Full Code Here

TOP

Related Classes of org.activiti.designer.features.CreateExclusiveGatewayFeature

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.