/** Create a new edge, add it to the graph controller and add
* the connector to the selection.
*/
public void mousePressed(LayerEvent e) {
Figure source = e.getFigureSource();
FigureLayer layer = (FigureLayer) e.getLayerSource();
Object edge = createEdge();
// Add it to the editor
// FIXME what about an error?
_controller.addEdge(edge, source.getUserObject(),
ConnectorEvent.TAIL_END, e.getLayerX(), e.getLayerY());
// Add it to the selection so it gets a manipulator, and
// make events go to the grab-handle under the mouse
Figure ef = _controller.getFigure(edge);
_controller.getSelectionModel().addSelection(ef);
ConnectorManipulator cm = (ConnectorManipulator) ef.getParent();
GrabHandle gh = cm.getHeadHandle();
layer.grabPointer(e, gh);
}