*/
public void run(double frac) {
// mark the items
Iterator items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem)items.next();
item.setDOI(Constants.MINIMUM_DOI);
}
// set up the graph traversal
TupleSet src = m_vis.getGroup(m_sources);
Iterator srcs = new FilterIterator(src.tuples(), m_groupP);
m_bfs.init(srcs, m_distance, Constants.NODE_AND_EDGE_TRAVERSAL);
// traverse the graph
while ( m_bfs.hasNext() ) {
VisualItem item = (VisualItem)m_bfs.next();
int d = m_bfs.getDepth(item);
PrefuseLib.updateVisible(item, true);
item.setDOI(-d);
item.setExpanded(d < m_distance);
}
// mark unreached items
items = m_vis.visibleItems(m_group);
while ( items.hasNext() ) {
VisualItem item = (VisualItem)items.next();
if ( item.getDOI() == Constants.MINIMUM_DOI ) {
PrefuseLib.updateVisible(item, false);
item.setExpanded(false);
}
}
}