code: public void setChoices(List<String> choices) {
          if (!limitChoices) throw new IllegalArgumentException("Attempted to set choices when choices are not limited.");
  
          List<String> sorted = new ArrayList<String>();
          sorted.addAll(choices);
          Collections.sort(sorted);
          ((ComboBoxItem)this.nameItem).setValueMap(sorted);
      }
docs: Called before opening the dialog so that the user sees only the valid choices.
  
  @param choices