/** * Constructs a new connection constraint for the given point and boolean * arguments. * * @param point Optional mxPoint that specifies the fixed location of the point * in relative coordinates. Default is null. * @param perimeter Optional boolean that specifies if the fixed point should be * projected onto the perimeter of the terminal. Default is true. */ public mxConnectionConstraint(mxPoint point, boolean perimeter) { setPoint(point); setPerimeter(perimeter); }
return new mxConnectionConstraint(point, perimeter);
/** * Sets the connection constraint that describes the given connection point. * If no constraint is given then nothing is changed. To remove an existing * constraint from the given edge, use an empty constraint instead. * * @param vertex Cell state that represents the vertex. * @param constraint Connection constraint that represents the connection point * constraint as returned by getConnectionConstraint. */ public mxPoint getConnectionPoint(mxCellState vertex, mxConnectionConstraint constraint) { mxPoint point = null; if (vertex != null && constraint.point != null) { point = new mxPoint(vertex.getX() + constraint.getPoint().getX() * vertex.getWidth(), vertex.getY() + constraint.getPoint().getY() * vertex.getHeight()); } if (point != null && constraint.perimeter) { point = view.getPerimeterPoint(vertex, point, false); } return point; }
return new mxConnectionConstraint(point, perimeter);
/** * Constructs a new connection constraint for the given point and boolean * arguments. * * @param point Optional mxPoint that specifies the fixed location of the point * in relative coordinates. Default is null. * @param perimeter Optional boolean that specifies if the fixed point should be * projected onto the perimeter of the terminal. Default is true. */ public mxConnectionConstraint(mxPoint point, boolean perimeter) { setPoint(point); setPerimeter(perimeter); }