|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.autocomplete.AbstractAutoCompleteAdaptor
org.jdesktop.swingx.autocomplete.ComboBoxAdaptor
public class ComboBoxAdaptor
An implementation of the AbstractAutoCompleteAdaptor that is suitable for JComboBox.
Constructor Summary | |
---|---|
ComboBoxAdaptor(JComboBox comboBox)
Creates a new ComobBoxAdaptor for the given combobox. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.jdesktop.swingx.autocomplete.AbstractAutoCompleteAdaptor |
---|
getSelectedItemAsString, listContainsSelectedItem, markEntireText, markText, setSelectedItemAsString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComboBoxAdaptor(JComboBox comboBox)
comboBox
- the combobox that should be adaptedMethod Detail |
---|
public void actionPerformed(ActionEvent actionEvent)
actionPerformed
in interface ActionListener
actionEvent
- -public int getItemCount()
AbstractAutoCompleteAdaptor
getItemCount
in class AbstractAutoCompleteAdaptor
public Object getItem(int index)
AbstractAutoCompleteAdaptor
0<=index<getItemCount()
.
getItem
in class AbstractAutoCompleteAdaptor
index
- the index of the item that is to be returned
index
public void setSelectedItem(Object item)
AbstractAutoCompleteAdaptor
setSelectedItem
in class AbstractAutoCompleteAdaptor
item
- the item that is to be selectedpublic Object getSelectedItem()
AbstractAutoCompleteAdaptor
getSelectedItem
in class AbstractAutoCompleteAdaptor
public JTextComponent getTextComponent()
AbstractAutoCompleteAdaptor
getTextComponent
in class AbstractAutoCompleteAdaptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |