private List outgoingConnections = new ArrayList();
private void deleteConnections(ElementWrapper element) {
for (Iterator it = element.getIncomingConnections().iterator(); it.hasNext(); ) {
ElementConnection connection = (ElementConnection) it.next();
incomingElementWrappers.add(connection.getSource());
incomingConnections.add(connection);
}
for (Iterator it = element.getOutgoingConnections().iterator(); it.hasNext(); ) {
ElementConnection connection = (ElementConnection) it.next();
outgoingElementWrappers.add(connection.getTarget());
outgoingConnections.add(connection);
}
for (Iterator it = incomingConnections.iterator(); it.hasNext(); ) {
ElementConnection connection = (ElementConnection) it.next();
connection.disconnect();
}
for (Iterator it = outgoingConnections.iterator(); it.hasNext(); ) {
ElementConnection connection = (ElementConnection) it.next();
connection.disconnect();
}
}