public static abstract class

SuggestBox.SuggestionDisplay

extends Object
java.lang.Object
   ↳ com.google.gwt.user.client.ui.SuggestBox.SuggestionDisplay
Known Direct Subclasses

Class Overview

Used to display suggestions to the user.

Summary

Public Constructors
SuggestBox.SuggestionDisplay()
Protected Methods
abstract SuggestOracle.Suggestion getCurrentSelection()
Get the currently selected SuggestOracle.Suggestion in the display.
abstract void hideSuggestions()
Hide the list of suggestions from view.
abstract void moveSelectionDown()
Highlight the suggestion directly below the current selection in the list.
abstract void moveSelectionUp()
Highlight the suggestion directly above the current selection in the list.
void onEnsureDebugId(String suggestBoxBaseID)
Set the debug id of widgets used in the SuggestionDisplay.
void setMoreSuggestions(boolean hasMoreSuggestions, int numMoreSuggestions)
Accepts information about whether there were more suggestions matching than were provided to showSuggestions(SuggestBox, Collection, boolean, boolean, SuggestBox.SuggestionCallback).
abstract void showSuggestions(SuggestBox suggestBox, Collection<? extends SuggestOracle.Suggestion> suggestions, boolean isDisplayStringHTML, boolean isAutoSelectEnabled, SuggestBox.SuggestionCallback callback)
Update the list of visible suggestions.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SuggestBox.SuggestionDisplay ()

Protected Methods

protected abstract SuggestOracle.Suggestion getCurrentSelection ()

Get the currently selected SuggestOracle.Suggestion in the display.

Returns
  • the current suggestion, or null if none selected

protected abstract void hideSuggestions ()

Hide the list of suggestions from view.

protected abstract void moveSelectionDown ()

Highlight the suggestion directly below the current selection in the list.

protected abstract void moveSelectionUp ()

Highlight the suggestion directly above the current selection in the list.

protected void onEnsureDebugId (String suggestBoxBaseID)

Set the debug id of widgets used in the SuggestionDisplay.

Parameters
suggestBoxBaseID the baseID of the SuggestBox

protected void setMoreSuggestions (boolean hasMoreSuggestions, int numMoreSuggestions)

Accepts information about whether there were more suggestions matching than were provided to showSuggestions(SuggestBox, Collection, boolean, boolean, SuggestBox.SuggestionCallback).

Parameters
hasMoreSuggestions true if more matches were available
numMoreSuggestions number of more matches available. If the specific number is unknown, 0 will be passed.

protected abstract void showSuggestions (SuggestBox suggestBox, Collection<? extends SuggestOracle.Suggestion> suggestions, boolean isDisplayStringHTML, boolean isAutoSelectEnabled, SuggestBox.SuggestionCallback callback)

Update the list of visible suggestions. Use care when using isDisplayStringHtml; it is an easy way to expose script-based security problems.

Parameters
suggestBox the suggest box where the suggestions originated
suggestions the suggestions to show
isDisplayStringHTML should the suggestions be displayed as HTML
isAutoSelectEnabled if true, the first item should be selected automatically
callback the callback used when the user makes a suggestion