Package org.eclipse.graphiti.mm.pictograms

Examples of org.eclipse.graphiti.mm.pictograms.Connection


      return changed ? Reason.createTrueReason() : Reason.createFalseReason();
    }

    @Override
    public boolean update(IUpdateContext context) {
      Connection connection = (Connection) context.getPictogramElement();
      setDefaultSequenceFlow(connection);
      return true;
    }
View Full Code Here


      // NOTE: if this method returns "true" the very first time it's called by the refresh
      // framework, the connection line will be drawn as a red dotted line, so make sure
      // all properties have been correctly set to their initial values in the AddFeature!
      // see https://issues.jboss.org/browse/JBPM-3102
      IPeService peService = Graphiti.getPeService();
      Connection connection = (Connection) context.getPictogramElement();
      SequenceFlow flow = BusinessObjectUtil.getFirstElementOfType(connection, SequenceFlow.class);
      String property = peService.getPropertyValue(connection, IS_CONDITIONAL_FLOW_PROPERTY);
      if (property == null || !canUpdate(context)) {
        return Reason.createFalseReason();
      }
View Full Code Here

      return changed ? Reason.createTrueReason() : Reason.createFalseReason();
    }

    @Override
    public boolean update(IUpdateContext context) {
      Connection connection = (Connection) context.getPictogramElement();
      setConditionalSequenceFlow(connection);
      return true;
    }
View Full Code Here

    }
    return false;
  }

  public Connection create(ICreateConnectionContext context) {
    Connection newConnection = null;

    FlowNode source = getFlowNode(context.getSourceAnchor());
    FlowNode target = getFlowNode(context.getTargetAnchor());

    if (source != null && target != null) {
View Full Code Here

      for (SequenceFlow sourceFlow : sourceFlows) {
        sourceFlow.setSourceRef(targetElement.getId());
        if (targetElement instanceof FlowNode) {
          ((FlowNode) targetElement).getOutgoingFlows().add(sourceFlow);
        }
        Connection connection = (Connection) getFeatureProvider().getPictogramElementForBusinessObject(sourceFlow);
        connection.setStart(elementAnchor);
        elementAnchor.getOutgoingConnections().add(connection);
      }
      List<SequenceFlow> targetFlows = (List<SequenceFlow>) context.getProperty("org.activiti.designer.changetype.targetflows");
      for (SequenceFlow targetFlow : targetFlows) {
        targetFlow.setTargetRef(targetElement.getId());
        if (targetElement instanceof FlowNode) {
          ((FlowNode) targetElement).getIncomingFlows().add(targetFlow);
        }
        Connection connection = (Connection) getFeatureProvider().getPictogramElementForBusinessObject(targetFlow);
        connection.setEnd(elementAnchor);
        elementAnchor.getIncomingConnections().add(connection);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.mm.pictograms.Connection

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.