// figure out which of their parents IS in the graph and calculate the
// cost of that instead.
private Object _getParentInGraph(Object node) {
GraphModel model = getLayoutTarget().getGraphModel();
while ((node != null) && !model.containsNode(_graph, node)) {
Object parent = model.getParent(node);
if (model.isNode(parent)) {
node = parent;
} else {