}
// update positions
Iterator iter = m_vis.visibleItems(m_nodeGroup);
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
ForceItem fitem = (ForceItem)item.get(FORCEITEM);
if ( item.isFixed() ) {
// clear any force computations
fitem.force[0] = 0.0f;
fitem.force[1] = 0.0f;
fitem.velocity[0] = 0.0f;
fitem.velocity[1] = 0.0f;
if ( Double.isNaN(item.getX()) ) {
setX(item, referrer, 0.0);
setY(item, referrer, 0.0);
}
continue;
}
double x = fitem.location[0];
double y = fitem.location[1];
if ( m_enforceBounds && bounds != null) {
Rectangle2D b = item.getBounds();
double hw = b.getWidth()/2;
double hh = b.getHeight()/2;
if ( x+hw > x2 ) x = x2-hw;
if ( x-hw < x1 ) x = x1+hw;
if ( y+hh > y2 ) y = y2-hh;