*/
public void addConnection(NodeWidget start, NodeWidget end) {
boolean exists = false;
FunctionShape s1 = widgetShapeMap.get(start);
FunctionShape s2 = widgetShapeMap.get(end);
Connection current = null;
for (Connection c : s1.getConnections()) {
if (c.getStartShape() == s1) {
current = c;
}
if (c.getEndShape() == s2) {
exists = true;
break;
}
}
if (!exists) {
if (current != null) {
this.deleteConnection(current);
s1.removeConnection(current);
s2.removeConnection(current);
}
Connection c = drawStraightArrowConnection(start, end);
fireEvent(new TieLinkEvent(start, end, c));
}
}