public class ComboBoxAdaptor extends AbstractAutoCompleteAdaptor implements ActionListener
| Constructor and Description |
|---|
ComboBoxAdaptor(JComboBox comboBox)
Creates a new ComobBoxAdaptor for the given combobox.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent actionEvent)
Implementation side effect - do not invoke.
|
Object |
getItem(int index)
Returns the item at a given index.
|
int |
getItemCount()
Returns the number of items in the list.
|
Object |
getSelectedItem()
Returns the currently selected item.
|
JTextComponent |
getTextComponent()
Returns the text component that is being used for the automatic completion.
|
void |
setSelectedItem(Object item)
Sets the selected item.
|
getSelectedItemAsString, listContainsSelectedItem, markEntireText, markText, setSelectedItemAsStringpublic ComboBoxAdaptor(JComboBox comboBox)
comboBox - the combobox that should be adaptedpublic void actionPerformed(ActionEvent actionEvent)
actionPerformed in interface ActionListeneractionEvent - -public int getItemCount()
AbstractAutoCompleteAdaptorgetItemCount in class AbstractAutoCompleteAdaptorpublic Object getItem(int index)
AbstractAutoCompleteAdaptor0<=index<getItemCount().getItem in class AbstractAutoCompleteAdaptorindex - the index of the item that is to be returnedindexpublic void setSelectedItem(Object item)
AbstractAutoCompleteAdaptorsetSelectedItem in class AbstractAutoCompleteAdaptoritem - the item that is to be selectedpublic Object getSelectedItem()
AbstractAutoCompleteAdaptorgetSelectedItem in class AbstractAutoCompleteAdaptorpublic JTextComponent getTextComponent()
AbstractAutoCompleteAdaptorgetTextComponent in class AbstractAutoCompleteAdaptorCopyright © 2017. All Rights Reserved.