|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.autocomplete.AbstractAutoCompleteAdaptor
public abstract class AbstractAutoCompleteAdaptor
This is the interface that binds the mechanism for automatic completion to a data model, a selection model (e.g. those used by JList, JComboBox and JTable) and the JTextComponent for which the automatic completion should happen. It is used to search and select a matching item and to mark the completed text inside the JTextComponent. Using this interface the mechanism for automatic completion is independent from the underlying data and selection model.
ComboBoxAdaptor,
ListAdaptor| Constructor Summary | |
|---|---|
AbstractAutoCompleteAdaptor()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractAutoCompleteAdaptor()
| Method Detail |
|---|
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 returned
indexpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||