Package com.mxgraph.model

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


      }

      dx += offset.getX();
      dy += offset.getY();

      geometry = (mxGeometry) geometry.clone();
      geometry.setOffset(new mxPoint(Math.round(dx), Math.round(dy)));
      graph.getModel().setGeometry(state.getCell(), geometry);
    }
  }
View Full Code Here


      double dx = (e.getX() - first.x) / scale;
      double dy = (e.getY() - first.y) / scale;

      if (isLabel(index))
      {
        geometry = (mxGeometry) geometry.clone();

        if (geometry.getOffset() != null)
        {
          dx += geometry.getOffset().getX();
          dy += geometry.getOffset().getY();
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 = 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

    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

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.