* source and destination points for later use in scaling and translating
* @param relationshipsToConsider
*/
protected void updateBendPoints(InternalRelationship[] relationshipsToConsider) {
for (int i = 0; i < relationshipsToConsider.length; i++) {
InternalRelationship relationship = relationshipsToConsider[i];
List bendPoints = relationship.getBendPoints();
if (bendPoints.size() > 0) {
// We will assume that source/dest coordinates are for center of node
BendPoint[] externalBendPoints = new BendPoint[bendPoints.size() + 2];
InternalNode sourceNode = relationship.getSource();
externalBendPoints[0] = new BendPoint(sourceNode.getInternalX(), sourceNode.getInternalY());
InternalNode destNode = relationship.getDestination();
externalBendPoints[externalBendPoints.length - 1] = new BendPoint(destNode.getInternalX(), destNode.getInternalY());
for (int j = 0; j < bendPoints.size(); j++) {
BendPoint bp = (BendPoint) bendPoints.get(j);
externalBendPoints[j + 1] = new BendPoint(bp.x, bp.y, bp.getIsControlPoint());
}
relationship.getLayoutRelationship().setBendPoints(externalBendPoints);
}
}
}