Package com.mxgraph.view

Examples of com.mxgraph.view.mxConnectionConstraint


      mxPoint targetConstraint = null;
      if (view != null)
      {
        mxCellState edgeState = view.getState(edge);
        mxCellState sourceState = view.getState(source);
        mxConnectionConstraint scc = graph.getConnectionConstraint(
            edgeState, sourceState, true);
        if (scc != null)
        {
          sourceConstraint = scc.getPoint();
        }

        mxCellState targetState = view.getState(target);
        mxConnectionConstraint tcc = graph.getConnectionConstraint(
            edgeState, targetState, false);
        if (tcc != null)
        {
          targetConstraint = tcc.getPoint();
        }
      }

      //gets the port names
      targetPort = pointToPortString(targetConstraint);
View Full Code Here


        // Computes the points for the edge style and terminals
        mxCellState sourceState = view.getState(source);
        mxCellState targetState = view.getState(target);

        mxConnectionConstraint sourceConstraint = graphComponent
            .getGraph().getConnectionConstraint(clone, sourceState,
                true);
        mxConnectionConstraint targetConstraint = graphComponent
            .getGraph().getConnectionConstraint(clone, targetState,
                false);

        /* TODO: Implement mxConstraintHandler
        mxConnectionConstraint constraint = constraintHandler.currentConstraint;
View Full Code Here

        edge = clone;
      }

      // Passes an empty constraint to reset constraint information
      graph.connectCell(edge, terminal, isSource,
          new mxConnectionConstraint());
    }
    finally
    {
      model.endUpdate();
    }
View Full Code Here

        // Computes the points for the edge style and terminals
        mxCellState sourceState = view.getState(source);
        mxCellState targetState = view.getState(target);

        mxConnectionConstraint sourceConstraint = graphComponent
            .getGraph().getConnectionConstraint(clone, sourceState,
                true);
        mxConnectionConstraint targetConstraint = graphComponent
            .getGraph().getConnectionConstraint(clone, targetState,
                false);

        /* TODO: Implement mxConstraintHandler
        mxConnectionConstraint constraint = constraintHandler.currentConstraint;
View Full Code Here

        edge = clone;
      }

      // Passes an empty constraint to reset constraint information
      graph.connectCell(edge, terminal, isSource,
          new mxConnectionConstraint());
    }
    finally
    {
      model.endUpdate();
    }
View Full Code Here

      mxPoint targetConstraint = null;
      if (view != null)
      {
        mxCellState edgeState = view.getState(edge);
        mxCellState sourceState = view.getState(source);
        mxConnectionConstraint scc = graph.getConnectionConstraint(
            edgeState, sourceState, true);
        if (scc != null)
        {
          sourceConstraint = scc.getPoint();
        }

        mxCellState targetState = view.getState(target);
        mxConnectionConstraint tcc = graph.getConnectionConstraint(
            edgeState, targetState, false);
        if (tcc != null)
        {
          targetConstraint = tcc.getPoint();
        }
      }

      //gets the port names
      targetPort = pointToPortString(targetConstraint);
View Full Code Here

    //Insert new edge.
    mxCell e = (mxCell) graph.insertEdge(parent, null, label, source,
        target, style);
    graph.setConnectionConstraint(e, source, true,
        new mxConnectionConstraint(fromConstraint, false));
    graph.setConnectionConstraint(e, target, false,
        new mxConnectionConstraint(toConstraint, false));
    return e;
  }
View Full Code Here

      //Insert new edge and set constraints.
      edge = (mxCell) graph.insertEdge(parent, null, textLabel, source,
          target, style);
      graph.setConnectionConstraint(edge, source, true,
          new mxConnectionConstraint(fromConstraint, false));
      graph.setConnectionConstraint(edge, target, false,
          new mxConnectionConstraint(toConstraint, false));

      //Gets and sets routing points of the edge.
      mxGeometry edgeGeometry = edge.getGeometry();
      List<mxPoint> pointList = edgeShape.getRoutingPoints(parentHeight);
      edgeGeometry.setPoints(pointList);
View Full Code Here

    //Insert new edge and set constraints.
    edge = (mxCell) graph.insertEdge(source.getParent(), null, textLabel,
        source, target, style);
    graph.setConnectionConstraint(edge, source, true,
        new mxConnectionConstraint(fromConstraint, false));
    graph.setConnectionConstraint(edge, target, false,
        new mxConnectionConstraint(toConstraint, false));

    //Gets and sets routing points of the edge.
    mxGeometry edgeGeometry = edge.getGeometry();
    List<mxPoint> pointList = edgeShape.getRoutingPoints(height);
    edgeGeometry.setPoints(pointList);
View Full Code Here

      mxPoint targetConstraint = null;
      if (view != null)
      {
        mxCellState edgeState = view.getState(edge);
        mxCellState sourceState = view.getState(source);
        mxConnectionConstraint scc = graph.getConnectionConstraint(
            edgeState, sourceState, true);
        if (scc != null)
        {
          sourceConstraint = scc.getPoint();
        }

        mxCellState targetState = view.getState(target);
        mxConnectionConstraint tcc = graph.getConnectionConstraint(
            edgeState, targetState, false);
        if (tcc != null)
        {
          targetConstraint = tcc.getPoint();
        }
      }

      //gets the port names
      targetPort = pointToPortString(targetConstraint);
View Full Code Here

TOP

Related Classes of com.mxgraph.view.mxConnectionConstraint

Copyright © 2018 www.massapicom. 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.