Class JAutoCompleteWindow

All Implemented Interfaces:
MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CaretListener, ListSelectionListener, RootPaneContainer

public class JAutoCompleteWindow extends JWindow implements CaretListener, ListSelectionListener, MouseListener
See Also:
  • Constructor Details

  • Method Details

    • installEditor

      public static JAutoCompleteWindow installEditor(JEditorPane editor, JCompletion jCompletionSupplier)
    • valueChanged

      public void valueChanged(ListSelectionEvent e)
      Called when a new item is selected in the popup list.
      Specified by:
      valueChanged in interface ListSelectionListener
      Parameters:
      e - The event.
    • showPopup

      public void showPopup()
    • setCompletionProposals

      public void setCompletionProposals(List<JCompletionProposal> completionProposals)
    • getListModel

      protected FastListModel<JCompletionProposal> getListModel()
    • caretUpdate

      public void caretUpdate(CaretEvent e)
      Specified by:
      caretUpdate in interface CaretListener
    • getLineAtCaret

      protected int getLineAtCaret()
    • setLocationRelativeTo

      public void setLocationRelativeTo(Rectangle r)
      Sets the location of this window to be "good" relative to the specified rectangle. That rectangle should be the location of the text component's caret, in screen coordinates.
      Parameters:
      r - The text component's caret position, in screen coordinates.
    • getSelection

      public JCompletionProposal getSelection()
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class Window
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Invoked when the mouse button has been clicked (pressed and released) on a component.
      Specified by:
      mouseClicked in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent e)
      Invoked when a mouse button has been pressed on a component.
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Invoked when a mouse button has been released on a component.
      Specified by:
      mouseReleased in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Invoked when the mouse enters a component.
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent e)
      Invoked when the mouse exits a component.
      Specified by:
      mouseExited in interface MouseListener