VisualAct[] rights=new VisualAct[numCells];
int step=nearAndRelPrime((int)(.61803399*numCells), numCells);
int i=0;
VisualAct last=null;
for (VisualAct v: visualActs)
{
if (!v.isVisible() || !v.getTrack().equals(this))
continue;
v.setSpaceToRight(1000);
double num=visuals.getTimeScale().toNum(v.getStart().getTime());
int x=(int)num;
int cell=numCells<2 ? 0 : (i%numCells);
int y=iy0 + (iy1-iy0<12 ? 0 : cell*cellH);
v.setX(x);
v.setY(y+11);
if (v.getEnd()!=null)
v.setEndX((int)visuals.getTimeScale().toNum(v.getEnd().getTime()));
if (rights[cell]!=null)
{
int space=x-rights[cell].getX();
rights[cell].setSpaceToRight(space);
}
rights[cell]=v;
if ((last!=null && v.getStart().getTime()==last.getStart().getTime())
|| visuals.getLayoutStyle()==TimelineVisuals.Layout.TIGHT)
i++;
else
i+=step;
last=v;