Package org.openbp.cockpit.modeler.figures.process

Examples of org.openbp.cockpit.modeler.figures.process.FlowConnection


      {
        Figure next = fe.nextFigure();

        if (next instanceof FlowConnection)
        {
          FlowConnection flowConnection = (FlowConnection) next;

          ControlLink link = flowConnection.getControlLink();

          if (! copiedSourceNodes.contains(link.getSourceSocket().getNode())
            || ! copiedSourceNodes.contains(link.getTargetSocket().getNode()))
          {
            // Link source or target has not been copied
            continue;
          }

          flowConnection.encodeGeometry();

          link = (ControlLink) link.clone();
          process.addControlLink(link);

          if (! msgContainer.isEmpty())
View Full Code Here


      target.addControlLink(link);

      // Determine the reference names after adding the object to the target
      link.maintainReferences(ModelObject.SYNC_LOCAL_REFNAMES);

      FlowConnection flowConnection = drawing.createFlowConnection(link);
      if (flowConnection == null)
      {
        target.removeControlLink(link);
        continue;
      }
View Full Code Here

          getEditor().endUndo();

          // Pressing the CTRL key while connecting two sockets will invoke the data link autoconnector.
          if (connectionFigure instanceof FlowConnection && !InputState.isCtrlDown())
          {
            FlowConnection flowConnectionFigure = (FlowConnection) connectionFigure;
            SocketFigure sourceSocketFigure = ((TagConnector) flowConnectionFigure.getStartConnector()).getSocketFigure();
            SocketFigure targetSocketFigure = ((TagConnector) flowConnectionFigure.getEndConnector()).getSocketFigure();
            AutoConnector autoConnector = new AutoConnector((Modeler) getEditor(), sourceSocketFigure, targetSocketFigure);
            autoConnector.autoConnectDataLinks();
          }
        }
      }
View Full Code Here

    {
      // Source and target socket determined
      if (sourceSocketFigure.canConnect() && targetSocketFigure.canConnect())
      {
        // Make sure the socket can connect and don't belong to the same node
        FlowConnection connection = new FlowConnection(modeler.getDrawing());
        if (connection.canConnectFigures(sourceSocketFigure, targetSocketFigure, 0) && sourceSocketFigure.getNodeSocket().getNode() != targetSocketFigure.getNodeSocket().getNode())
        {
          // We have two connection points.
          modeler.startUndo("Auto-connect sockets");

          connection.connectStart(sourceSocketFigure.connectorAt(0, 0));
          connection.connectEnd(targetSocketFigure.connectorAt(0, 0));
          modeler.getDrawing().add(connection);
          connection.layoutAndAdjustConnection();

          modeler.endUndo();

          autoAdjustPlaceholderName();
View Full Code Here

                if (connections != null)
                {
                  int n = connections.size();
                  for (int i = 0; i < n; ++i)
                  {
                    FlowConnection connection = (FlowConnection) connections.get(i);
                    if (isSelected(connection))
                    {
                      decorate = true;
                      break;
                    }
View Full Code Here

    super(toolSupport);
  }

  public PolySplineConnection createConnection()
  {
    FlowConnection connection = new FlowConnection((ProcessDrawing) getDrawing());
    connection.setDrawDecorations(false);
    return connection;
  }
View Full Code Here

        add(p);
    }

    for (Iterator it = process.getControlLinks(); it.hasNext();)
    {
      FlowConnection p = createFlowConnection((ControlLink) it.next());
      if (p != null)
        add(p);
    }

    for (Iterator it = process.getDataLinks(); it.hasNext();)
View Full Code Here

    Connector start = sourceFigure.connectorAt(0, 0);
    Connector end = targetFigure.connectorAt(0, 0);

    link.unlink();

    FlowConnection flow = new FlowConnection(link, this);
    flow.connectStart(start);
    flow.connectEnd(end);

    return flow;
  }
View Full Code Here

TOP

Related Classes of org.openbp.cockpit.modeler.figures.process.FlowConnection

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.