public int[] toSortedModelIndices(int[] unsortedModelIndices){
  int[] sortedModelIndices=new int[unsortedModelIndices.length];
  int x=0;
  for (  int unsortedIndex : unsortedModelIndices) {
    sortedModelIndices[x++]=toSortedModelIndex(unsortedIndex);
  }
  Arrays.sort(sortedModelIndices);
  return sortedModelIndices;
}

public int [ ] toSortedModelIndices ( int [ ] unsortedModelIndices ) { int [ ] sortedModelIndices = new int [ unsortedModelIndices . length ] ; int x = 0 ; for ( int unsortedIndex : unsortedModelIndices ) { sortedModelIndices [ x ++ ] = toSortedModelIndex ( unsortedIndex ) ; } Arrays . sort ( sortedModelIndices ) ; return sortedModelIndices ; }
convert an array of unsorted model selection indices to indices in the sorted model . sort the model indices from low to high to duplicate jlist ' s getselectedindices method
