*/
public class CountryCodeListCellRenderer extends DefaultListCellRenderer {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
CountryCode countryCode = CountryCode.class.cast(value);
String text;
if (countryCode != null) {
if (None.equals(countryCode))
text = RouteConverter.getBundle().getString("country-code-none");
else
text = countryCode.name().replaceAll("_", " ") +
" (" + countryCode.value() + ")";
} else
text = null;
label.setText(text);
return label;
}