Package net.sf.graphiti.ui.commands.refinement

Examples of net.sf.graphiti.ui.commands.refinement.PortChooser


      String connection = edge.getSource().getValue(
          ObjectType.PARAMETER_ID)
          + " - "
          + edge.getTarget().getValue(ObjectType.PARAMETER_ID);
      PortChooser portChooser = new PortChooser(connection);
      if (edge.getParameter(ObjectType.PARAMETER_SOURCE_PORT) != null) {
        edge.setValue(ObjectType.PARAMETER_SOURCE_PORT,
            portChooser.getSourcePort(source));
      }
    } else if (edge.getTarget() != target) {
      edge.setTarget(target);

      String connection = edge.getSource().getValue(
          ObjectType.PARAMETER_ID)
          + " - "
          + edge.getTarget().getValue(ObjectType.PARAMETER_ID);
      PortChooser portChooser = new PortChooser(connection);
      if (edge.getParameter(ObjectType.PARAMETER_TARGET_PORT) != null) {
        edge.setValue(ObjectType.PARAMETER_TARGET_PORT,
            portChooser.getTargetPort(target));
      }
    }

    parentGraph.addEdge(edge);
  }
View Full Code Here


    edge.setTarget(target);

    String connection = source.getValue(ObjectType.PARAMETER_ID) + " - "
        + target.getValue(ObjectType.PARAMETER_ID);

    PortChooser portChooser = new PortChooser(connection);
    if (edge.getParameter(ObjectType.PARAMETER_SOURCE_PORT) != null) {
      edge.setValue(ObjectType.PARAMETER_SOURCE_PORT, portChooser
          .getSourcePort(source));
    }

    if (edge.getParameter(ObjectType.PARAMETER_TARGET_PORT) != null) {
      edge.setValue(ObjectType.PARAMETER_TARGET_PORT, portChooser
          .getTargetPort(target));
    }

    parentGraph.addEdge(edge);
  }
View Full Code Here

TOP

Related Classes of net.sf.graphiti.ui.commands.refinement.PortChooser

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.