Class VisibilityHandler

  • All Implemented Interfaces:
    java.awt.event.HierarchyListener, java.util.EventListener

    public class VisibilityHandler
    extends java.lang.Object
    implements java.awt.event.HierarchyListener
    This class can be used to invoke a callback when a component becomes visible on the screen.
    See Also:
    Component.isShowing()
    • Constructor Summary

      Constructors 
      Constructor Description
      VisibilityHandler​(java.util.function.Consumer<java.awt.Component> onShowing)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void addCallback​(java.awt.Component component, java.util.function.Consumer<java.awt.Component> onShowing)  
      void hierarchyChanged​(java.awt.event.HierarchyEvent event)  
      • Methods inherited from class java.lang.Object

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

      • VisibilityHandler

        public VisibilityHandler​(java.util.function.Consumer<java.awt.Component> onShowing)
    • Method Detail

      • addCallback

        public static void addCallback​(java.awt.Component component,
                                       java.util.function.Consumer<java.awt.Component> onShowing)
      • hierarchyChanged

        public void hierarchyChanged​(java.awt.event.HierarchyEvent event)
        Specified by:
        hierarchyChanged in interface java.awt.event.HierarchyListener