question: public void centerHorizontal ( ArrayList < Integer > nodes ) { if ( m_bNeedsUndoAction ) { addUndoAction ( new centerHorizontalAction ( 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 , ( nMinY + nMaxY ) / 2 ) ; } }
target:  center set of nodes half way between left and right most node in the list