Examples of ConnectionPoint


Examples of com.mystictri.neotexture.TextureGraphNode.ConnectionPoint

      }
    } else if (e.getSource() == swapInputsChannelMenuItem) { // --------------------------------------------------------
      TextureGraphNode node = graph.selectedNodes.get(0);
      if (node != null) {
        if (node.getChannel().getNumInputChannels() < 2) return;
        ConnectionPoint p0 = node.getInputConnectionPointByChannelIndex(0);
        ConnectionPoint p1 = node.getInputConnectionPointByChannelIndex(1);
        TextureNodeConnection c0 = graph.getConnectionAtInputPoint(p0);
        TextureNodeConnection c1 = graph.getConnectionAtInputPoint(p1);
        graph.removeConnection(c0);
        graph.removeConnection(c1);
        if (c0 != null && c1 != null) {
          ConnectionPoint temp = c0.target;
          c0.target = c1.target;
          c1.target = temp;
          graph.addConnection(c0);
          graph.addConnection(c1);
        } else if (c1 != null) {
View Full Code Here

Examples of com.mystictri.neotexture.TextureGraphNode.ConnectionPoint

      return 2;
    }
    // now check if we clicked into an input node
    Vector<ConnectionPoint> allCPs = node.getAllConnectionPointsVector();
    for (int i = 0; i < allCPs.size(); i++) {
      ConnectionPoint cp = allCPs.get(i);
      if (cp.inside(x, y))
        return -cp.channelIndex - 1;
    }
   
    if ((x >= helpX) && (x <= (helpX + helpW)) && (y >= helpY) && (y <= (helpY + helpH))) {
      JOptionPane.showMessageDialog(this, node.getChannel().getHelpText(), node.getChannel().getName() + " Help", JOptionPane.PLAIN_MESSAGE);
View Full Code Here

Examples of de.maramuse.soundcomp.parser.ConnectionPoint

  }
  if(val instanceof de.maramuse.soundcomp.parser.Number){
    return new SourceStore(ConstStream.c(val.asDouble()), StandardParameters.OUT.i);
  }
  if(val instanceof ConnectionPoint){
    ConnectionPoint cp=(ConnectionPoint)val;
    String elName=cp.getElementName();
    String coName=cp.getConnectionName();
    NamedSource src=subprocesses.get(elName);
    if(src==null)throw new IllegalArgumentException("Element "+elName+" not found");
    Parameter param=src.outputsByName().get(coName);
    if(param==null)throw new IllegalArgumentException("Output "+coName+" not found in element "+elName);
    return new SourceStore(src, param.i);
View Full Code Here

Examples of pl.tecna.gwt.connectors.client.ConnectionPoint

      sectionHorizontal = sections.get(0).isHorizontal();
    }

    try {
      List<CornerPoint> cornerPoints = getCorners(sections);
      ConnectionPoint connectionPoint = endPoint.gluedConnectionPoint;

      // Connect element to the center of connection point
      if (last) {
        endEndPoint.setLeft(connectionPoint.getCenterLeft());
        endEndPoint.setTop(connectionPoint.getCenterTop());
        if (!sectionHorizontal) {
          cornerPoints.get(cornerPoints.size() - 1).setLeft(endEndPoint.getLeft());
        } else {
          cornerPoints.get(cornerPoints.size() - 1).setTop(endEndPoint.getTop());
        }
      } else {
        startEndPoint.setLeft(connectionPoint.getCenterLeft());
        startEndPoint.setTop(connectionPoint.getCenterTop());
        if (!sectionHorizontal) {
          cornerPoints.get(0).setLeft(startEndPoint.getLeft());
        } else {
          cornerPoints.get(0).setTop(startEndPoint.getTop());
        }
View Full Code Here

Examples of pl.tecna.gwt.connectors.client.ConnectionPoint

          excluded.add(cp);
        }
      }

      if (!diagram.altPressed) {
        ConnectionPoint nearestCP =
            shape.findNearestConnectionPoint(dragEndPoint.getLeft(), dragEndPoint.getTop(), excluded);
        if (nearestCP != null && nearestCP != conn.startEndPoint.gluedConnectionPoint) {
          conn.startEndPoint.unglueFromConnectionPoint();
          conn.startEndPoint.glueToConnectionPoint(nearestCP);
          conn.startEndPoint.setLeft(nearestCP.getCenterLeft());
          conn.startEndPoint.setTop(nearestCP.getCenterTop());
        }
      }
    }
    conn.calculateStandardPointsPositions();
    conn.drawSections();
View Full Code Here

Examples of pl.tecna.gwt.connectors.client.ConnectionPoint

  public ConnectionPoint findNearestConnectionPoint(int absLeft, int absTop, List<ConnectionPoint> excluded) {

    if (excluded == null) {
      excluded = new ArrayList<ConnectionPoint>();
    }
    ConnectionPoint retCP = null;
    int distance = Integer.MAX_VALUE;
    for (ConnectionPoint cp : connectionPoints) {
      int tempDist = Math.abs(absLeft - cp.getCenterLeft()) + Math.abs(absTop - cp.getCenterTop());
      if (tempDist < distance && !excluded.contains(cp)) {
        distance = tempDist;
View Full Code Here

Examples of pl.tecna.gwt.connectors.client.ConnectionPoint

  }

  private List<ConnectionPoint> createRectangleShapeCP(AbsolutePanel connectionPointsPanel, Diagram diagram) {
    List<ConnectionPoint> connectionPoints = new ArrayList<ConnectionPoint>();

    ConnectionPoint cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 0, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 1, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 2, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_RIGHT, 3, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_RIGHT, 4, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_RIGHT, 5, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 6, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 7, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 8, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_LEFT, 9, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_LEFT, 10, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_LEFT, 11, connectedWidget);
    connectionPoints.add(cp);

    for (ConnectionPoint connectionPoint : connectionPoints) {
      connectionPoint.showOnDiagram(diagram);
    }
View Full Code Here

Examples of pl.tecna.gwt.connectors.client.ConnectionPoint

  }

  private List<ConnectionPoint> createOvalShapeCP(AbsolutePanel connectionPointsPanel, Diagram diagram) {
    List<ConnectionPoint> connectionPoints = new ArrayList<ConnectionPoint>();

    ConnectionPoint cp = new ConnectionPoint(ConnectionPoint.DIRECTION_LEFT, 0, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 1, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 2, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 3, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_RIGHT, 4, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 5, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 6, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 7, connectedWidget);
    connectionPoints.add(cp);

    for (ConnectionPoint connectionPoint : connectionPoints) {
      connectionPoint.showOnDiagram(diagram);
    }
View Full Code Here

Examples of pl.tecna.gwt.connectors.client.ConnectionPoint

  }

  private List<ConnectionPoint> createDiamondShapeCP(AbsolutePanel connectionPointsPanel, Diagram diagram) {
    List<ConnectionPoint> connectionPoints = new ArrayList<ConnectionPoint>();

    ConnectionPoint cp = new ConnectionPoint(ConnectionPoint.DIRECTION_LEFT, 0, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 1, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 2, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_TOP, 3, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_RIGHT, 4, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 5, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 6, connectedWidget);
    connectionPoints.add(cp);
    cp = new ConnectionPoint(ConnectionPoint.DIRECTION_BOTTOM, 7, connectedWidget);
    connectionPoints.add(cp);

    for (ConnectionPoint connectionPoint : connectionPoints) {
      connectionPoint.showOnDiagram(diagram);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.