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

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


          }
        }

        else if (next instanceof ParamConnection)
        {
          ParamConnection paramConnection = (ParamConnection) next;

          DataLink link = paramConnection.getDataLink();

          Param sourceParam = link.getSourceParam();
          Param targetParam = link.getTargetParam();

          if (sourceParam instanceof NodeParam)
          {
            if (! copiedSourceNodes.contains(((NodeParam) sourceParam).getSocket().getNode()))
            {
              // Link source or target has not been copied
              continue;
            }
          }
          else
          {
            // Don't copy process variable links
            continue;
          }

          if (targetParam instanceof NodeParam)
          {
            if (! copiedSourceNodes.contains(((NodeParam) targetParam).getSocket().getNode()))
            {
              // Link source or target has not been copied
              continue;
            }
          }
          else
          {
            // Don't copy process variable links
            continue;
          }

          paramConnection.encodeGeometry();

          link = (DataLink) link.clone();
          process.addDataLink(link);

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


      target.addDataLink(link);

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

      ParamConnection paramConnection = drawing.createParamConnection(link);
      if (paramConnection == null)
      {
        target.removeDataLink(link);
        continue;
      }
View Full Code Here

          connectionFigure.connectEnd(endConnector);

          // Apply auto-conversions for data links if necessary
          if (connectionFigure instanceof ParamConnection)
          {
            ParamConnection paramConnection = (ParamConnection) connectionFigure;
            DataLink dataLink = paramConnection.getDataLink();

            String newSourceMemberPath = DataLinkImpl.checkAutoConversion(dataLink.getSourceParam(), dataLink.getSourceMemberPath(), dataLink.getTargetParam(), dataLink.getTargetMemberPath());
            dataLink.setSourceMemberPath(newSourceMemberPath);
          }
View Full Code Here

    // Add the link to the process
    process.addDataLink(dataLink);

    // Now create a connection figure and add it to the drawing
    ProcessDrawing drawing = modeler.getDrawing();
    ParamConnection connection = drawing.createParamConnection(dataLink);
    drawing.add(connection);

    // Layout the connection
    connection.layoutAndAdjustConnection();

    connectedDataLink = true;
  }
View Full Code Here

          }
        }

        if (flavor [i].equals(ModelerFlavors.PARAM_CONNECTION_FIGURE))
        {
          final ParamConnection connection = (ParamConnection) ie.getSafeTransferData(flavor [i]);

          // 'Lock/unlock orientation' popup
          JaspiraAction lockAction = new JaspiraAction(modeler, "modeler.edit.lockorientation")
          {
            public void actionPerformed(ActionEvent e)
            {
              modeler.startUndo("Lock Orientation");

              connection.toggleOrientationLock();

              modeler.endUndo();
            }
          };
          lockAction.setSelected(connection.isOrientationLocked());
          group.addMenuChild(lockAction);

          // 'Flip orientation' popup
          group.addMenuChild(new JaspiraAction(modeler, "modeler.edit.fliporientation")
          {
            public void actionPerformed(ActionEvent e)
            {
              modeler.startUndo("Flip Orientation");

              connection.flipOrientation();

              modeler.endUndo();
            }
          });
        }
View Full Code Here

    super(toolSupport);
  }

  public PolySplineConnection createConnection()
  {
    return new ParamConnection((ProcessDrawing) getDrawing());
  }
View Full Code Here

        add(p);
    }

    for (Iterator it = process.getDataLinks(); it.hasNext();)
    {
      ParamConnection p = createParamConnection((DataLink) it.next());
      if (p != null)
        add(p);
    }

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

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

      link.unlink();

      return new ParamConnection(link, start, end, this);
    }

    return null;
  }
View Full Code Here

    setPoint(x, y);
    connect(target);

    if (connectionFigure instanceof ParamConnection)
    {
      ParamConnection paramConnection = (ParamConnection) connectionFigure;
      DataLink dataLink = paramConnection.getDataLink();

      String newSourceMemberPath = DataLinkImpl.checkAutoConversion(dataLink.getSourceParam(), dataLink.getSourceMemberPath(), dataLink.getTargetParam(), dataLink.getTargetMemberPath());
      if (newSourceMemberPath != null)
      {
        dataLink.setSourceMemberPath(newSourceMemberPath);
View Full Code Here

TOP

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

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.