public void spaceHorizontal(ArrayList<Integer> nodes){
  if (m_bNeedsUndoAction) {
    addUndoAction(new spaceHorizontalAction(nodes));
  }
  int nMinX=-1;
  int nMaxX=-1;
  for (int iNode=0; iNode < nodes.size(); iNode++) {
    int nX=getPositionX(nodes.get(iNode));
    if (nX < nMinX || iNode == 0) {
      nMinX=nX;
    }
    if (nX > nMaxX || iNode == 0) {
      nMaxX=nX;
    }
  }
  for (int iNode=0; iNode < nodes.size(); iNode++) {
    int nNode=nodes.get(iNode);
    m_nPositionX.set(nNode,(int)(nMinX + iNode * (nMaxX - nMinX) / (nodes.size() - 1.0)));
  }
}

public void spaceHorizontal ( ArrayList < Integer > nodes ) { if ( m_bNeedsUndoAction ) { addUndoAction ( new spaceHorizontalAction ( nodes ) ) ; } int nMinX = - 1 ; int nMaxX = - 1 ; for ( int iNode = 0 ; iNode < nodes . size ( ) ; iNode ++ ) { int nX = getPositionX ( nodes . get ( iNode ) ) ; if ( nX < nMinX || iNode == 0 ) { nMinX = nX ; } if ( nX > nMaxX || iNode == 0 ) { nMaxX = nX ; } } for ( int iNode = 0 ; iNode < nodes . size ( ) ; iNode ++ ) { int nNode = nodes . get ( iNode ) ; m_nPositionX . set ( nNode , ( int ) ( nMinX + iNode * ( nMaxX - nMinX ) / ( nodes . size ( ) - 1.0 ) ) ) ; } }
space out set of nodes evenly between left and right most node in the list
