T - Model-Type of the suggestionspublic abstract class AutoCompletionBinding<T> extends Object implements EventTarget
To use the autocompletion functionality, refer to the TextFields class.
TextFields| Type | Property and Description |
|---|---|
ObjectProperty<EventHandler<AutoCompletionBinding.AutoCompletionEvent<T>>> |
onAutoCompleted |
| Modifier and Type | Class and Description |
|---|---|
static class |
AutoCompletionBinding.AutoCompletionEvent<TE>
Represents an Event which is fired after an auto completion.
|
static interface |
AutoCompletionBinding.ISuggestionRequest
Represents a suggestion fetch request
|
| Modifier | Constructor and Description |
|---|---|
protected |
AutoCompletionBinding(Node completionTarget,
Callback<AutoCompletionBinding.ISuggestionRequest,Collection<T>> suggestionProvider,
StringConverter<T> converter)
Creates a new AutoCompletionBinding
|
| Modifier and Type | Method and Description |
|---|---|
<E extends Event> |
addEventHandler(EventType<E> eventType,
EventHandler<E> eventHandler)
Registers an event handler to this EventTarget.
|
EventDispatchChain |
buildEventDispatchChain(EventDispatchChain tail) |
protected abstract void |
completeUserInput(T completion)
Complete the current user-input with the provided completion.
|
abstract void |
dispose()
Disposes the binding.
|
protected void |
fireAutoCompletion(T completion) |
Node |
getCompletionTarget()
Gets the target node for auto completion
|
EventHandler<AutoCompletionBinding.AutoCompletionEvent<T>> |
getOnAutoCompleted()
Gets the value of the property onAutoCompleted.
|
protected void |
hidePopup()
Hide the auto completion targets
|
ObjectProperty<EventHandler<AutoCompletionBinding.AutoCompletionEvent<T>>> |
onAutoCompletedProperty() |
<E extends Event> |
removeEventHandler(EventType<E> eventType,
EventHandler<E> eventHandler)
Unregisters a previously registered event handler from this EventTarget.
|
void |
setOnAutoCompleted(EventHandler<AutoCompletionBinding.AutoCompletionEvent<T>> value)
Set a event handler which is invoked after an auto completion.
|
void |
setUserInput(String userText)
Set the current text the user has entered
|
protected void |
showPopup()
Show the auto completion popup
|
public final ObjectProperty<EventHandler<AutoCompletionBinding.AutoCompletionEvent<T>>> onAutoCompletedProperty
protected AutoCompletionBinding(Node completionTarget, Callback<AutoCompletionBinding.ISuggestionRequest,Collection<T>> suggestionProvider, StringConverter<T> converter)
completionTarget - The target node to which auto-completion shall be addedsuggestionProvider - The strategy to retrieve suggestionsconverter - The converter to be used to convert suggestions to stringspublic final void setUserInput(String userText)
userText - public Node getCompletionTarget()
public abstract void dispose()
protected abstract void completeUserInput(T completion)
completion - protected void showPopup()
protected void hidePopup()
protected void fireAutoCompletion(T completion)
public final void setOnAutoCompleted(EventHandler<AutoCompletionBinding.AutoCompletionEvent<T>> value)
value - public final EventHandler<AutoCompletionBinding.AutoCompletionEvent<T>> getOnAutoCompleted()
public final ObjectProperty<EventHandler<AutoCompletionBinding.AutoCompletionEvent<T>>> onAutoCompletedProperty()
public <E extends Event> void addEventHandler(EventType<E> eventType, EventHandler<E> eventHandler)
Event of the specified type during the bubbling
phase of event delivery.E - the specific event class of the handlereventType - the type of the events to receive by the handlereventHandler - the handler to registerNullPointerException - if the event type or handler is nullpublic <E extends Event> void removeEventHandler(EventType<E> eventType, EventHandler<E> eventHandler)
E - the specific event class of the handlereventType - the event type from which to unregistereventHandler - the handler to unregisterNullPointerException - if the event type or handler is nullpublic EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
buildEventDispatchChain in interface EventTarget