Package com.mxgraph.model

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


          boolean horizontal = isCellHorizontal(swimlane);

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

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


        {
          mxGeometry geo = getCellGeometry(cells[i]);

          if (geo != null && !model.isEdge(cells[i]))
          {
            geo = (mxGeometry) geo.clone();

            if (align == null
                || align.equals(mxConstants.ALIGN_LEFT))
            {
              geo.setX(tmp);
View Full Code Here

                && childBounds.getHeight() > 0)
            {
              mxRectangle size = (isSwimlane(cells[i])) ? getStartSize(cells[i])
                  : new mxRectangle();

              geo = (mxGeometry) geo.clone();

              if (moveParent)
              {
                geo.setX(geo.getX() + childBounds.getX()
                    - size.getWidth() - border);
View Full Code Here

            if (geo != null)
            {
              double dx = o2.getX() - o1.getX();
              double dy = o2.getY() - o1.getY();

              geo = (mxGeometry) geo.clone();
              geo.translate(dx, dy);

              if (!geo.isRelative() && model.isVertex(cells[i])
                  && !isAllowNegativeCoordinates())
              {
View Full Code Here

              {
                mxCellState state = view.getState(edges[j]);

                if (state != null)
                {
                  geo = (mxGeometry) geo.clone();
                  boolean source = view.getVisibleTerminal(
                      edges[j], true) == cells[i];
                  int n = (source) ? 0 : state
                      .getAbsolutePointCount() - 1;
                  mxPoint pt = state.getAbsolutePoint(n);
View Full Code Here

    {
      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

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.