Class SuggestionPopup

    • Constructor Detail

      • SuggestionPopup

        public SuggestionPopup()
      • SuggestionPopup

        public SuggestionPopup​(List<?> suggestions)
    • Method Detail

      • getTextInput

        public TextInput getTextInput()
        Returns:
        The text input for which suggestions will be provided.
      • getSuggestionData

        public List<?> getSuggestionData()
        Returns:
        The list of suggestions presented by the popup.
      • setSuggestionData

        public void setSuggestionData​(List<?> suggestionData)
        Sets the list of suggestions presented by the popup.
        Parameters:
        suggestionData - The new list of suggestions to present.
      • getSuggestionRenderer

        public ListView.ItemRenderer getSuggestionRenderer()
        Returns:
        The list view item renderer used to present suggestions.
      • setSuggestionRenderer

        public void setSuggestionRenderer​(ListView.ItemRenderer suggestionRenderer)
        Sets the list view item renderer used to present suggestions.
        Parameters:
        suggestionRenderer - The new item renderer.
      • getSelectedIndex

        public int getSelectedIndex()
        Returns the current selection.
        Returns:
        The index of the currently selected suggestion, or -1 if nothing is selected.
      • setSelectedIndex

        public void setSelectedIndex​(int selectedIndex)
        Sets the selection.
        Parameters:
        selectedIndex - The index of the suggestion to select, or -1 to clear the selection.
      • getSelectedSuggestion

        public java.lang.Object getSelectedSuggestion()
      • setSelectedSuggestion

        public void setSelectedSuggestion​(java.lang.Object suggestion)
        Set the selected suggestion.
        Parameters:
        suggestion - The new item to select (can be null to make nothing selected).
      • getListSize

        public int getListSize()
        Returns:
        The list size.
      • setListSize

        public void setListSize​(int listSize)
        Sets the list size. If the number of items in the list exceeds this value, the list will scroll.
        Parameters:
        listSize - The new number of items that are visible.
      • open

        public final void open​(Display display,
                               Window owner)
        Description copied from class: Window
        Opens the window.

        Note that this method is not a synchronous call, it schedules an event to open the window.

        Overrides:
        open in class Window
        Parameters:
        display - The display on which the window will be opened.
        owner - The window's owner, or null if the window has no owner.
      • open

        public final void open​(TextInput textInputArgument)
        Opens the suggestion popup window.
        Parameters:
        textInputArgument - The text input for which suggestions will be provided.
      • open

        public void open​(TextInput textInputArgument,
                         SuggestionPopupCloseListener suggestionPopupCloseListenerArgument)
        Opens the suggestion popup window.
        Parameters:
        textInputArgument - The text input for which suggestions will be provided.
        suggestionPopupCloseListenerArgument - A listener that will be called when the suggestion popup has closed.
      • isClosing

        public boolean isClosing()
        Description copied from class: Window
        Returns this window's closing state.
        Overrides:
        isClosing in class Window
        Returns:
        true if the window is closing; false otherwise.
      • close

        public final void close()
        Description copied from class: Window
        Closes the window and all of its owned windows. If any owned window fails to close, this window will also fail to close.
        Overrides:
        close in class Window
      • close

        public void close​(boolean resultArgument)
      • getResult

        public boolean getResult()