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 classstatic classWindow border used for non-native window decorations.private static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Colorprivate ComponentListenerprivate PropertyChangeListenerprivate Objectprivate LayoutManagerprotected JRootPaneprotected static final Integerprotected static final Integerprivate static final Integerprotected FlatTitlePaneprivate static final Integerprotected FlatWindowResizer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FlatRootPaneUI.FlatRootLayoutprotected FlatTitlePanestatic ComponentUIprotected FlatWindowResizerprivate Integerprivate Windowprotected static FlatTitlePanegetTitlePane(JRootPane rootPane) protected voidprotected voidprotected voidprotected voidinstallListeners(JRootPane root) protected voidvoidprotected static booleanisFullWindowContent(JRootPane rootPane) private booleanprotected static booleanisMenuBarEmbedded(JRootPane rootPane) private voidWhen setting window background to translucent color (alpha invalid input: '<' 255), Swing paints that window translucent on Windows and Linux, but not on macOS.private voidprivate voidprivate voidprivate voidvoidprotected voidsetTitlePane(FlatTitlePane newTitlePane) protected voidprotected voidprotected voiduninstallListeners(JRootPane root) protected voidvoidstatic voidupdateNativeWindowBorder(JRootPane rootPane) Methods inherited from class BasicRootPaneUI
installComponents, installKeyboardActions, uninstallComponents, uninstallKeyboardActionsMethods inherited from class 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:
installUIin classBasicRootPaneUI
-
installBorder
protected void installBorder() -
uninstallUI
- Overrides:
uninstallUIin classBasicRootPaneUI
-
installDefaults
- Overrides:
installDefaultsin classBasicRootPaneUI
-
uninstallDefaults
- Overrides:
uninstallDefaultsin classBasicRootPaneUI
-
installListeners
- Overrides:
installListenersin classBasicRootPaneUI
-
uninstallListeners
- Overrides:
uninstallListenersin 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 isnullby default.To fix this problem, set the root pane background to
nullif windows uses a translucent background. -
getParentWindow
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classBasicRootPaneUI
-
isFullWindowContent
- Since:
- 3.4
-
isMenuBarEmbedded
-
getTitlePane
- Since:
- 2.4
-