Class AbstractAutoCompleterView

    • Constructor Detail

      • AbstractAutoCompleterView

        public AbstractAutoCompleterView​(java.lang.String name)
        Creates a new auto-completer view.
        Parameters:
        name - the name of this view
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns:
        the name
      • setParent

        public void setParent​(AutoCompleter completer)
        Set the AutoCompleter that this view belongs to.
        Parameters:
        completer -
      • getTokenizer

        public ITokenizer getTokenizer()
        Return the tokenizer for use with the view. Custom views should override this if they have special tokenization needs.
      • getTargetLanguage

        public Language getTargetLanguage()
        Return the target language currently in use.
      • processKeys

        public abstract boolean processKeys​(java.awt.event.KeyEvent e)
        Process the autocompletion keys
        Parameters:
        e - the key event to process
        Returns:
        true if a key has been processed, false if otherwise.
      • getRowCount

        public abstract int getRowCount()
        return the size of the data list / array.
        Returns:
      • getPreferredHeight

        public abstract int getPreferredHeight()
        get the preferred height of the component
        Returns:
      • getPreferredWidth

        public abstract int getPreferredWidth()
        get the preferred width of the component
        Returns:
      • getSelectedValue

        public abstract AutoCompleterItem getSelectedValue()
        get the selected value
        Returns:
      • updateViewData

        public abstract void updateViewData()
        Update the view data
      • getViewContent

        public abstract java.awt.Component getViewContent()
        Obtain the content to put in the autocompleter popup. The view should also do any other preparation necessary for display.
        Returns:
        the component to show in the autocompleter popup
      • shouldPopUp

        public abstract boolean shouldPopUp()
        Return true to indicate that the view has relevant contextual suggestions that merit displaying the AutoCompleter popup unprompted.
        Returns:
        Whether or not the AutoCompleter should appear
      • shouldCloseOnSelection

        public boolean shouldCloseOnSelection()
        Indicates whether or not the AutoCompleter should close by default when the user confirms a selection. Override and return false to keep the popup open.
        Returns:
        Whether or not the AutoCompleter popup should close upon selection