*/
public void mouseReleased(EditorMouseEvent event) {
double mx = event.getX(), my = event.getY();
DiagramElement elem = editor.getDiagram().getChildAt(mx, my);
if (elem instanceof UmlNode && elem != source) {
Connection connection = null;
if (connectionType == ConnectionType.DEPENDENCY) {
connection = editor.getDiagram().getElementFactory().createDependency(
(UmlNode) source, (UmlNode) elem);
} else if (connectionType == ConnectionType.NOTE_CONNECTOR) {
connection = editor.getDiagram().getElementFactory()