replaced MetalRootPaneUI on Windows and Linux (issue #47)

(preparation for replacing "base" Metal LaF with BasicLookAndFeel)
This commit is contained in:
Karl Tauber
2020-02-18 12:52:53 +01:00
parent 004a5cb765
commit 790f490674
5 changed files with 51 additions and 18 deletions

View File

@@ -72,6 +72,15 @@ class UIDefaultsRemover
"RadioButton.select",
"RadioButton.totalInsets",
"RootPane.colorChooserDialogBorder",
"RootPane.errorDialogBorder",
"RootPane.fileChooserDialogBorder",
"RootPane.frameBorder",
"RootPane.informationDialogBorder",
"RootPane.plainDialogBorder",
"RootPane.questionDialogBorder",
"RootPane.warningDialogBorder",
"ScrollBar.darkShadow",
"ScrollBar.highlight",
"ScrollBar.shadow",

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2020 FormDev Software GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.formdev.flatlaf.ui;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicRootPaneUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JRootPane}.
*
* @author Karl Tauber
*/
public class FlatRootPaneUI
extends BasicRootPaneUI
{
private static ComponentUI instance;
public static ComponentUI createUI( JComponent c ) {
if( instance == null )
instance = new FlatRootPaneUI();
return instance;
}
}

View File

@@ -39,6 +39,8 @@ PopupMenuSeparatorUI=com.formdev.flatlaf.ui.FlatPopupMenuSeparatorUI
ProgressBarUI=com.formdev.flatlaf.ui.FlatProgressBarUI
RadioButtonUI=com.formdev.flatlaf.ui.FlatRadioButtonUI
RadioButtonMenuItemUI=com.formdev.flatlaf.ui.FlatRadioButtonMenuItemUI
[win]RootPaneUI=com.formdev.flatlaf.ui.FlatRootPaneUI
[linux]RootPaneUI=com.formdev.flatlaf.ui.FlatRootPaneUI
ScrollBarUI=com.formdev.flatlaf.ui.FlatScrollBarUI
ScrollPaneUI=com.formdev.flatlaf.ui.FlatScrollPaneUI
SeparatorUI=com.formdev.flatlaf.ui.FlatSeparatorUI