org.jdesktop.swingx.autocomplete
public abstract class AbstractAutoCompleteAdaptor extends java.lang.Object
ComboBoxAdaptor
,
ListAdaptor
Constructor and Description |
---|
AbstractAutoCompleteAdaptor() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
getItem(int index)
Returns the item at a given index.
|
abstract int |
getItemCount()
Returns the number of items in the list.
|
abstract java.lang.Object |
getSelectedItem()
Returns the currently selected item.
|
java.lang.String |
getSelectedItemAsString()
Returns the string representation in use for the currently selected item.
|
abstract javax.swing.text.JTextComponent |
getTextComponent()
Returns the text component that is being used for the automatic completion.
|
boolean |
listContainsSelectedItem()
Returns true if the list contains the currently selected item.
|
void |
markEntireText()
Marks/selects the entire text that is displayed inside the text component.
|
void |
markText(int start)
Marks/selects the text that is displayed inside the text component starting from the
character with index start.
|
abstract void |
setSelectedItem(java.lang.Object item)
Sets the selected item.
|
void |
setSelectedItemAsString(java.lang.String itemAsString)
Sets the string representation in use for the currently selected item.
|
public abstract java.lang.Object getSelectedItem()
public abstract void setSelectedItem(java.lang.Object item)
item
- the item that is to be selectedpublic java.lang.String getSelectedItemAsString()
public void setSelectedItemAsString(java.lang.String itemAsString)
itemAsString
- the string representation in use for the currently selected itempublic abstract int getItemCount()
public abstract java.lang.Object getItem(int index)
0<=index<getItemCount()
.index
- the index of the item that is to be returnedindex
public boolean listContainsSelectedItem()
public abstract javax.swing.text.JTextComponent getTextComponent()
public void markEntireText()
public void markText(int start)
start
- index of the first character that should be marked