.getLayerY());
tailSite = new AutonomousSite(layer, event.getLayerX(), event
.getLayerY());
// Render the edge.
Connector c = getEdgeController(link).render(link, layer,
tailSite, headSite);
// get the actual attach site.
tailSite = getEdgeController(link).getConnectorTarget()
.getTailSite(c, source, event.getLayerX(),
event.getLayerY());
if (tailSite == null) {
throw new RuntimeException("Invalid connector target: "
+ "no valid site found for tail of new connector.");
}
// And reattach the connector.
c.setTailSite(tailSite);
// Add it to the selection so it gets a manipulator, and
// make events go to the grab-handle under the mouse
Figure ef = getFigure(link);
getSelectionModel().addSelection(ef);