when an item is selected enable the combo box without checking if the field is empty

cusax-fix
Yana Stamcheva 20 years ago
parent 4dad4e6061
commit 950daef02b

@ -77,15 +77,12 @@ public boolean isComboFieldEmpty()
/**
* Handles events triggered by user selection. Enables the call button
* when user selects something the combo box.
* when user selects something in the combo box.
*/
public void actionPerformed(ActionEvent e)
{
if(!isComboFieldEmpty()) {
callManager.setCallMetaContact(false);
callManager.getCallButton().setEnabled(true);
}
{
callManager.setCallMetaContact(false);
callManager.getCallButton().setEnabled(true);
}
public void focusGained(FocusEvent e)
@ -113,7 +110,7 @@ public FilterableComboBoxModel(List items) {
this.items = new ArrayList(items);
filteredItems = new ArrayList(items.size());
updateFilteredItems();
updateFilteredItems();
}
public void addElement( Object obj ) {
@ -216,17 +213,17 @@ public CallComboEditor() {
public Component getEditorComponent() { return text; }
public void setItem(Object item) {
if(filtering)
return;
setting = true;
String newText = (item == null) ? "" : item.toString();
text.setText(newText);
setting = false;
}
public Object getItem() {
public Object getItem() {
return text.getText();
}

Loading…
Cancel
Save