Class FlatPopupFactory.NonFlashingPopup

java.lang.Object
javax.swing.Popup
com.formdev.flatlaf.ui.FlatPopupFactory.NonFlashingPopup
Direct Known Subclasses:
FlatPopupFactory.DropShadowPopup
Enclosing class:
FlatPopupFactory

private class FlatPopupFactory.NonFlashingPopup extends Popup
Fixes popup background flashing effect when using dark theme on light platform theme, where the light popup background is shown for a fraction of a second before the dark popup content is shown. This is fixed by setting popup background to content background.

Defers hiding of heavy weight popup window for an event cycle, which allows reusing popup window to avoid flicker when "moving" popup.

  • Field Details

    • delegate

      private Popup delegate
    • owner

      Component owner
    • contents

      private Component contents
    • oldPopupWindowBackground

      private Color oldPopupWindowBackground
    • disposed

      private boolean disposed
  • Constructor Details

  • Method Details

    • cloneForReuse

    • show

      public final void show()
      Overrides:
      show in class Popup
    • showImpl

      void showImpl()
    • hide

      public final void hide()
      Overrides:
      hide in class Popup
    • hideImpl

      void hideImpl()
    • reset

      void reset(Component contents, int ownerX, int ownerY)