Package com.mxgraph.view

Examples of com.mxgraph.view.mxGraph.insertEdge()


              "",
              v1,
              v2,
              "edgeStyle=elbowEdgeStyle;elbow=horizontal;"
                  + "exitX=0.5;exitY=1;exitPerimeter=1;entryX=0;entryY=0;entryPerimeter=1;");
      Object e2 = graph.insertEdge(parent, null, "", v3, v2,
          "edgeStyle=elbowEdgeStyle;elbow=horizontal;orthogonal=0;"
              + "entryX=0;entryY=0;entryPerimeter=1;");
    }
    finally
    {
View Full Code Here


    {
       Object v1 = graph.insertVertex(parent, null, "Hello", 20, 20, 80,
             30);
       Object v2 = graph.insertVertex(parent, null, "World!",
             240, 150, 80, 30);
       graph.insertEdge(parent, null, "Edge", v1, v2);
    }
    finally
    {
       graph.getModel().endUpdate();
    }
View Full Code Here

          .cloneNode(true), 200, 140, 80, 30);
      graph.insertVertex(parent, null, subtargetNode, 200,
          200, 80, 30);
      Object v6 = graph.insertVertex(parent, null, sourceNode
          .cloneNode(true), 20, 140, 80, 30);
      graph.insertEdge(parent, null, "", v1, v2);
      graph.insertEdge(parent, null, "", v1, v3);
      graph.insertEdge(parent, null, "", v6, v4);
      //Object e4 = graph.insertEdge(parent, null, "", v1, v4);
    }
    finally
View Full Code Here

      graph.insertVertex(parent, null, subtargetNode, 200,
          200, 80, 30);
      Object v6 = graph.insertVertex(parent, null, sourceNode
          .cloneNode(true), 20, 140, 80, 30);
      graph.insertEdge(parent, null, "", v1, v2);
      graph.insertEdge(parent, null, "", v1, v3);
      graph.insertEdge(parent, null, "", v6, v4);
      //Object e4 = graph.insertEdge(parent, null, "", v1, v4);
    }
    finally
    {
View Full Code Here

      {
        Object vertex2 = vertices[j];

        if (vertex1 != vertex2 && !mxGraphStructure.areConnected(aGraph, vertex1, vertex2))
        {
          graph.insertEdge(parent, null, getNewEdgeValue(aGraph), vertex1, vertex2);
        }
      }
    }
  };
View Full Code Here

        Object currVertex = vertices[vertexCount];

        if (i > 0)
        {
          // connect with previous x
          graph.insertEdge(parent, null, getNewEdgeValue(aGraph), vertices[vertexCount - 1], currVertex);
        }

        if (j > 0)
        {
          //connect with previous y
View Full Code Here

        }

        if (j > 0)
        {
          //connect with previous y
          graph.insertEdge(parent, null, getNewEdgeValue(aGraph), vertices[vertexCount - numColumns], currVertex);
        }

        vertexCount++;
      }
    }
View Full Code Here

    for (int i = 0; i < numVerticesGroup1; i++)
    {
      Object currVertex = vertices[i];
      Object destVertex = vertices[getRandomInt(numVerticesGroup1, numVertices - 1)];
      graph.insertEdge(parent, null, getNewEdgeValue(aGraph), currVertex, destVertex);
    }

    for (int j = 0; j < numVerticesGroup2; j++)
    {
      Object currVertex = vertices[numVerticesGroup1 + j];
View Full Code Here

      int edgeNum = aGraph.getOpposites(aGraph.getEdges(currVertex, null, true, true, false, true), currVertex, true, true).length;

      if (edgeNum == 0)
      {
        Object destVertex = vertices[getRandomInt(0, numVerticesGroup1 - 1)];
        graph.insertEdge(parent, null, getNewEdgeValue(aGraph), currVertex, destVertex);
      }
    }
  };

  /**
 
View Full Code Here

    // find a random vertex in each group and connect them.
    for (int i = 1; i < componentNum; i++)
    {
      Object sourceVertex = components[i - 1][(int) Math.round(Math.random() * (components[i - 1].length - 1))];
      Object targetVertex = components[i][(int) Math.round(Math.random() * (components[i].length - 1))];
      graph.insertEdge(parent, null, aGraph.getGenerator().getNewEdgeValue(aGraph), sourceVertex, targetVertex);
    }
  };

  /**
   * @param aGraph
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.