public class JFXAutoComplete extends java.lang.Object implements AutoComplete
acceptDuplicates(boolean): true if the dictionnary accept duplicatesJFXAutoComplete.SuggestedHit (also a Label) for the suggestions, with the "autoComplete-hit" styleClass if categories are not used,
and "autoComplete-hit-category" if categories are used| Modifier and Type | Class and Description |
|---|---|
class |
JFXAutoComplete.SuggestedHit
The Label used for the Suggested Hits.
|
class |
JFXAutoComplete.SuggestionHitsListView
A panel for suggested hits.
|
| Modifier and Type | Field and Description |
|---|---|
protected javafx.scene.control.TextInputControl |
textComponent
The text component.
|
| Constructor and Description |
|---|
JFXAutoComplete(javafx.scene.control.TextInputControl textComponent)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptDuplicates(boolean acceptDuplicates)
Set if the dictionnary accept duplicates.
|
void |
addAdditionalSearchSuggestion(java.lang.String typedText)
Add the additional search text suggestion in the popup Window.
|
void |
addAdditionalSearchText(java.lang.String text)
Add the additional search item in the popup.
|
boolean |
addCategory(AutoCompleteDictionary.Category category)
Add a category to the dictionary.
|
void |
addCategory(java.lang.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(java.lang.String category,
AutoCompleteDictionary.Item item)
Add a category to the list of suggestions in the Popup Window.
|
void |
addToDictionary(AutoCompleteDictionary.Item item)
Add an item to the dictionary to use for the autoComplete.
|
void |
addToDictionary(java.lang.String word)
Add a word to the dictionary to use for the autoComplete.
|
void |
addToDictionary(java.lang.String category,
AutoCompleteDictionary.Item item)
Add an item to the dictionary to use for the autoComplete.
|
void |
addToDictionary(java.lang.String category,
java.lang.String word)
Add a word to the dictionary to use for the autoComplete.
|
AutoCompleteDictionary |
getDictionary()
Return the dictionnary used for the Autocompletion.
|
int |
getResultsLimit()
Return the results limits.
|
java.lang.String |
getText()
Return the text component text.
|
javafx.scene.control.TextInputControl |
getTextComponent()
Return the text component.
|
boolean |
hasAdditionalSearchItem()
Return true if there is an additional search item in the popup.
|
boolean |
hasDefaultCategory()
Return true if the dictionnary uses only the default category.
|
boolean |
isAcceptingDuplicates()
Return true if the dictionnary accept duplicates.
|
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 |
setResultsLimit(int limit)
Set the results limits.
|
protected javafx.scene.control.TextInputControl textComponent
public JFXAutoComplete(javafx.scene.control.TextInputControl textComponent)
textComponent - the text Componentpublic void setMaximumPopupSize(int maxWidth,
int maxHeight)
setMaximumPopupSize in interface AutoCompletemaxWidth - the maximum width of the PopupmaxHeight - the maximum height of the Popuppublic void addAdditionalSearchText(java.lang.String text)
addAdditionalSearchText in interface AutoCompletetext - the text for the additional search itempublic boolean hasAdditionalSearchItem()
hasAdditionalSearchItem in interface AutoCompletepublic void setResultsLimit(int limit)
limit - the results limitspublic int getResultsLimit()
getResultsLimit in interface AutoCompletepublic boolean hasDefaultCategory()
public void acceptDuplicates(boolean acceptDuplicates)
acceptDuplicates - true if the dictionnary accept duplicatespublic boolean isAcceptingDuplicates()
public final java.lang.String getText()
public void addCategoryToSuggestions(AutoCompleteDictionary.Category category)
addCategoryToSuggestions in interface AutoCompletecategory - the categorypublic boolean addItemToSuggestions(java.lang.String category,
AutoCompleteDictionary.Item item)
addItemToSuggestions in interface AutoCompletecategory - the category nameitem - the Itempublic void addAdditionalSearchSuggestion(java.lang.String typedText)
addAdditionalSearchSuggestion in interface AutoCompletetypedText - the typed textpublic void resetDictionary()
resetDictionary in interface AutoCompletepublic AutoCompleteDictionary getDictionary()
getDictionary in interface AutoCompletepublic void setDictionnary(AutoCompleteDictionary dictionary)
setDictionnary in interface AutoCompletedictionary - the dictionnarypublic boolean addCategory(AutoCompleteDictionary.Category category)
addCategory in interface AutoCompletecategory - the categorypublic void addCategory(java.lang.String category)
addCategory in interface AutoCompletecategory - the category namepublic void addToDictionary(java.lang.String word)
addToDictionary in interface AutoCompleteword - the wordpublic void addToDictionary(AutoCompleteDictionary.Item item)
addToDictionary in interface AutoCompleteitem - the itempublic void addToDictionary(java.lang.String category,
java.lang.String word)
addToDictionary in interface AutoCompletecategory - the item categoryword - the wordpublic void addToDictionary(java.lang.String category,
AutoCompleteDictionary.Item item)
addToDictionary in interface AutoCompletecategory - the item categoryitem - the itempublic javafx.scene.control.TextInputControl getTextComponent()
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence