Class AbstractSuggestBoxNewEditor.SuggestionDisplay

    • Constructor Detail

      • SuggestionDisplay

        public SuggestionDisplay()
    • Method Detail

      • getCurrentSelection

        protected abstract com.google.gwt.user.client.ui.SuggestOracle.Suggestion getCurrentSelection()
        Get the currently selected SuggestOracle.Suggestion in the display.
        Returns:
        the current suggestion, or null if none selected
      • hideSuggestions

        protected abstract void hideSuggestions()
        Hide the list of suggestions from view.
      • moveSelectionDown

        protected abstract void moveSelectionDown()
        Highlight the suggestion directly below the current selection in the list.
      • moveSelectionUp

        protected abstract void moveSelectionUp()
        Highlight the suggestion directly above the current selection in the list.
      • onEnsureDebugId

        protected void onEnsureDebugId​(String suggestBoxBaseID)
        Set the debug id of widgets used in the SuggestionDisplay.
        Parameters:
        suggestBoxBaseID - the baseID of the AbstractSuggestBoxNewEditor
        See Also:
        UIObject.onEnsureDebugId(String)
      • showSuggestions

        protected abstract void showSuggestions​(AbstractSuggestBoxNewEditor suggestBox,
                                                Collection<? extends com.google.gwt.user.client.ui.SuggestOracle.Suggestion> suggestions,
                                                boolean isDisplayStringHtml,
                                                boolean isAutoSelectEnabled,
                                                AbstractSuggestBoxNewEditor.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
      • isSuggestionListShowing

        public boolean isSuggestionListShowing()
        Check whether or not the list of suggestions is being shown.
        Returns:
        true if the suggestions are visible, false if not