void (final String value) { final JComboBox<Pair<String, Icon>> component = getComponent(); if (!isValidValue(value)) { component.setEditable(true); } component.setSelectedItem(new ComboBoxItem(value, myIcons.get(value))); component.setEditable(false); }