javax.swing

Interface ComboBoxEditor

public interface ComboBoxEditor

Provides edit capabilities for {@link JComboBox}es.
Method Summary
voidaddActionListener(ActionListener listener)
This method adds specified ActionListener to this ComboBoxEditor.
ComponentgetEditorComponent()
This method returns component that will be used by the combo box to display/edit currently selected item in the combo box.
ObjectgetItem()
This method returns item that is currently editable.
voidremoveActionListener(ActionListener listener)
This method removes given ActionListener from this ComboBoxEditor.
voidselectAll()
selectAll
voidsetItem(Object item)
Sets item that should be editted when any editting operation is performed by the user.

Method Detail

addActionListener

public void addActionListener(ActionListener listener)
This method adds specified ActionListener to this ComboBoxEditor.

Parameters: listener

getEditorComponent

public Component getEditorComponent()
This method returns component that will be used by the combo box to display/edit currently selected item in the combo box.

Returns: Component that will be used by the combo box to display/edit currently selected item

getItem

public Object getItem()
This method returns item that is currently editable.

Returns: Item in the combo box that is currently editable

removeActionListener

public void removeActionListener(ActionListener listener)
This method removes given ActionListener from this ComboBoxEditor.

Parameters: listener TODO

selectAll

public void selectAll()
selectAll

setItem

public void setItem(Object item)
Sets item that should be editted when any editting operation is performed by the user. The value is always equal to the currently selected value in the combo box. Thus, whenever a different value is selected from the combo box list then this method should be called to change editting item to the new selected item.

Parameters: item item that is currently selected in the combo box