public void insertIndexInterval(int index,int length,boolean before){
  int insMinIndex=(before) ? index : index + 1;
  int insMaxIndex=(insMinIndex + length) - 1;
  for (int i=maxIndex; i >= insMinIndex; i--) {
    setState(i + length,value.get(i));
  }
  boolean setInsertedValues=value.get(index);
  for (int i=insMinIndex; i <= insMaxIndex; i++) {
    setState(i,setInsertedValues);
  }
}

public void insertIndexInterval ( int index , int length , boolean before ) { int insMinIndex = ( before ) ? index : index + 1 ; int insMaxIndex = ( insMinIndex + length ) - 1 ; for ( int i = maxIndex ; i >= insMinIndex ; i -- ) { setState ( i + length , value . get ( i ) ) ; } boolean setInsertedValues = value . get ( index ) ; for ( int i = insMinIndex ; i <= insMaxIndex ; i ++ ) { setState ( i , setInsertedValues ) ; } }
insert length indices beginning before / after index . if the value at index is itself selected , set all of the newly inserted items , otherwise leave them unselected . this method is typically called to sync the selection model with a corresponding change in the data model .
