Class WindowOnTopListener

  • All Implemented Interfaces:
    java.awt.event.WindowFocusListener, java.util.EventListener, javax.swing.event.AncestorListener

    public class WindowOnTopListener
    extends java.lang.Object
    implements javax.swing.event.AncestorListener, java.awt.event.WindowFocusListener
    A listener for windows that block other inputs, to ensure they are always on top
    Since:
    18923
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean wasAlwaysOnTop
      true indicates that the window was always on top prior to the change
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void ancestorAdded​(javax.swing.event.AncestorEvent event)  
      void ancestorMoved​(javax.swing.event.AncestorEvent event)  
      void ancestorRemoved​(javax.swing.event.AncestorEvent event)  
      void windowGainedFocus​(java.awt.event.WindowEvent e)  
      void windowLostFocus​(java.awt.event.WindowEvent e)  
      • Methods inherited from class java.lang.Object

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

      • wasAlwaysOnTop

        private boolean wasAlwaysOnTop
        true indicates that the window was always on top prior to the change
    • Method Detail

      • windowGainedFocus

        public void windowGainedFocus​(java.awt.event.WindowEvent e)
        Specified by:
        windowGainedFocus in interface java.awt.event.WindowFocusListener
      • windowLostFocus

        public void windowLostFocus​(java.awt.event.WindowEvent e)
        Specified by:
        windowLostFocus in interface java.awt.event.WindowFocusListener
      • ancestorAdded

        public void ancestorAdded​(javax.swing.event.AncestorEvent event)
        Specified by:
        ancestorAdded in interface javax.swing.event.AncestorListener
      • ancestorRemoved

        public void ancestorRemoved​(javax.swing.event.AncestorEvent event)
        Specified by:
        ancestorRemoved in interface javax.swing.event.AncestorListener
      • ancestorMoved

        public void ancestorMoved​(javax.swing.event.AncestorEvent event)
        Specified by:
        ancestorMoved in interface javax.swing.event.AncestorListener