}
if(connectionId < 0) {
UIEventCreateNewConnection event = new UIEventCreateNewConnection(getNextId(), locConnectName, locAnchor, locGraphId, locGraphName, fileId);
param.userInterface.addEvent(event);
} else {
UIEventDeleteConnection event1 = new UIEventDeleteConnection(connectionId);
param.userInterface.addEvent(event1);
UIEventCreateNewConnection event2 = new UIEventCreateNewConnection(connectionId, locConnectName, locAnchor, locGraphId, locGraphName, fileId);
param.userInterface.addEvent(event2);
}
Connector.this.setVisible(false);