/**
* @see prefuse.action.Action#run(double)
*/
public void run(double frac) {
Graph g = (Graph)m_vis.getGroup(m_group);
Rectangle2D bounds = super.getLayoutBounds();
init(g, bounds);
for (int curIter=0; curIter < maxIter; curIter++ ) {
// Calculate repulsion
for (Iterator iter = g.nodes(); iter.hasNext();) {
NodeItem n = (NodeItem)iter.next();
if (n.isFixed()) continue;
calcRepulsion(g, n);
}
// Calculate attraction
for (Iterator iter = g.edges(); iter.hasNext();) {
EdgeItem e = (EdgeItem) iter.next();
calcAttraction(e);
}
for (Iterator iter = g.nodes(); iter.hasNext();) {
NodeItem n = (NodeItem)iter.next();
if (n.isFixed()) continue;
calcPositions(n,bounds);
}