Package org.activiti.designer.features

Examples of org.activiti.designer.features.ChangeElementTypeFeature


    return data;
  }

  private void addGatewayButtons(ContextButtonEntry otherElementButton, Gateway notGateway, CustomContext customContext) {
    if (notGateway == null || !(notGateway instanceof ExclusiveGateway)) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "exclusivegateway"), customContext,
              "Change to exclusive gateway", "Change to an exclusive gateway", PluginImage.IMG_GATEWAY_EXCLUSIVE);
    }
    if (notGateway == null || !(notGateway instanceof InclusiveGateway)) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "inclusivegateway"), customContext,
              "Change to inclusive gateway", "Change to an inclusive gateway", PluginImage.IMG_GATEWAY_INCLUSIVE);
    }
    if (notGateway == null || !(notGateway instanceof ParallelGateway)) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "parallelgateway"), customContext, "Change to parallel gateway",
              "Change to a parallel gateway", PluginImage.IMG_GATEWAY_PARALLEL);
    }
    if (notGateway == null || !(notGateway instanceof EventGateway)) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "eventgateway"), customContext, "Change to event gateway",
              "Change to a event gateway", PluginImage.IMG_GATEWAY_EVENT);
    }
  }
View Full Code Here


    if (startEventType == null) {
      startEventType = "none";
    }

    if ("none".equals(startEventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "nonestartevent"), customContext,
              "Change to none start event", "Change to a none start event", PluginImage.IMG_STARTEVENT_NONE);
    }
    if ("timer".equals(startEventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "timerstartevent"), customContext,
              "Change to timer start event", "Change to a timer start event", PluginImage.IMG_BOUNDARY_TIMER);
    }
    if ("message".equals(startEventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "messagestartevent"), customContext,
              "Change to message start event", "Change to a message start event", PluginImage.IMG_STARTEVENT_MESSAGE);
    }
    if ("error".equals(startEventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "errorstartevent"), customContext,
              "Change to error start event", "Change to an error start event", PluginImage.IMG_BOUNDARY_ERROR);
    }
  }
View Full Code Here

    if (endEventType == null) {
      endEventType = "none";
    }

    if ("none".equals(endEventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "noneendevent"), customContext,
              "Change to none end event", "Change to a none end event", PluginImage.IMG_ENDEVENT_NONE);
    }
    if ("error".equals(endEventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "errorendevent"), customContext,
              "Change to error end event", "Change to an error end event", PluginImage.IMG_ENDEVENT_ERROR);
    }
    if ("terminate".equals(endEventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "terminateendevent"), customContext,
              "Change to terminate end event", "Change to a terminate end event", PluginImage.IMG_ENDEVENT_TERMINATE);
    }
  }
View Full Code Here

    if (eventType == null) {
      return;
    }

    if ("timer".equals(eventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "timerboundaryevent"), customContext,
              "Change to timer boundary event", "Change to a timer boundary event", PluginImage.IMG_BOUNDARY_TIMER);
    }
    if ("message".equals(eventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "messageboundaryevent"), customContext,
              "Change to message boundary event", "Change to a message boundary event", PluginImage.IMG_BOUNDARY_MESSAGE);
    }
    if ("error".equals(eventType) == false) {
      Object parentObject = notBoundaryEvent.getAttachedToRef();
      if (parentObject instanceof SubProcess || parentObject instanceof CallActivity || parentObject instanceof ServiceTask) {
        addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "errorboundaryevent"), customContext,
                "Change to error boundary event", "Change to an error boundary event", PluginImage.IMG_BOUNDARY_ERROR);
      }
    }
    if ("signal".equals(eventType) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "signalboundaryevent"), customContext,
              "Change to signal boundary event", "Change to a signal boundary event", PluginImage.IMG_BOUNDARY_SIGNAL);
    }
  }
View Full Code Here

    }
  }

  private void addTaskButtons(ContextButtonEntry otherElementButton, Task notTask, CustomContext customContext) {
    if (notTask == null || notTask instanceof ServiceTask == false || ServiceTask.MAIL_TASK.equalsIgnoreCase(((ServiceTask) notTask).getType())) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "servicetask"), customContext, "Change to service task",
              "Change to a service task", PluginImage.IMG_SERVICETASK);
    }
    if (notTask == null || notTask instanceof ScriptTask == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "scripttask"), customContext, "Change to script task",
              "Change to a script task", PluginImage.IMG_SCRIPTTASK);
    }
    if (notTask == null || notTask instanceof UserTask == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "usertask"), customContext, "Change to user task",
              "Change to a user task", PluginImage.IMG_USERTASK);
    }
    if (notTask == null || notTask instanceof ServiceTask == false || ServiceTask.MAIL_TASK.equalsIgnoreCase(((ServiceTask) notTask).getType()) == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "mailtask"), customContext, "Change to mail task",
              "Change to a mail task", PluginImage.IMG_MAILTASK);
    }
    if (notTask == null || notTask instanceof BusinessRuleTask == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "businessruletask"), customContext,
              "Change to business rule task", "Change to a business rule task", PluginImage.IMG_BUSINESSRULETASK);
    }
    if (notTask == null || notTask instanceof ManualTask == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "manualtask"), customContext, "Change to manual task",
              "Change to a manual task", PluginImage.IMG_MANUALTASK);
    }
    if (notTask == null || notTask instanceof ReceiveTask == false) {
      addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "receivetask"), customContext, "Change to receive task",
              "Change to a receive task", PluginImage.IMG_RECEIVETASK);
    }
  }
View Full Code Here

  }

  @Override
  public ICustomFeature[] getCustomFeatures(ICustomContext context) {
    return new ICustomFeature[] { new SaveBpmnModelFeature(this),
        new DeleteSequenceFlowFeature(this), new DeletePoolFeature(this), new ChangeElementTypeFeature(this),
        new DeleteAssociationFeature(this) };
  }
View Full Code Here

TOP

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

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.