mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Panel: added UI delegate
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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.BasicPanelUI;
|
||||
|
||||
/**
|
||||
* Provides the Flat LaF UI delegate for {@link javax.swing.JPanel}.
|
||||
*
|
||||
* <!-- BasicPanelUI -->
|
||||
*
|
||||
* @uiDefault Panel.font Font unused
|
||||
* @uiDefault Panel.background Color only used if opaque
|
||||
* @uiDefault Panel.foreground Color
|
||||
* @uiDefault Panel.border Border
|
||||
*
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
public class FlatPanelUI
|
||||
extends BasicPanelUI
|
||||
{
|
||||
private static ComponentUI instance;
|
||||
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
if( instance == null )
|
||||
instance = new FlatPanelUI();
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ MenuUI=com.formdev.flatlaf.ui.FlatMenuUI
|
||||
MenuBarUI=com.formdev.flatlaf.ui.FlatMenuBarUI
|
||||
MenuItemUI=com.formdev.flatlaf.ui.FlatMenuItemUI
|
||||
OptionPaneUI=com.formdev.flatlaf.ui.FlatOptionPaneUI
|
||||
PanelUI=com.formdev.flatlaf.ui.FlatPanelUI
|
||||
PasswordFieldUI=com.formdev.flatlaf.ui.FlatPasswordFieldUI
|
||||
PopupMenuUI=com.formdev.flatlaf.ui.FlatPopupMenuUI
|
||||
PopupMenuSeparatorUI=com.formdev.flatlaf.ui.FlatPopupMenuSeparatorUI
|
||||
|
||||
@@ -758,7 +758,7 @@ Panel.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
|
||||
Panel.font .SF NS Text plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
Panel.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
Panel.opaque true
|
||||
PanelUI com.apple.laf.AquaPanelUI
|
||||
PanelUI com.formdev.flatlaf.ui.FlatPanelUI
|
||||
|
||||
|
||||
#---- PasswordField ----
|
||||
|
||||
@@ -591,7 +591,7 @@ OptionPaneUI com.formdev.flatlaf.ui.FlatOptionPaneUI
|
||||
Panel.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
|
||||
Panel.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
Panel.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
PanelUI javax.swing.plaf.basic.BasicPanelUI
|
||||
PanelUI com.formdev.flatlaf.ui.FlatPanelUI
|
||||
|
||||
|
||||
#---- PasswordField ----
|
||||
|
||||
@@ -760,7 +760,7 @@ Panel.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
|
||||
Panel.font .SF NS Text plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
Panel.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
Panel.opaque true
|
||||
PanelUI com.apple.laf.AquaPanelUI
|
||||
PanelUI com.formdev.flatlaf.ui.FlatPanelUI
|
||||
|
||||
|
||||
#---- PasswordField ----
|
||||
|
||||
@@ -593,7 +593,7 @@ OptionPaneUI com.formdev.flatlaf.ui.FlatOptionPaneUI
|
||||
Panel.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
|
||||
Panel.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
Panel.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
PanelUI javax.swing.plaf.basic.BasicPanelUI
|
||||
PanelUI com.formdev.flatlaf.ui.FlatPanelUI
|
||||
|
||||
|
||||
#---- PasswordField ----
|
||||
|
||||
Reference in New Issue
Block a user