Module jEdit

Class CompletionPopup

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer
Direct Known Subclasses:
CompleteWord

public class CompletionPopup extends JWindow
Popup window for word completion in text area. This class provides basic UI of completion popup.
Since:
jEdit 4.3pre11
See Also:
  • Constructor Details

    • CompletionPopup

      public CompletionPopup(View view)
      Create a completion popup. It is not shown until reset() method is called with valid candidates. All key events for the view are intercepted by this popup untill end of completion.
      Since:
      jEdit 4.3pre13
    • CompletionPopup

      public CompletionPopup(View view, Point location)
  • Method Details

    • dispose

      public void dispose()
      Quit completion.
      Overrides:
      dispose in class Window
    • reset

      public void reset(CompletionPopup.Candidates candidates, boolean active)
      Start completion.
      Parameters:
      candidates - The candidates of this completion
      active - Set focus to the popup
    • getCandidates

      public CompletionPopup.Candidates getCandidates()
      Current candidates of completion.
    • getSelectedIndex

      public int getSelectedIndex()
      Returns index of current selection. Returns -1 if nothing is selected.
    • setSelectedIndex

      public void setSelectedIndex(int index)
      Set selection.
    • doSelectedCompletion

      public boolean doSelectedCompletion()
      Do completion with current selection and quit.
    • keyPressed

      protected void keyPressed(KeyEvent e)
      Handle key pressed events. Override this method to make additional key handing.
    • keyTyped

      protected void keyTyped(KeyEvent e)
      Handle key typed events. Override this method to make additional key handing.