double targetHPosition = (target != null) ? target
.getLifelineHPos() : SVGConstants.DIAGRAM_ORIGIN_X;
double length = targetHPosition - callerHPosition;
SVGPathFigure interactionLine = new SVGPathFigure();
Double interactionLineStartPosition = new Double();
interactionLineStartPosition.x = 0;
interactionLineStartPosition.y = 0;
BezierFigure linePath = new BezierFigure();
linePath.addNode(new BezierPath.Node(interactionLineStartPosition));
boolean selfCall = caller == target;
if (selfCall) {
Double selfCallIntermidiateTopPosition = new Double();
length = heightIncrement;
selfCallIntermidiateTopPosition.x = interactionLineStartPosition.x
+ length;
selfCallIntermidiateTopPosition.y = interactionLineStartPosition.y;
linePath.addNode(new BezierPath.Node(
selfCallIntermidiateTopPosition));
Double selfCallIntermidiateBottomPosition = new Double();
height = heightIncrement;
selfCallIntermidiateBottomPosition.x = interactionLineStartPosition.x
+ length;
selfCallIntermidiateBottomPosition.y = interactionLineStartPosition.y
+ height;
linePath.addNode(new BezierPath.Node(
selfCallIntermidiateBottomPosition));
length = 0;
}
Double interacitonlineEndPosition = new Double();
interacitonlineEndPosition.x = interactionLineStartPosition.x
+ length;
interacitonlineEndPosition.y = interactionLineStartPosition.y
+ height;