/**
  * sets the layer list for the spinner
  *
  * @param layers the layer list
  */
 public void setLayerList(List<?> layers) {
   if (layers == null || layers.isEmpty()) {
     List<String> def = new ArrayList<String>();
     def.add("empty");
     layer.setList(def);
     setEnabled(false);
   } else {
     layer.setList(layers);
     setEnabled(true);
   }
 }
Beispiel #2
0
  @Override
  public void setAIChoices(String[] value) {

    java.util.List<String> choiceList = new ArrayList<String>();
    for (String v : value) {
      choiceList.add(v);
    }

    aiModel.setList(choiceList);

    if (value.length > 0) {
      aiChoices.setValue(value[0]);
    }
  }