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

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


          copyFlavor = ClientFlavors.NODE_SOCKETS;
        }

        else if (next instanceof ParamFigure)
        {
          ParamFigure paramFigure = (ParamFigure) next;

          NodeParam param = paramFigure.getNodeParam();

          if (paramHolder == null)
          {
            if (socketHolder == null)
            {
View Full Code Here


            targetSocket.addParam(param, - 1);
            param.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS);

            // Add the corresponding param figure and select it
            ParamFigure paramFigure = socketFigure.addParam(param, - 1);
            workspaceView.addToSelection(paramFigure);

            ViewModeMgr.getInstance().setDataLinkVisible(true);
          }
View Full Code Here

          workspaceView.singleSelect(figure);
        }

        if (flavor [i].equals(ModelerFlavors.PARAM_FIGURE))
        {
          final ParamFigure paramFigure = (ParamFigure) ie.getSafeTransferData(flavor [i]);
          final NodeParam nodeParam = paramFigure.getNodeParam();
          SocketFigure socketFigure = (SocketFigure) paramFigure.getParent();

          // Add the 'Parameter visibility' sub menu for all parameters of the socket if appropriate
          ParamVisibilityHelper.addParamMenu(ie, modeler, socketFigure);

          // 'Parameter Value Wizard' popup
View Full Code Here

   */
  boolean hasExpression(Object o)
  {
    if (o instanceof ParamFigure)
    {
      ParamFigure paramFigure = (ParamFigure) o;
      NodeParam param = paramFigure.getNodeParam();
      String expression = param.getExpression();

      // We consider the object to have an expression if the expression contains something of interest (i. e. a non-stanard value)
      if (expression != null && !expression.equals("null") && !expression.equals("\"\"") && !expression.equals("false") && !expression.equals("0"))
      {
View Full Code Here

    if (je.getSourcePlugin() != modeler)
    {
      return EVENT_IGNORED;
    }

    ParamFigure newParam = (ParamFigure) je.getObject();

    // Select the new element
    WorkspaceDrawingView workspaceView = modeler.getDrawingView();
    workspaceView.singleSelect(newParam);
View Full Code Here

    {
      System.err.println("Missing target parameter for data link '" + link.getQualifier() + "'");
      return null;
    }

    ParamFigure sourceFigure = null;
    ParamFigure targetFigure = null;

    if (source instanceof NodeParam)
    {
      sourceFigure = (ParamFigure) source.getRepresentation();

      if (sourceFigure == null)
      {
        System.err.println("Data link source parameter '" + source.getQualifier() + "' has no figure representation.");
        return null;
      }
    }
    if (target instanceof NodeParam)
    {
      targetFigure = (ParamFigure) target.getRepresentation();

      if (targetFigure == null)
      {
        System.err.println("Data link target parameter '" + target.getQualifier() + "' has no figure representation.");
        return null;
      }
    }

    if (source instanceof ProcessVariable && targetFigure != null)
    {
      // Global -> Node
      targetFigure.setProcessVariableConnection((ProcessVariable) source, link);
    }
    else if (target instanceof ProcessVariable && sourceFigure != null)
    {
      // Node -> Global
      sourceFigure.setProcessVariableConnection((ProcessVariable) target, link);
    }
    else if (sourceFigure != null && targetFigure != null)
    {
      // Node -> Node
      Connector start = sourceFigure.connectorAt(0, 0);
      Connector end = targetFigure.connectorAt(0, 0);

      link.unlink();

      return new ParamConnection(link, start, end, this);
    }
View Full Code Here

TOP

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

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.