public interface AutoComplete
Modifier and Type | Method and Description |
---|---|
default void |
addAdditionalSearchItem(String template)
Add the additional search item in the popup.
|
default void |
addAdditionalSearchSuggestion(String typedText)
Add the additional search text suggestion in the popup Window.Do nothing by default.
|
boolean |
addCategory(AutoCompleteDictionary.Category category)
Add a category to the dictionary.
|
AutoCompleteDictionary.Category |
addCategory(String category)
Add a category to the dictionary.
|
void |
addCategoryToSuggestions(AutoCompleteDictionary.Category category)
Add a category to the list of suggestions in the Popup Window.
|
boolean |
addItemToSuggestions(String category,
AutoCompleteDictionary.Item item)
Add a category to the list of suggestions in the Popup Window.This method maybe used in
an
AutoCompleteEngine used for the search with a Popup Window. |
boolean |
addToDictionary(AutoCompleteDictionary.Item item)
Add an item to the dictionary to use for the autoComplete.
|
boolean |
addToDictionary(String word)
Add a word to the dictionary to use for the autoComplete.
|
boolean |
addToDictionary(String category,
AutoCompleteDictionary.Item item)
Add an item to the dictionary to use for the autoComplete.
|
boolean |
addToDictionary(String category,
String word)
Add a word to the dictionary to use for the autoComplete.
|
AutoCompleteDictionary |
getDictionary()
Return the dictionnary used for the Autocompletion.
|
default int |
getResultsLimit()
Return the results limits.
|
default boolean |
hasAdditionalSearchItem()
Return true if there is an additional search item in the popup.
|
boolean |
isCaseSensitive()
Return true if the search is case sensitive.
|
boolean |
isSearchingHitsFromStart()
Return true if the search begins from the start of the typed text.
|
boolean |
removeCategory(AutoCompleteDictionary.Category category)
Remove a category from the dictionary.
|
boolean |
removeCategory(String category)
Remove a category from the dictionary.
|
boolean |
removeFromDictionary(AutoCompleteDictionary.Item item)
Remove an item from the dictionary to use for the autoComplete.
|
boolean |
removeFromDictionary(String word)
Remove a word from the dictionary to use for the autoComplete.
|
boolean |
removeFromDictionary(String category,
AutoCompleteDictionary.Item item)
Remove an item from the dictionary to use for the autoComplete.
|
boolean |
removeFromDictionary(String category,
String word)
Remove a word from the dictionary to use for the autoComplete.
|
void |
resetDictionary()
Reset the Dictionnary to use for the autoComplete.
|
void |
setDictionnary(AutoCompleteDictionary dictionary)
Set the dictionnary used for the Autocompletion.
|
void |
setMaximumPopupSize(int maxWidth,
int maxHeight)
Set the maximum width and height of the Popup.
|
void |
setOnlineEngine(AutoCompleteOnlineEngine engine)
Set the search engine used for the Autocomplete without Popup.
|
void |
setPopupEngine(AutoCompleteEngine engine)
Set the search engine used for the Autocomplete with Popup.
|
AutoCompleteDictionary getDictionary()
void setDictionnary(AutoCompleteDictionary dictionary)
dictionary
- the dictionnaryvoid resetDictionary()
boolean addCategory(AutoCompleteDictionary.Category category)
category
- the categoryAutoCompleteDictionary.Category addCategory(String category)
category
- the category nameboolean removeCategory(AutoCompleteDictionary.Category category)
category
- the categoryboolean removeCategory(String category)
category
- the category nameboolean addToDictionary(String word)
word
- the wordboolean addToDictionary(AutoCompleteDictionary.Item item)
item
- the itemboolean addToDictionary(String category, String word)
category
- the item categoryword
- the wordboolean addToDictionary(String category, AutoCompleteDictionary.Item item)
category
- the item categoryitem
- the itemboolean removeFromDictionary(String word)
word
- the wordboolean removeFromDictionary(AutoCompleteDictionary.Item item)
item
- the itemboolean removeFromDictionary(String category, String word)
category
- the item categoryword
- the wordboolean removeFromDictionary(String category, AutoCompleteDictionary.Item item)
category
- the item categoryitem
- the itemvoid setMaximumPopupSize(int maxWidth, int maxHeight)
maxWidth
- the maximum width of the PopupmaxHeight
- the maximum height of the Popupvoid setPopupEngine(AutoCompleteEngine engine)
engine
- the search enginevoid setOnlineEngine(AutoCompleteOnlineEngine engine)
engine
- the search enginevoid addCategoryToSuggestions(AutoCompleteDictionary.Category category)
AutoCompleteEngine
used for the search with a Popup Window.category
- the categorysetPopupEngine(org.mdiutil.text.autocomplete.AutoCompleteEngine)
boolean addItemToSuggestions(String category, AutoCompleteDictionary.Item item)
AutoCompleteEngine
used for the search with a Popup Window.category
- the category nameitem
- the ItemsetPopupEngine(org.mdiutil.text.autocomplete.AutoCompleteEngine)
default void addAdditionalSearchSuggestion(String typedText)
typedText
- the typed textboolean isCaseSensitive()
boolean isSearchingHitsFromStart()
default int getResultsLimit()
default void addAdditionalSearchItem(String template)
MessageConstructor
utility class.
For example If additionalSearchText = "Containing: $1 cents", the result for the typed text "toto" will be "Containing: toto".template
- the template for the additional search itemdefault boolean hasAdditionalSearchItem()