Package com.formdev.flatlaf.ui
Class FlatRootPaneUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.RootPaneUI
javax.swing.plaf.basic.BasicRootPaneUI
com.formdev.flatlaf.ui.FlatRootPaneUI
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
Provides the Flat LaF UI delegate for
JRootPane
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
static class
Window border used for non-native window decorations.private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Color
private ComponentListener
private PropertyChangeListener
private Object
private LayoutManager
protected JRootPane
protected static final Integer
protected static final Integer
private static final Integer
protected FlatTitlePane
private static final Integer
protected FlatWindowResizer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FlatRootPaneUI.FlatRootLayout
protected FlatTitlePane
static ComponentUI
protected FlatWindowResizer
private Integer
private Window
protected static FlatTitlePane
getTitlePane
(JRootPane rootPane) protected void
protected void
protected void
protected void
installListeners
(JRootPane root) protected void
void
protected static boolean
isFullWindowContent
(JRootPane rootPane) private boolean
protected static boolean
isMenuBarEmbedded
(JRootPane rootPane) private void
When setting window background to translucent color (alpha invalid input: '<' 255), Swing paints that window translucent on Windows and Linux, but not on macOS.private void
private void
private void
private void
void
protected void
setTitlePane
(FlatTitlePane newTitlePane) protected void
protected void
protected void
uninstallListeners
(JRootPane root) protected void
void
static void
updateNativeWindowBorder
(JRootPane rootPane) Methods inherited from class javax.swing.plaf.basic.BasicRootPaneUI
installComponents, installKeyboardActions, uninstallComponents, uninstallKeyboardActions
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
-
Field Details
-
borderColor
-
rootPane
-
titlePane
-
windowResizer
-
nativeWindowBorderData
-
oldLayout
-
macFullWindowContentListener
-
macWindowBackgroundListener
-
TITLE_PANE_LAYER
-
TITLE_PANE_MOUSE_LAYER
-
WINDOW_TOP_BORDER_LAYER
-
TITLE_PANE_FULL_WINDOW_CONTENT_LAYER
- Since:
- 3.4
-
-
Constructor Details
-
FlatRootPaneUI
public FlatRootPaneUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUI
in classBasicRootPaneUI
-
installBorder
protected void installBorder() -
uninstallUI
- Overrides:
uninstallUI
in classBasicRootPaneUI
-
installDefaults
- Overrides:
installDefaults
in classBasicRootPaneUI
-
uninstallDefaults
- Overrides:
uninstallDefaults
in classBasicRootPaneUI
-
installListeners
- Overrides:
installListeners
in classBasicRootPaneUI
-
uninstallListeners
- Overrides:
uninstallListeners
in classBasicRootPaneUI
-
installNativeWindowBorder
protected void installNativeWindowBorder()- Since:
- 1.1.2
-
uninstallNativeWindowBorder
protected void uninstallNativeWindowBorder()- Since:
- 1.1.2
-
updateNativeWindowBorder
- Since:
- 1.1.2
-
installClientDecorations
protected void installClientDecorations() -
uninstallClientDecorations
protected void uninstallClientDecorations() -
createRootLayout
-
createWindowResizer
-
createTitlePane
-
getLayerForTitlePane
-
setTitlePane
-
macInstallFullWindowContentSupport
private void macInstallFullWindowContentSupport() -
macUninstallFullWindowContentSupport
private void macUninstallFullWindowContentSupport() -
isMacButtonsSpacingSupported
private boolean isMacButtonsSpacingSupported() -
macInstallWindowBackgroundListener
-
macUninstallWindowBackgroundListener
-
macClearBackgroundForTranslucentWindow
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 isnull
by default.To fix this problem, set the root pane background to
null
if windows uses a translucent background. -
getParentWindow
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classBasicRootPaneUI
-
isFullWindowContent
- Since:
- 3.4
-
isMenuBarEmbedded
-
getTitlePane
- Since:
- 2.4
-