Exemplo n.º 1
0
 private void swapWith(CourseSelectionBox other) {
   hideSuggestionList();
   other.hideSuggestionList();
   String x = getError();
   setError(other.getError());
   other.setError(x);
   boolean b = isEnabled();
   setEnabled(other.isEnabled());
   other.setEnabled(b);
   if (iPrimary != null) {
     x = getHint();
     setHint(other.getHint());
     other.setHint(x);
   }
   x = getValue();
   setValue(other.getValue(), false);
   other.setValue(x, false);
   if (iAlternative != null) iAlternative.swapWith(other.iAlternative);
   if (iWaitList != null && other.iWaitList != null) {
     Boolean ch = iWaitList.getValue();
     iWaitList.setValue(other.iWaitList.getValue());
     other.iWaitList.setValue(ch);
   }
 }