Class FlatRootPaneUI

All Implemented Interfaces:
PropertyChangeListener, EventListener

public class FlatRootPaneUI extends BasicRootPaneUI
Provides the Flat LaF UI delegate for JRootPane.
  • Field Details

    • borderColor

      protected final Color borderColor
    • rootPane

      protected JRootPane rootPane
    • titlePane

      protected FlatTitlePane titlePane
    • windowResizer

      protected FlatWindowResizer windowResizer
    • nativeWindowBorderData

      private Object nativeWindowBorderData
    • oldLayout

      private LayoutManager oldLayout
    • macFullWindowContentListener

      private ComponentListener macFullWindowContentListener
    • macWindowBackgroundListener

      private PropertyChangeListener macWindowBackgroundListener
    • TITLE_PANE_LAYER

      protected static final Integer TITLE_PANE_LAYER
    • TITLE_PANE_MOUSE_LAYER

      private static final Integer TITLE_PANE_MOUSE_LAYER
    • WINDOW_TOP_BORDER_LAYER

      private static final Integer WINDOW_TOP_BORDER_LAYER
    • TITLE_PANE_FULL_WINDOW_CONTENT_LAYER

      protected static final Integer TITLE_PANE_FULL_WINDOW_CONTENT_LAYER
      Since:
      3.4
  • Constructor Details

    • FlatRootPaneUI

      public FlatRootPaneUI()
  • Method Details

    • createUI

      public static ComponentUI createUI(JComponent c)
    • installUI

      public void installUI(JComponent c)
      Overrides:
      installUI in class BasicRootPaneUI
    • installBorder

      protected void installBorder()
    • uninstallUI

      public void uninstallUI(JComponent c)
      Overrides:
      uninstallUI in class BasicRootPaneUI
    • installDefaults

      protected void installDefaults(JRootPane c)
      Overrides:
      installDefaults in class BasicRootPaneUI
    • uninstallDefaults

      protected void uninstallDefaults(JRootPane c)
      Overrides:
      uninstallDefaults in class BasicRootPaneUI
    • installListeners

      protected void installListeners(JRootPane root)
      Overrides:
      installListeners in class BasicRootPaneUI
    • uninstallListeners

      protected void uninstallListeners(JRootPane root)
      Overrides:
      uninstallListeners in class BasicRootPaneUI
    • installNativeWindowBorder

      protected void installNativeWindowBorder()
      Since:
      1.1.2
    • uninstallNativeWindowBorder

      protected void uninstallNativeWindowBorder()
      Since:
      1.1.2
    • updateNativeWindowBorder

      public static void updateNativeWindowBorder(JRootPane rootPane)
      Since:
      1.1.2
    • installClientDecorations

      protected void installClientDecorations()
    • uninstallClientDecorations

      protected void uninstallClientDecorations()
    • createRootLayout

      protected FlatRootPaneUI.FlatRootLayout createRootLayout()
    • createWindowResizer

      protected FlatWindowResizer createWindowResizer()
    • createTitlePane

      protected FlatTitlePane createTitlePane()
    • getLayerForTitlePane

      private Integer getLayerForTitlePane()
    • setTitlePane

      protected void setTitlePane(FlatTitlePane newTitlePane)
    • macInstallFullWindowContentSupport

      private void macInstallFullWindowContentSupport()
    • macUninstallFullWindowContentSupport

      private void macUninstallFullWindowContentSupport()
    • isMacButtonsSpacingSupported

      private boolean isMacButtonsSpacingSupported()
    • macInstallWindowBackgroundListener

      private void macInstallWindowBackgroundListener(JRootPane c)
    • macUninstallWindowBackgroundListener

      private void macUninstallWindowBackgroundListener(JRootPane c)
    • macClearBackgroundForTranslucentWindow

      private void macClearBackgroundForTranslucentWindow(JRootPane c)
      When setting window background to translucent color (alpha invalid input: '<' 255), Swing paints that window translucent on Windows and Linux, but not on macOS. The reason for this is that FlatLaf sets the background color of the root pane, and Swing behaves a bit differently on macOS than on other platforms in that case. Other Linvalid input: '&Fs' do not set root pane background, which is null by default.

      To fix this problem, set the root pane background to null if windows uses a translucent background.

    • getParentWindow

      private Window getParentWindow(JRootPane c)
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class BasicRootPaneUI
    • isFullWindowContent

      protected static boolean isFullWindowContent(JRootPane rootPane)
      Since:
      3.4
    • isMenuBarEmbedded

      protected static boolean isMenuBarEmbedded(JRootPane rootPane)
    • getTitlePane

      protected static FlatTitlePane getTitlePane(JRootPane rootPane)
      Since:
      2.4