public void spaceVertical(ArrayList<Integer> nodes){
  if (m_bNeedsUndoAction) {
    addUndoAction(new spaceVerticalAction(nodes));
  }
  int nMinY=-1;
  int nMaxY=-1;
  for (int iNode=0; iNode < nodes.size(); iNode++) {
    int nY=getPositionY(nodes.get(iNode));
    if (nY < nMinY || iNode == 0) {
      nMinY=nY;
    }
    if (nY > nMaxY || iNode == 0) {
      nMaxY=nY;
    }
  }
  for (int iNode=0; iNode < nodes.size(); iNode++) {
    int nNode=nodes.get(iNode);
    m_nPositionY.set(nNode,(int)(nMinY + iNode * (nMaxY - nMinY) / (nodes.size() - 1.0)));
  }
}

public void spaceVertical ( ArrayList < Integer > nodes ) { if ( m_bNeedsUndoAction ) { addUndoAction ( new spaceVerticalAction ( nodes ) ) ; } int nMinY = - 1 ; int nMaxY = - 1 ; for ( int iNode = 0 ; iNode < nodes . size ( ) ; iNode ++ ) { int nY = getPositionY ( nodes . get ( iNode ) ) ; if ( nY < nMinY || iNode == 0 ) { nMinY = nY ; } if ( nY > nMaxY || iNode == 0 ) { nMaxY = nY ; } } for ( int iNode = 0 ; iNode < nodes . size ( ) ; iNode ++ ) { int nNode = nodes . get ( iNode ) ; m_nPositionY . set ( nNode , ( int ) ( nMinY + iNode * ( nMaxY - nMinY ) / ( nodes . size ( ) - 1.0 ) ) ) ; } }
space out set of nodes evenly between top and bottom most node in the list
