Package com.mxgraph.view

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


    Object parent = graph.getDefaultParent();
    int vertexCount = 0;

    for (int i = 0; i < vertexNum; i++)
    {
      graph.insertVertex(parent, null, new Integer(vertexCount).toString(), 0, 0, 25, 25);
      vertexCount++;
    }

    // we have the board set up
    Object[] vertices = aGraph.getChildVertices(parent);
View Full Code Here


    Object parent = graph.getDefaultParent();

    graph.getModel().beginUpdate();
    try
    {
      mxCell v1 = (mxCell) graph.insertVertex(parent, null, "Hello", 20,
          20, 100, 100, "");
      v1.setConnectable(false);
      mxGeometry geo = graph.getModel().getGeometry(v1);
      // The size of the rectangle when the minus sign is clicked
      geo.setAlternateBounds(new mxRectangle(20, 20, 100, 50));
View Full Code Here

      port2.setVertex(true);

      graph.addCell(port1, v1);
      graph.addCell(port2, v1);

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

      Object parent = graph.getDefaultParent();

      graph.getModel().beginUpdate();
      try
      {
        Object v1 = graph
            .insertVertex(parent, null, "Hello", 20, 20, 80, 30,
                "shape=and;fillColor=#ff0000;gradientColor=#ffffff;shadow=1");
        Object v2 = graph.insertVertex(parent, null, "World!", 240,
            150, 80, 30, "shape=xor;shadow=1");
        graph.insertEdge(parent, null, "Edge", v1, v2);
View Full Code Here

      try
      {
        Object v1 = graph
            .insertVertex(parent, null, "Hello", 20, 20, 80, 30,
                "shape=and;fillColor=#ff0000;gradientColor=#ffffff;shadow=1");
        Object v2 = graph.insertVertex(parent, null, "World!", 240,
            150, 80, 30, "shape=xor;shadow=1");
        graph.insertEdge(parent, null, "Edge", v1, v2);
      }
      finally
      {
View Full Code Here

    Object parent = graph.getDefaultParent();

    graph.getModel().beginUpdate();
    try
    {
      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);
    }
View Full Code Here

    graph.getModel().beginUpdate();
    try
    {
      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
    {
View Full Code Here

    graph.getModel().beginUpdate();
    try
    {

      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);
    }
View Full Code Here

    try
    {

      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
    {
View Full Code Here

    mxGraph graph = getGraphComponent().getGraph();
    Object parent = graph.getDefaultParent();
    graph.getModel().beginUpdate();
    try
    {
      mxCell v1 = (mxCell) graph.insertVertex(parent, null, "Customers",
          20, 20, 200, 280);
      v1.getGeometry().setAlternateBounds(new mxRectangle(0, 0, 140, 25));
      mxCell v2 = (mxCell) graph.insertVertex(parent, null, "Orders",
          280, 20, 200, 280);
      v2.getGeometry().setAlternateBounds(new mxRectangle(0, 0, 140, 25));
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.