diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java index 5edffcd5..0506390b 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java @@ -69,10 +69,11 @@ public class FlatRootPaneUI static final boolean canUseJBRCustomDecorations = SystemInfo.IS_JETBRAINS_JVM_11_OR_LATER && SystemInfo.IS_WINDOWS_10_OR_LATER; - private JRootPane rootPane; - private FlatTitlePane titlePane; + protected JRootPane rootPane; + protected FlatTitlePane titlePane; + protected FlatWindowResizer windowResizer; + private LayoutManager oldLayout; - private FlatWindowResizer windowResizer; public static ComponentUI createUI( JComponent c ) { return new FlatRootPaneUI(); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java index 2a7fd6bd..8659b149 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java @@ -90,30 +90,31 @@ import com.formdev.flatlaf.util.UIScale; public class FlatTitlePane extends JComponent { - private final Color activeBackground = UIManager.getColor( "TitlePane.background" ); - private final Color inactiveBackground = UIManager.getColor( "TitlePane.inactiveBackground" ); - private final Color activeForeground = UIManager.getColor( "TitlePane.foreground" ); - private final Color inactiveForeground = UIManager.getColor( "TitlePane.inactiveForeground" ); - private final Color embeddedForeground = UIManager.getColor( "TitlePane.embeddedForeground" ); + protected final Color activeBackground = UIManager.getColor( "TitlePane.background" ); + protected final Color inactiveBackground = UIManager.getColor( "TitlePane.inactiveBackground" ); + protected final Color activeForeground = UIManager.getColor( "TitlePane.foreground" ); + protected final Color inactiveForeground = UIManager.getColor( "TitlePane.inactiveForeground" ); + protected final Color embeddedForeground = UIManager.getColor( "TitlePane.embeddedForeground" ); - private final Insets menuBarMargins = UIManager.getInsets( "TitlePane.menuBarMargins" ); - private final Dimension iconSize = UIManager.getDimension( "TitlePane.iconSize" ); - private final int buttonMaximizedHeight = UIManager.getInt( "TitlePane.buttonMaximizedHeight" ); + protected final Insets menuBarMargins = UIManager.getInsets( "TitlePane.menuBarMargins" ); + protected final Dimension iconSize = UIManager.getDimension( "TitlePane.iconSize" ); + protected final int buttonMaximizedHeight = UIManager.getInt( "TitlePane.buttonMaximizedHeight" ); - private final JRootPane rootPane; + protected final JRootPane rootPane; - private JPanel leftPanel; - private JLabel iconLabel; - private JComponent menuBarPlaceholder; - private JLabel titleLabel; - private JPanel buttonPanel; - private JButton iconifyButton; - private JButton maximizeButton; - private JButton restoreButton; - private JButton closeButton; + protected JPanel leftPanel; + protected JLabel iconLabel; + protected JComponent menuBarPlaceholder; + protected JLabel titleLabel; + protected JPanel buttonPanel; + protected JButton iconifyButton; + protected JButton maximizeButton; + protected JButton restoreButton; + protected JButton closeButton; + + protected Window window; private final Handler handler; - private Window window; public FlatTitlePane( JRootPane rootPane ) { this.rootPane = rootPane; diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java index c8f0365b..3c1f569c 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java @@ -51,15 +51,15 @@ public class FlatWindowResizer extends JComponent implements PropertyChangeListener, WindowStateListener, ComponentListener { - private final static Integer WINDOW_RESIZER_LAYER = JLayeredPane.DRAG_LAYER + 1; + protected final static Integer WINDOW_RESIZER_LAYER = JLayeredPane.DRAG_LAYER + 1; - private final JRootPane rootPane; + protected final JRootPane rootPane; - private final int borderDragThickness = FlatUIUtils.getUIInt( "RootPane.borderDragThickness", 5 ); - private final int cornerDragWidth = FlatUIUtils.getUIInt( "RootPane.cornerDragWidth", 16 ); - private final boolean honorMinimumSizeOnResize = UIManager.getBoolean( "RootPane.honorMinimumSizeOnResize" ); + protected final int borderDragThickness = FlatUIUtils.getUIInt( "RootPane.borderDragThickness", 5 ); + protected final int cornerDragWidth = FlatUIUtils.getUIInt( "RootPane.cornerDragWidth", 16 ); + protected final boolean honorMinimumSizeOnResize = UIManager.getBoolean( "RootPane.honorMinimumSizeOnResize" ); - private Window window; + protected Window window; public FlatWindowResizer( JRootPane rootPane ) { this.rootPane = rootPane;