/** * Populates the model with the list of standard values. If the data contains a non-standard value * it is displayed in the combo box as an additional element. */ protected void populate() { values.clear(); for (TurnRestrictionType type : TurnRestrictionType.values()) { values.add(type); } String tagValue = model.getRestrictionTagValue(); if (tagValue.trim().equals("")) { selectedTagValue = null; } else { TurnRestrictionType type = TurnRestrictionType.fromTagValue(tagValue); if (type == null) { values.add(0, tagValue); selectedTagValue = tagValue; } else { selectedTagValue = type.getTagValue(); } } fireContentsChanged(); }