private int [ ] getSelectedRows ( ) { int iMin = model . getMinSelectionIndex ( ) ; int iMax = model . getMaxSelectionIndex ( ) ; if ( ( iMin == - 1 ) || ( iMax == - 1 ) ) { return new int [ 0 ] ; } int [ ] rvTmp = new int [ 1 + ( iMax - iMin ) ] ; int n = 0 ; for ( int i = iMin ; i <= iMax ; i ++ ) { if ( model . isSelectedIndex ( i ) ) { rvTmp [ n ++ ] = i ; } } int [ ] rv = new int [ n ] ; System . arraycopy ( rvTmp , 0 , rv , 0 , n ) ; return rv ; }
Returns the indices of all selected rows in the model .