Class AutoCompletion.TextComponentListener

  • All Implemented Interfaces:
    java.awt.event.FocusListener, java.awt.event.HierarchyListener, java.util.EventListener
    Enclosing class:
    AutoCompletion

    private class AutoCompletion.TextComponentListener
    extends java.awt.event.FocusAdapter
    implements java.awt.event.HierarchyListener
    Listens for events from the text component we're installed on.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void addTo​(javax.swing.text.JTextComponent tc)  
      void focusLost​(java.awt.event.FocusEvent e)
      Hide the auto-completion windows when the text component loses focus.
      void hierarchyChanged​(java.awt.event.HierarchyEvent e)
      Called when the component hierarchy for our text component changes.
      void removeFrom​(javax.swing.text.JTextComponent tc)  
      • Methods inherited from class java.awt.event.FocusAdapter

        focusGained
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextComponentListener

        private TextComponentListener()
    • Method Detail

      • addTo

        void addTo​(javax.swing.text.JTextComponent tc)
      • focusLost

        public void focusLost​(java.awt.event.FocusEvent e)
        Hide the auto-completion windows when the text component loses focus.
        Specified by:
        focusLost in interface java.awt.event.FocusListener
        Overrides:
        focusLost in class java.awt.event.FocusAdapter
      • hierarchyChanged

        public void hierarchyChanged​(java.awt.event.HierarchyEvent e)
        Called when the component hierarchy for our text component changes. When the text component is added to a new Window, this method registers listeners on that Window.
        Specified by:
        hierarchyChanged in interface java.awt.event.HierarchyListener
        Parameters:
        e - The event.
      • removeFrom

        public void removeFrom​(javax.swing.text.JTextComponent tc)