How to disable autocomplete but keep autosuggestion using GlazedLists?

107 Views Asked by At

This code makes an autocomplete and autosuggestion box for me:

if (dataAutoCompleteSearch != null) {
        autoCompleteSupport = AutoCompleteSupport.install(jComboBox1, GlazedLists.eventListOf(dataAutoCompleteSearch));
}

The problem occurs when I search for names that contain UTF-8 characters that are not in the data, but start with a few words in the suggestion box. I could not type these UTF-8 words correctly because the text was added by itself (blue highlighted).

I want to disable GlazedLists autocomplete (Auto add highlighted text when typing) because it is very difficult to type a UTF-8 character. But I want to keep the suggestion box, looking like Google search.

enter image description here

1

There are 1 best solutions below

1
On

No. The API of AutoCompleteSupport doesn't support this option. You'd basically have to roll your own version of AutoCompleteSupport (it's all open source) and modify it yourself to stop the auto-complete part. I've just had a quick peak at it and it's quite large and I don't have an immediate solution to offer. It'll probably require a bit of experimenting. The private AutoCompleteFilter class would be my first place to start looking at.