Class FlatRootPaneUI

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.util.EventListener

    public class FlatRootPaneUI
    extends javax.swing.plaf.basic.BasicRootPaneUI
    Provides the Flat LaF UI delegate for JRootPane.
    • Field Detail

      • borderColor

        protected final java.awt.Color borderColor
      • rootPane

        protected javax.swing.JRootPane rootPane
      • nativeWindowBorderData

        private java.lang.Object nativeWindowBorderData
      • oldLayout

        private java.awt.LayoutManager oldLayout
      • macFullWindowContentListener

        private java.awt.event.ComponentListener macFullWindowContentListener
      • macWindowBackgroundListener

        private java.beans.PropertyChangeListener macWindowBackgroundListener
      • TITLE_PANE_LAYER

        protected static final java.lang.Integer TITLE_PANE_LAYER
      • TITLE_PANE_MOUSE_LAYER

        private static final java.lang.Integer TITLE_PANE_MOUSE_LAYER
      • WINDOW_TOP_BORDER_LAYER

        private static final java.lang.Integer WINDOW_TOP_BORDER_LAYER
      • TITLE_PANE_FULL_WINDOW_CONTENT_LAYER

        protected static final java.lang.Integer TITLE_PANE_FULL_WINDOW_CONTENT_LAYER
        Since:
        3.4
    • Constructor Detail

      • FlatRootPaneUI

        public FlatRootPaneUI()
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)
      • installUI

        public void installUI​(javax.swing.JComponent c)
        Overrides:
        installUI in class javax.swing.plaf.basic.BasicRootPaneUI
      • installBorder

        protected void installBorder()
      • uninstallUI

        public void uninstallUI​(javax.swing.JComponent c)
        Overrides:
        uninstallUI in class javax.swing.plaf.basic.BasicRootPaneUI
      • installDefaults

        protected void installDefaults​(javax.swing.JRootPane c)
        Overrides:
        installDefaults in class javax.swing.plaf.basic.BasicRootPaneUI
      • uninstallDefaults

        protected void uninstallDefaults​(javax.swing.JRootPane c)
        Overrides:
        uninstallDefaults in class javax.swing.plaf.basic.BasicRootPaneUI
      • installListeners

        protected void installListeners​(javax.swing.JRootPane root)
        Overrides:
        installListeners in class javax.swing.plaf.basic.BasicRootPaneUI
      • uninstallListeners

        protected void uninstallListeners​(javax.swing.JRootPane root)
        Overrides:
        uninstallListeners in class javax.swing.plaf.basic.BasicRootPaneUI
      • installNativeWindowBorder

        protected void installNativeWindowBorder()
        Since:
        1.1.2
      • uninstallNativeWindowBorder

        protected void uninstallNativeWindowBorder()
        Since:
        1.1.2
      • updateNativeWindowBorder

        public static void updateNativeWindowBorder​(javax.swing.JRootPane rootPane)
        Since:
        1.1.2
      • installClientDecorations

        protected void installClientDecorations()
      • uninstallClientDecorations

        protected void uninstallClientDecorations()
      • getLayerForTitlePane

        private java.lang.Integer getLayerForTitlePane()
      • setTitlePane

        protected void setTitlePane​(FlatTitlePane newTitlePane)
      • macInstallFullWindowContentSupport

        private void macInstallFullWindowContentSupport()
      • macUninstallFullWindowContentSupport

        private void macUninstallFullWindowContentSupport()
      • isMacButtonsSpacingSupported

        private boolean isMacButtonsSpacingSupported()
      • macInstallWindowBackgroundListener

        private void macInstallWindowBackgroundListener​(javax.swing.JRootPane c)
      • macUninstallWindowBackgroundListener

        private void macUninstallWindowBackgroundListener​(javax.swing.JRootPane c)
      • macClearBackgroundForTranslucentWindow

        private void macClearBackgroundForTranslucentWindow​(javax.swing.JRootPane c)
        When setting window background to translucent color (alpha < 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 L&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 java.awt.Window getParentWindow​(javax.swing.JRootPane c)
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent e)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
        Overrides:
        propertyChange in class javax.swing.plaf.basic.BasicRootPaneUI
      • isFullWindowContent

        protected static boolean isFullWindowContent​(javax.swing.JRootPane rootPane)
        Since:
        3.4
      • isMenuBarEmbedded

        protected static boolean isMenuBarEmbedded​(javax.swing.JRootPane rootPane)
      • getTitlePane

        protected static FlatTitlePane getTitlePane​(javax.swing.JRootPane rootPane)
        Since:
        2.4