Package com.mxgraph.model

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


    {
      mxGeometry geo = model.getGeometry(cell);

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

        updateAlternateBounds(cell, geo, willCollapse);
        geo.swap();

        model.setGeometry(cell, geo);
View Full Code Here


        mxGeometry geo = model.getGeometry(cell);

        if (size != null && geo != null)
        {
          boolean collapsed = isCellCollapsed(cell);
          geo = (mxGeometry) geo.clone();

          if (isSwimlane(cell))
          {
            mxCellState state = view.getState(cell);
            Map<String, Object> style = (state != null) ? state
View Full Code Here

              && (geo.getX() != tmp.getX()
                  || geo.getY() != tmp.getY()
                  || geo.getWidth() != tmp.getWidth() || geo
                  .getHeight() != tmp.getHeight()))
          {
            geo = (mxGeometry) geo.clone();

            if (geo.isRelative())
            {
              mxPoint offset = geo.getOffset();
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

    if (geometry != null)
    {
      model.beginUpdate();
      try
      {
        geometry = (mxGeometry) geometry.clone();

        if (isSource(index) || isTarget(index))
        {
          connect(edge, null, isSource(index), false);
          geometry.setTerminalPoint(point, isSource(index));
View Full Code Here

    mxIGraphModel model = graph.getModel();
    mxGeometry geometry = model.getGeometry(state.getCell());

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

      // Resets the relative location stored inside the geometry
      mxPoint pt = graph.getView().getRelativePoint(edgeState, x, y);
      geometry.setX(pt.getX());
      geometry.setY(pt.getY());
View Full Code Here

      mxGeometry g = model.getGeometry(edge.getCell());

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

        if (g.getOffset() != null)
        {
          g.getOffset().setX(g.getOffset().getX() + dx);
          g.getOffset().setY(g.getOffset().getY() + dy);
View Full Code Here

          {
            mxGeometry geo = model.getGeometry(child);

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

              if (wrap != 0 && last != null)
              {

                if ((horizontal && last.getX()
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.