Class AutoCompleter

java.lang.Object
org.omegat.gui.editor.autocompleter.AutoCompleter
All Implemented Interfaces:
IAutoCompleter

public class AutoCompleter extends Object implements IAutoCompleter
The controller part of the auto-completer
  • Field Details

  • Constructor Details

  • Method Details

    • addView

      @Deprecated public void addView(AbstractAutoCompleterView view)
      Deprecated.
      Description copied from interface: IAutoCompleter
      Add a view to the autocompleter.
      Specified by:
      addView in interface IAutoCompleter
      Parameters:
      view - the view to add
    • processKeys

      public boolean processKeys(KeyEvent e)
      Process the autocompletion keys
      Specified by:
      processKeys in interface IAutoCompleter
      Parameters:
      e - the key event to process
      Returns:
      true if a key has been processed, false if otherwise.
    • doSelection

      public void doSelection()
    • updatePopup

      public void updatePopup(boolean onlyIfVisible)
      Show the popup list.
      Specified by:
      updatePopup in interface IAutoCompleter
      Parameters:
      onlyIfVisible - true to update only if visible, false otherwise.
    • getCurrentView

      public AbstractAutoCompleterView getCurrentView()
    • isVisible

      public boolean isVisible()
      Description copied from interface: IAutoCompleter
      Check if the autocompleter is visible.
      Specified by:
      isVisible in interface IAutoCompleter
      Returns:
      true if visible, false otherwise.
    • setVisible

      public void setVisible(boolean isVisible)
      Description copied from interface: IAutoCompleter
      Set the visibility of the autocompleter.
      Specified by:
      setVisible in interface IAutoCompleter
      Parameters:
      isVisible - true to show, false to hide.
    • keyText

      public String keyText(int base, int modifier)
      get the key text
    • textDidChange

      public void textDidChange()
      Description copied from interface: IAutoCompleter
      Notify the autocompleter that the text has changed.
      Specified by:
      textDidChange in interface IAutoCompleter
    • resetKeys

      public final void resetKeys()
      Description copied from interface: IAutoCompleter
      Reset the autocompletion keys.
      Specified by:
      resetKeys in interface IAutoCompleter