Verified Owner
Top Description Fields Constructors Methods
org.jabref.gui.autocompleter

public Class AutoCompletionTextInputBinding<T>

extends AutoCompletionBinding<T>
Class Inheritance
Imports
java.util.Collection, javafx.beans.value.ChangeListener, javafx.scene.control.TextInputControl, javafx.util.Callback, .StringConverter, org.jabref.gui.util.UiTaskExecutor, org.controlsfx.control.textfield.AutoCompletionBinding

Represents a binding between a text input control and an auto-completion popup This class is a slightly modified version of impl.org.controlsfx.autocompletion.AutoCompletionTextFieldBinding that works with general text input controls instead of just text fields.

Field Summary

Modifier and TypeField and Description
private StringConverter<T>
converter

String converter to be used to convert suggestions to strings.

private final ChangeListener<Boolean>
private AutoCompletionStrategy
private boolean
private final ChangeListener<String>

Constructor Summary

AccessConstructor and Description
private
AutoCompletionTextInputBinding(final TextInputControl textInputControl, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider)

Creates a new auto-completion binding between the given textInputControl and the given suggestion provider.

private
AutoCompletionTextInputBinding(final TextInputControl textInputControl, final Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, final StringConverter<T> converter)

private
AutoCompletionTextInputBinding(final TextInputControl textInputControl, final Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, final StringConverter<T> converter, final AutoCompletionStrategy inputAnalyzer)

Method Summary

Modifier and TypeMethod and Description
public static <T> void
public static <T> void
public static <T> AutoCompletionTextInputBinding<T>
public static <T> AutoCompletionTextInputBinding<T>
protected void
completeUserInput(T completion)

Implements abstract org.controlsfx.control.textfield.AutoCompletionBinding.completeUserInput.

Complete the current user-input with the provided completion.

private static <T> StringConverter<T>
public void
dispose()

Implements abstract org.controlsfx.control.textfield.AutoCompletionBinding.dispose.

Disposes the binding.

public TextInputControl
public void
setShowOnFocus(boolean showOnFocus)

private void
Inherited from org.controlsfx.control.textfield.AutoCompletionBinding:
addEventHandlerbuildEventDispatchChainfireAutoCompletiongetAutoCompletionPopupgetMaxWidthgetMinWidthgetOnAutoCompletedgetPrefWidthgetVisibleRowCounthidePopupmaxWidthPropertyminWidthPropertyonAutoCompletedPropertyprefWidthPropertyremoveEventHandlersetDelaysetHideOnEscapesetMaxWidthsetMinWidthsetOnAutoCompletedsetPrefWidthsetUserInputsetVisibleRowCountshowPopupvisibleRowCountProperty

Field Detail

converterback to summary
private StringConverter<T> converter

String converter to be used to convert suggestions to strings.

focusChangedListenerback to summary
private final ChangeListener<Boolean> focusChangedListener
inputAnalyzerback to summary
private AutoCompletionStrategy inputAnalyzer
showOnFocusback to summary
private boolean showOnFocus
textChangeListenerback to summary
private final ChangeListener<String> textChangeListener

Constructor Detail

AutoCompletionTextInputBindingback to summary
private AutoCompletionTextInputBinding(final TextInputControl textInputControl, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider)

Creates a new auto-completion binding between the given textInputControl and the given suggestion provider.

AutoCompletionTextInputBindingback to summary
private AutoCompletionTextInputBinding(final TextInputControl textInputControl, final Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, final StringConverter<T> converter)
AutoCompletionTextInputBindingback to summary
private AutoCompletionTextInputBinding(final TextInputControl textInputControl, final Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, final StringConverter<T> converter, final AutoCompletionStrategy inputAnalyzer)

Method Detail

autoCompleteback to summary
public static <T> void autoComplete(TextInputControl textArea, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider)
autoCompleteback to summary
public static <T> void autoComplete(TextInputControl textArea, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, StringConverter<T> converter)
autoCompleteback to summary
public static <T> AutoCompletionTextInputBinding<T> autoComplete(TextInputControl textArea, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, StringConverter<T> converter, AutoCompletionStrategy inputAnalyzer)
autoCompleteback to summary
public static <T> AutoCompletionTextInputBinding<T> autoComplete(TextInputControl textArea, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, AutoCompletionStrategy inputAnalyzer)
completeUserInputback to summary
protected void completeUserInput(T completion)

Implements abstract org.controlsfx.control.textfield.AutoCompletionBinding.completeUserInput.

Doc from org.controlsfx.control.textfield.AutoCompletionBinding.completeUserInput.

Complete the current user-input with the provided completion. Sub-classes have to provide a concrete implementation.

Annotations
@Override
defaultStringConverterback to summary
private static <T> StringConverter<T> defaultStringConverter()
disposeback to summary
public void dispose()

Implements abstract org.controlsfx.control.textfield.AutoCompletionBinding.dispose.

Doc from org.controlsfx.control.textfield.AutoCompletionBinding.dispose.

Disposes the binding.

Annotations
@Override
getCompletionTargetback to summary
public TextInputControl getCompletionTarget()

Overrides org.controlsfx.control.textfield.AutoCompletionBinding.getCompletionTarget.

Doc from org.controlsfx.control.textfield.AutoCompletionBinding.getCompletionTarget.

Gets the target node for auto completion

Annotations
@Override
setShowOnFocusback to summary
public void setShowOnFocus(boolean showOnFocus)
setUserInputTextback to summary
private void setUserInputText(String newText)