void migrateValueWithinYesList(AWTEvent event){
  Object[] selObjects=yesList.getSelectedValues();
  if (selObjects == null)   return;
  int length=selObjects.length;
  if (length == 0)   return;
  int[] indices=yesList.getSelectedIndices();
  boolean change=false;
  Object source=event.getSource();
  if (source == bUp) {
    for (int i=0; i < length; i++) {
      ListItem selObject=(ListItem)selObjects[i];
      int index=indices[i];
      if (index == 0)       break;
      ListItem newObject=(ListItem)yesModel.getElementAt(index - 1);
      if (!selObject.isUpdateable() || !newObject.isUpdateable())       break;
      yesModel.setElementAt(newObject,index);
      yesModel.setElementAt(selObject,index - 1);
      indices[i]=index - 1;
      change=true;
    }
  }
 else   if (source == bDown) {
    for (int i=length - 1; i >= 0; i--) {
      ListItem selObject=(ListItem)selObjects[i];
      int index=indices[i];
      if (index >= yesModel.size() - 1)       break;
      ListItem newObject=(ListItem)yesModel.getElementAt(index + 1);
      if (!selObject.isUpdateable() || !newObject.isUpdateable())       break;
      yesModel.setElementAt(newObject,index);
      yesModel.setElementAt(selObject,index + 1);
      yesList.setSelectedIndex(index + 1);
      indices[i]=index + 1;
      change=true;
    }
  }
 else   if (source == yesList) {
  }
 else   log.severe("Unknown source: " + source);
  if (change) {
    yesList.setSelectedIndices(indices);
    setIsChanged(true);
  }
}

void migrateValueWithinYesList ( AWTEvent event ) { Object [ ] selObjects = yesList . getSelectedValues ( ) ; if ( selObjects == null ) return ; int length = selObjects . length ; if ( length == 0 ) return ; int [ ] indices = yesList . getSelectedIndices ( ) ; boolean change = false ; Object source = event . getSource ( ) ; if ( source == bUp ) { for ( int i = 0 ; i < length ; i ++ ) { ListItem selObject = ( ListItem ) selObjects [ i ] ; int index = indices [ i ] ; if ( index == 0 ) break ; ListItem newObject = ( ListItem ) yesModel . getElementAt ( index - 1 ) ; if ( ! selObject . isUpdateable ( ) || ! newObject . isUpdateable ( ) ) break ; yesModel . setElementAt ( newObject , index ) ; yesModel . setElementAt ( selObject , index - 1 ) ; indices [ i ] = index - 1 ; change = true ; } } else if ( source == bDown ) { for ( int i = length - 1 ; i >= 0 ; i -- ) { ListItem selObject = ( ListItem ) selObjects [ i ] ; int index = indices [ i ] ; if ( index >= yesModel . size ( ) - 1 ) break ; ListItem newObject = ( ListItem ) yesModel . getElementAt ( index + 1 ) ; if ( ! selObject . isUpdateable ( ) || ! newObject . isUpdateable ( ) ) break ; yesModel . setElementAt ( newObject , index ) ; yesModel . setElementAt ( selObject , index + 1 ) ; yesList . setSelectedIndex ( index + 1 ) ; indices [ i ] = index + 1 ; change = true ; } } else if ( source == yesList ) { } else log . severe ( "Unknown source: " + source ) ; if ( change ) { yesList . setSelectedIndices ( indices ) ; setIsChanged ( true ) ; } }
move within yes list
