Package com.mxgraph.model

Examples of com.mxgraph.model.mxGeometry.clone()


        {

          if ((parentHorizontal && geo.getHeight() != h)
              || (!parentHorizontal && geo.getWidth() != w))
          {
            geo = (mxGeometry) geo.clone();

            if (parentHorizontal)
            {
              geo.setHeight(h);
            }
View Full Code Here


                if (g != null) {
                  double width = bounds.getWidth() + size.getWidth() - bounds.getX() + 2 * x0;
                  double height = bounds.getHeight() + size.getHeight() - bounds.getY() + 2 * y0;

                  g = (mxGeometry) g.clone();

                  if (g.getWidth() > width) {
                    dx += (g.getWidth() - width) / 2;
                  } else {
                    g.setWidth(width);
View Full Code Here

                      + 2 * x0;
                  double height = bounds.getHeight()
                      + size.getHeight() - bounds.getY()
                      + 2 * y0;

                  g = (mxGeometry) g.clone();

                  if (g.getWidth() > width)
                  {
                    dx += (g.getWidth() - width) / 2;
                  }
View Full Code Here

      geometry = new mxGeometry();
      geometry.setRelative(true);
    }
    else
    {
      geometry = (mxGeometry) geometry.clone();
    }

    geometry.setPoints(points);
    model.setGeometry(edge, geometry);
  }
View Full Code Here

        }
      }

      if (geometry.getX() != x || geometry.getY() != y)
      {
        geometry = (mxGeometry) geometry.clone();
        geometry.setX(x);
        geometry.setY(y);

        model.setGeometry(vertex, geometry);
      }
View Full Code Here

    mxIGraphModel model = getGraph().getModel();
    mxGeometry geo = model.getGeometry(swimlane);

    if (geo != null)
    {
      geo = (mxGeometry) geo.clone();

      if (isHorizontal())
      {
        geo.setWidth(w);
      }
View Full Code Here

    mxIGraphModel model = getGraph().getModel();
    mxGeometry geo = model.getGeometry(parent);

    if (geo != null)
    {
      geo = (mxGeometry) geo.clone();
      mxRectangle size = graph.getStartSize(parent);

      if (isHorizontal())
      {
        geo.setWidth(w + size.getWidth());
View Full Code Here

  {
    mxGeometry geo = model.getGeometry(cell);

    if (geo != null)
    {
      geo = (mxGeometry) geo.clone();
      geo.translate(dx, dy);

      if (!geo.isRelative() && model.isVertex(cell)
          && !isAllowNegativeCoordinates())
      {
View Full Code Here

      // Resets the control points
      List<mxPoint> points = geo.getPoints();

      if (points != null && !points.isEmpty())
      {
        geo = (mxGeometry) geo.clone();
        geo.setPoints(null);
        model.setGeometry(edge, geo);
      }
    }
View Full Code Here

              mxCellState pstate = view.getState(model
                  .getParent(cells[i]));

              if (state != null && pstate != null)
              {
                geo = (mxGeometry) geo.clone();

                double dx = -pstate.getOrigin().getX();
                double dy = -pstate.getOrigin().getY();

                Object src = model.getTerminal(cells[i], true);
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.