/** * Removes the given connection object from the layout algorithm and the model. * * @param connection */ public void removeRelationship(Object connection) { GraphConnection relationship = (GraphConnection) connectionsMap.get(connection); if (relationship != null) { // remove the relationship from the layout algorithm if (getLayoutAlgorithm() != null) { getLayoutAlgorithm().removeRelationship(relationship.getLayoutRelationship()); } // remove the relationship from the model relationship.dispose(); } }