public MusicElement getElementAtStreamPosition ( int offset ) { Iterator it = m_voices . iterator ( ) ; CharStreamPosition pos ; while ( it . hasNext ( ) ) { Voice v = ( Voice ) it . next ( ) ; int size = v . size ( ) ; MusicElement current = null ; for ( int i = 0 ; i < size ; i ++ ) { current = ( MusicElement ) v . elementAt ( i ) ; if ( current != null ) { pos = current . getCharStreamPosition ( ) ; if ( pos != null ) { if ( ( pos . getStartIndex ( ) <= offset ) && ( pos . getEndIndex ( ) > offset ) ) return current ; } } } } return null ; }
Returns the score element location at the specified offset .