Point center = getCenter(link.getSource());
double theta = Math.atan2(center.y-getHeight()/2, center.x-getWidth()/2);
Point start = circumferenceOnAngle(center, theta-0.3);
Point end = circumferenceOnAngle(center, theta+0.3);
Point arcCenter = new Point((start.x+end.x)/2, (start.y+end.y)/2);
int arcRadius = (int) arcCenter.distance(end);
int thetaDeg = (int) (-theta*180/Math.PI);
g.drawArc(arcCenter.x-arcRadius, arcCenter.y-arcRadius, 2*arcRadius, 2*arcRadius, thetaDeg-90, 180);
g.setColor(ovalColor);
g.fillOval(end.x-CONNECTIONDOTRADIUS, end.y-CONNECTIONDOTRADIUS, 2*CONNECTIONDOTRADIUS, 2*CONNECTIONDOTRADIUS);
}