// a visible ancestor node
Iterator items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
if ( item instanceof NodeItem && !item.isStartVisible() ) {
NodeItem n = (NodeItem)item;
Point2D p = getPoint(n, true);
n.setStartX(p.getX());
n.setStartY(p.getY());
}
}
// handle newly collapsed nodes - ensure they collapse to
// the greatest visible ancestor node
items = m_vis.items(m_group, StartVisiblePredicate.TRUE);
while ( items.hasNext() ) {
VisualItem item = (VisualItem) items.next();
if ( item instanceof NodeItem && !item.isEndVisible() ) {
NodeItem n = (NodeItem)item;
Point2D p = getPoint(n, false);
n.setStartX(n.getEndX());
n.setStartY(n.getEndY());
n.setEndX(p.getX());
n.setEndY(p.getY());
}
}
}