From d0b0f098d9e49806e8bcd0247bd267d66dfec5f0 Mon Sep 17 00:00:00 2001
From: mmatessi <17149962+basix86@users.noreply.github.com>
Date: Thu, 27 Feb 2020 15:46:28 +0100
Subject: [PATCH 001/500] disabledIcon
---
.../java/com/formdev/flatlaf/FlatLaf.java | 18 ++++----
.../com/formdev/flatlaf/ui/FlatButtonUI.java | 2 +
.../ui/FlatDisabledButtonImageFilter.java | 28 ++++++++++++
.../com/formdev/flatlaf/ui/FlatUIUtils.java | 45 +++++++++++++------
4 files changed, 69 insertions(+), 24 deletions(-)
create mode 100644 flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatDisabledButtonImageFilter.java
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
index c02ec1e1..eb72c17b 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
@@ -36,20 +36,13 @@ import java.util.Map;
import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.swing.AbstractButton;
-import javax.swing.JLabel;
-import javax.swing.JRootPane;
-import javax.swing.JTabbedPane;
-import javax.swing.LookAndFeel;
-import javax.swing.PopupFactory;
-import javax.swing.SwingUtilities;
-import javax.swing.UIDefaults;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.*;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
+import javax.swing.plaf.IconUIResource;
import javax.swing.plaf.basic.BasicLookAndFeel;
import javax.swing.text.html.HTMLEditorKit;
+import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
@@ -111,6 +104,11 @@ public abstract class FlatLaf
return true;
}
+ @Override
+ public Icon getDisabledIcon(JComponent component, Icon icon) {
+ return new IconUIResource(FlatUIUtils.getDisabledIcon(icon));
+ }
+
@Override
public void initialize() {
if( SystemInfo.IS_MAC )
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java
index 6055b3bd..2c8ec701 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java
@@ -86,6 +86,8 @@ import com.formdev.flatlaf.util.UIScale;
* @uiDefault Button.toolbar.spacingInsets Insets
* @uiDefault Button.toolbar.hoverBackground Color
* @uiDefault Button.toolbar.pressedBackground Color
+ * @uiDefault Button.disabledGrayMinValue int optional
+ * @uiDefault Button.disabledGrayMinValue int optional
*
* @author Karl Tauber
*/
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatDisabledButtonImageFilter.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatDisabledButtonImageFilter.java
new file mode 100644
index 00000000..7e1c4a5f
--- /dev/null
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatDisabledButtonImageFilter.java
@@ -0,0 +1,28 @@
+package com.formdev.flatlaf.ui;
+
+import java.awt.image.RGBImageFilter;
+
+/**
+ * Used to create a disabled Icon with the ocean look.
+ *
+ * Imported from MetalUtils.getOceanDisabledButtonIcon
+ */
+class FlatDisabledButtonImageFilter extends RGBImageFilter {
+ private float min;
+ private float factor;
+
+ FlatDisabledButtonImageFilter( int min, int max ) {
+ canFilterIndexColorModel = true;
+ this.min = ( float ) min;
+ this.factor = ( max - min ) / 255f;
+ }
+
+ public int filterRGB( int x, int y, int rgb ) {
+ // Coefficients are from the sRGB color space:
+ int gray = Math.min( 255, ( int ) ( ( ( 0.2125f * ( ( rgb >> 16 ) & 0xFF ) ) +
+ ( 0.7154f * ( ( rgb >> 8 ) & 0xFF ) ) +
+ ( 0.0721f * ( rgb & 0xFF )) + .5f ) * factor + min) );
+
+ return ( rgb & 0xff000000 ) | ( gray << 16 ) | ( gray << 8 ) | ( gray );
+ }
+}
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
index 8a15c8d1..590baf62 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
@@ -16,17 +16,7 @@
package com.formdev.flatlaf.ui;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Rectangle;
-import java.awt.RenderingHints;
-import java.awt.Shape;
+import java.awt.*;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseAdapter;
@@ -34,10 +24,11 @@ import java.awt.event.MouseEvent;
import java.awt.geom.Path2D;
import java.awt.geom.Rectangle2D;
import java.awt.geom.RoundRectangle2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.FilteredImageSource;
+import java.awt.image.ImageProducer;
import java.util.function.Consumer;
-import javax.swing.JComponent;
-import javax.swing.LookAndFeel;
-import javax.swing.UIManager;
+import javax.swing.*;
import javax.swing.plaf.UIResource;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.util.DerivedColor;
@@ -433,6 +424,32 @@ public class FlatUIUtils
return explicitlySet;
}
+ public static Icon getDisabledIcon( Icon icon ) {
+ Image image = safeGetImage(icon);
+ int grayMinValue = FlatUIUtils.getUIInt( "Button.disabledGrayMinValue", 180 );
+ int grayMaxValue = FlatUIUtils.getUIInt( "Button.disabledGrayMaxValue", 215 );
+ FlatDisabledButtonImageFilter imageFilter = new FlatDisabledButtonImageFilter(grayMinValue, grayMaxValue);
+ ImageProducer producer = new FilteredImageSource(image.getSource(), imageFilter);
+ return new ImageIcon(Toolkit.getDefaultToolkit().createImage(producer));
+ }
+
+ private static Image safeGetImage(Icon icon) {
+ if ( icon instanceof ImageIcon ) {
+ return ( ( ImageIcon ) icon ).getImage();
+ } else {
+ int width = icon.getIconWidth();
+ int height = icon.getIconHeight();
+ GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment();
+ GraphicsDevice device = environment.getDefaultScreenDevice();
+ GraphicsConfiguration configuration = device.getDefaultConfiguration();
+ BufferedImage image = configuration.createCompatibleImage( width, height );
+ Graphics2D g = image.createGraphics();
+ icon.paintIcon( null, g, 0, 0 );
+ g.dispose();
+ return image;
+ }
+ }
+
//---- class HoverListener ------------------------------------------------
public static class HoverListener
From 7c25f087fb36d2b1b7062091f8678ecad16f7f49 Mon Sep 17 00:00:00 2001
From: mmatessi <17149962+basix86@users.noreply.github.com>
Date: Thu, 27 Feb 2020 16:14:51 +0100
Subject: [PATCH 002/500] NPE getDisabledIcon Fix
---
flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
index eb72c17b..501d04f1 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
@@ -106,7 +106,7 @@ public abstract class FlatLaf
@Override
public Icon getDisabledIcon(JComponent component, Icon icon) {
- return new IconUIResource(FlatUIUtils.getDisabledIcon(icon));
+ return ( icon == null ) ? null : new IconUIResource( FlatUIUtils.getDisabledIcon( icon ) );
}
@Override
From 8ee6588d468f3ff1b4731dbb47d6ca13b8ee833a Mon Sep 17 00:00:00 2001
From: mmatessi <17149962+basix86@users.noreply.github.com>
Date: Thu, 5 Mar 2020 13:08:49 +0100
Subject: [PATCH 003/500] fix review #70
---
.../java/com/formdev/flatlaf/FlatLaf.java | 13 ++++++++++-
.../com/formdev/flatlaf/ui/FlatUIUtils.java | 23 +++++++++++++++++--
2 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
index 501d04f1..429d8602 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
@@ -36,7 +36,18 @@ import java.util.Map;
import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.swing.*;
+import javax.swing.AbstractButton;
+import javax.swing.Icon;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JRootPane;
+import javax.swing.JTabbedPane;
+import javax.swing.LookAndFeel;
+import javax.swing.PopupFactory;
+import javax.swing.SwingUtilities;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.IconUIResource;
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
index 590baf62..844262af 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
@@ -16,7 +16,22 @@
package com.formdev.flatlaf.ui;
-import java.awt.*;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Image;
+import java.awt.Insets;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.Shape;
+import java.awt.Toolkit;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseAdapter;
@@ -28,7 +43,11 @@ import java.awt.image.BufferedImage;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageProducer;
import java.util.function.Consumer;
-import javax.swing.*;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JComponent;
+import javax.swing.LookAndFeel;
+import javax.swing.UIManager;
import javax.swing.plaf.UIResource;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.util.DerivedColor;
From de718f847c36fbd91545977094ba4221a71593a0 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Thu, 12 Mar 2020 11:15:10 +0100
Subject: [PATCH 004/500] README.md: added KeyStore Explorer and OWASP Zed
Attack Proxy (ZAP) to list of projects that use FlatLaf
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index c23a53b4..d1dd911f 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,8 @@ Projects using FlatLaf
- [NetBeans](https://netbeans.apache.org/) 11.3
- [jclasslib bytecode viewer](https://github.com/ingokegel/jclasslib) 5.5
+- [KeyStore Explorer](https://keystore-explorer.org/) 5.4.3
+- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) (in weekly releases)
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org)
- [Rest Suite](https://github.com/supanadit/restsuite)
- [ControllerBuddy](https://github.com/bwRavencl/ControllerBuddy)
From eb30f9d5bf059ae7c9572f57750886f73d67c1ff Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Thu, 12 Mar 2020 11:22:43 +0100
Subject: [PATCH 005/500] copy all font attributes in
FlatUIUtils.nonUIResource() and when scaling fonts (issue #75)
---
.../src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java | 2 +-
.../src/main/java/com/formdev/flatlaf/util/UIScale.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
index 8a15c8d1..4264dfec 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
@@ -121,7 +121,7 @@ public class FlatUIUtils
}
public static Font nonUIResource( Font font ) {
- return (font instanceof UIResource) ? new Font( font.getName(), font.getStyle(), font.getSize() ) : font;
+ return (font instanceof UIResource) ? font.deriveFont( font.getStyle() ) : font;
}
public static int minimumWidth( JComponent c, int minimumWidth ) {
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
index d0bb15b8..10d34ff5 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
@@ -197,7 +197,7 @@ public class UIScale
return font;
int newFontSize = Math.round( (font.getSize() / fontScaleFactor) * scaleFactor );
- return new FontUIResource( font.getFamily(), font.getStyle(), newFontSize );
+ return new FontUIResource( font.deriveFont( (float) newFontSize ) );
}
/**
@@ -205,7 +205,7 @@ public class UIScale
*/
public static FontUIResource scaleFont( FontUIResource font, float scaleFactor ) {
int newFontSize = Math.round( font.getSize() * scaleFactor );
- return new FontUIResource( font.getFamily(), font.getStyle(), newFontSize );
+ return new FontUIResource( font.deriveFont( (float) newFontSize ) );
}
/**
From 4aeabea3fe577ca2c365e7301d225f34985fb87e Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 15 Mar 2020 10:16:28 +0100
Subject: [PATCH 006/500] UI defaults: updated
FlatLightLaf_InputMap_1.8.0_202-mac.txt on Mac
---
.../FlatLightLaf_InputMap_1.8.0_202-mac.txt | 54 +++++++++++++------
1 file changed, 39 insertions(+), 15 deletions(-)
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_InputMap_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_InputMap_1.8.0_202-mac.txt
index f680e51e..a958ea8c 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_InputMap_1.8.0_202-mac.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_InputMap_1.8.0_202-mac.txt
@@ -22,17 +22,17 @@ CheckBox.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [
#---- ComboBox ----
ComboBox.ancestorInputMap [lazy] 11 javax.swing.plaf.InputMapUIResource [UI]
- DOWN selectNext
+ DOWN selectNext2
END endPassThrough
ENTER enterPressed
ESCAPE hidePopup
HOME homePassThrough
- KP_DOWN selectNext
- KP_UP selectPrevious
+ KP_DOWN selectNext2
+ KP_UP selectPrevious2
PAGE_DOWN pageDownPassThrough
PAGE_UP pageUpPassThrough
SPACE spacePopup
- UP selectPrevious
+ UP selectPrevious2
#---- Desktop ----
@@ -376,15 +376,39 @@ PasswordField.focusInputMap [lazy] 73 javax.swing.plaf.InputMapUIResource
#---- PopupMenu ----
-PopupMenu.selectedWindowInputMapBindings.RightToLeft length=8 [Ljava.lang.Object;
- [0] LEFT
- [1] selectChild
- [2] KP_LEFT
- [3] selectChild
- [4] RIGHT
- [5] selectParent
- [6] KP_RIGHT
- [7] selectParent
+PopupMenu.selectedWindowInputMapBindings.RightToLeft length=32 [Ljava.lang.Object;
+ [0] ESCAPE
+ [1] cancel
+ [2] DOWN
+ [3] selectNext
+ [4] KP_DOWN
+ [5] selectNext
+ [6] UP
+ [7] selectPrevious
+ [8] KP_UP
+ [9] selectPrevious
+ [10] LEFT
+ [11] selectParent
+ [12] KP_LEFT
+ [13] selectParent
+ [14] RIGHT
+ [15] selectChild
+ [16] KP_RIGHT
+ [17] selectChild
+ [18] ENTER
+ [19] return
+ [20] ctrl ENTER
+ [21] return
+ [22] SPACE
+ [23] return
+ [24] LEFT
+ [25] selectChild
+ [26] KP_LEFT
+ [27] selectChild
+ [28] RIGHT
+ [29] selectParent
+ [30] KP_RIGHT
+ [31] selectParent
PopupMenu.selectedWindowInputMapBindings length=24 [Ljava.lang.Object;
[0] ESCAPE
[1] cancel
@@ -580,10 +604,10 @@ Table.ancestorInputMap [lazy] 38 javax.swing.plaf.InputMapUIResource
COPY copy
CUT cut
DOWN selectNextRow
- END selectLastColumn
+ END selectLastRow
ENTER selectNextRowCell
ESCAPE cancel
- HOME selectFirstColumn
+ HOME selectFirstRow
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
From df1634de3d8322013f3defbde8b9cbac3645f7d3 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 15 Mar 2020 10:21:28 +0100
Subject: [PATCH 007/500] FlatTestFrame: add JGoodies Windows LaF only when
running on Windows
---
.../main/java/com/formdev/flatlaf/testing/FlatTestFrame.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
index 3d25767e..378b42f7 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
@@ -130,7 +130,7 @@ public class FlatTestFrame
}
String looksWindowsClassName = "com.jgoodies.looks.windows.WindowsLookAndFeel";
- if( isClassAvailable( looksWindowsClassName ) ) {
+ if( SystemInfo.IS_WINDOWS && isClassAvailable( looksWindowsClassName ) ) {
lafModel.addElement( new LookAndFeelInfo( "JGoodies Looks Windows (F7)", looksWindowsClassName ) );
registerSwitchToLookAndFeel( KeyEvent.VK_F7, looksWindowsClassName );
}
@@ -231,7 +231,7 @@ public class FlatTestFrame
try {
Class.forName( className, false, getClass().getClassLoader() );
return true;
- } catch( ClassNotFoundException ex ) {
+ } catch( Throwable ex ) {
return false;
}
}
From 2608061d482ade2aa7fd86e434ba10ddf387eb70 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Mon, 16 Mar 2020 15:20:17 +0100
Subject: [PATCH 008/500] reviewed (and tested) all key bindings on macOS
---
.../com/formdev/flatlaf/FlatInputMaps.java | 103 ++++++++++--------
.../formdev/flatlaf/ui/FlatComboBoxUI.java | 5 +-
.../com/formdev/flatlaf/FlatLaf.properties | 1 +
.../uidefaults/FlatDarkLaf_1.8.0_202-mac.txt | 1 +
.../uidefaults/FlatLightLaf_1.8.0_202-mac.txt | 1 +
.../FlatLightLaf_InputMap_1.8.0_202-mac.txt | 98 +++++------------
6 files changed, 96 insertions(+), 113 deletions(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatInputMaps.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatInputMaps.java
index 40967801..ae2e2f15 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatInputMaps.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatInputMaps.java
@@ -48,10 +48,10 @@ class FlatInputMaps
modifyInputMap( defaults, "ComboBox.ancestorInputMap",
"SPACE", "spacePopup",
- "UP", "selectPrevious2",
- "DOWN", "selectNext2",
- "KP_UP", "selectPrevious2",
- "KP_DOWN", "selectNext2",
+ "UP", mac( "selectPrevious2", "selectPrevious" ),
+ "DOWN", mac( "selectNext2", "selectNext" ),
+ "KP_UP", mac( "selectPrevious2", "selectPrevious" ),
+ "KP_DOWN", mac( "selectNext2", "selectNext" ),
mac( "alt UP", null ), "togglePopup",
mac( "alt DOWN", null ), "togglePopup",
@@ -182,7 +182,7 @@ class FlatInputMaps
"ctrl A", beginLineAction,
"ctrl E", endLineAction,
- // move caret to document begin/end (without selecting text)
+ // move caret to document begin/end and select text
"shift meta UP", selectionBeginAction,
"shift meta DOWN", selectionEndAction,
"shift meta KP_UP", selectionBeginAction,
@@ -198,16 +198,6 @@ class FlatInputMaps
"shift KP_UP", selectionBeginLineAction,
"shift KP_DOWN", selectionEndLineAction,
- // move caret one page (without selecting text)
- "PAGE_UP", pageUpAction,
- "PAGE_DOWN", pageDownAction,
-
- // move caret one page and select text
- "shift PAGE_UP", "selection-page-up", // DefaultEditorKit.selectionPageUpAction
- "shift PAGE_DOWN", "selection-page-down", // DefaultEditorKit.selectionPageDownAction
- "shift meta PAGE_UP", "selection-page-left", // DefaultEditorKit.selectionPageLeftAction
- "shift meta PAGE_DOWN", "selection-page-right", // DefaultEditorKit.selectionPageRightAction
-
// delete previous/next word
"ctrl W", deletePrevWordAction,
"ctrl D", deleteNextCharAction,
@@ -350,6 +340,12 @@ class FlatInputMaps
"meta V", "paste",
"meta X", "cut",
+ // let parent scroll pane do the macOS typical scrolling without changing selection
+ "HOME", null,
+ "END", null,
+ "PAGE_UP", null,
+ "PAGE_DOWN", null,
+
"ctrl A", null,
"ctrl BACK_SLASH", null,
"ctrl C", null,
@@ -370,8 +366,6 @@ class FlatInputMaps
"ctrl UP", null,
"ctrl V", null,
"ctrl X", null,
- "PAGE_DOWN", null,
- "PAGE_UP", null,
"SPACE", null,
"shift ctrl DOWN", null,
"shift ctrl END", null,
@@ -390,10 +384,16 @@ class FlatInputMaps
"shift INSERT", null,
"shift SPACE", null
);
-
- // scrollbar
- copyInputMap( defaults, "ScrollBar.ancestorInputMap", "ScrollBar.focusInputMap" );
- copyInputMap( defaults, "ScrollBar.ancestorInputMap.RightToLeft", "ScrollBar.focusInputMap.RightToLeft" );
+ modifyInputMap( defaults, "List.focusInputMap.RightToLeft",
+ "ctrl KP_LEFT", null,
+ "ctrl KP_RIGHT", null,
+ "ctrl LEFT", null,
+ "ctrl RIGHT", null,
+ "shift ctrl KP_LEFT", null,
+ "shift ctrl KP_RIGHT", null,
+ "shift ctrl LEFT", null,
+ "shift ctrl RIGHT", null
+ );
// scrollpane
modifyInputMap( defaults, "ScrollPane.ancestorInputMap",
@@ -410,6 +410,16 @@ class FlatInputMaps
"ctrl PAGE_UP", null
);
+ // tabbedpane
+ modifyInputMap( defaults, "TabbedPane.ancestorInputMap",
+ "ctrl UP", null,
+ "ctrl KP_UP", null
+ );
+ modifyInputMap( defaults, "TabbedPane.focusInputMap",
+ "ctrl DOWN", null,
+ "ctrl KP_DOWN", null
+ );
+
// table
modifyInputMap( defaults, "Table.ancestorInputMap",
"alt TAB", "focusHeader",
@@ -419,6 +429,12 @@ class FlatInputMaps
"meta V", "paste",
"meta X", "cut",
+ // let parent scroll pane do the macOS typical scrolling without changing selection
+ "HOME", null,
+ "END", null,
+ "PAGE_UP", null,
+ "PAGE_DOWN", null,
+
"ctrl A", null,
"ctrl BACK_SLASH", null,
"ctrl C", null,
@@ -476,27 +492,31 @@ class FlatInputMaps
"RIGHT", "selectChild",
"KP_LEFT", "selectParent",
"KP_RIGHT", "selectChild",
+ "shift LEFT", "selectParent",
+ "shift RIGHT", "selectChild",
+ "shift KP_LEFT", "selectParent",
+ "shift KP_RIGHT", "selectChild",
+ "alt LEFT", "selectParent",
+ "alt RIGHT", "selectChild",
+ "alt KP_LEFT", "selectParent",
+ "alt KP_RIGHT", "selectChild",
"meta A", "selectAll",
"meta C", "copy",
"meta V", "paste",
"meta X", "cut",
+ // let parent scroll pane do the macOS typical scrolling without changing selection
+ "HOME", null,
+ "END", null,
+ "PAGE_UP", null,
+ "PAGE_DOWN", null,
+
"ctrl LEFT", null,
"ctrl RIGHT", null,
"ctrl KP_LEFT", null,
"ctrl KP_RIGHT", null,
- "shift LEFT", null,
- "shift RIGHT", null,
- "shift KP_LEFT", null,
- "shift KP_RIGHT", null,
-
- "alt LEFT", null,
- "alt RIGHT", null,
- "alt KP_LEFT", null,
- "alt KP_RIGHT", null,
-
"ctrl A", null,
"ctrl BACK_SLASH", null,
"ctrl C", null,
@@ -513,11 +533,7 @@ class FlatInputMaps
"ctrl UP", null,
"ctrl V", null,
"ctrl X", null,
- "END", null,
"F2", null,
- "HOME", null,
- "PAGE_DOWN", null,
- "PAGE_UP", null,
"SPACE", null,
"shift ctrl DOWN", null,
"shift ctrl END", null,
@@ -540,17 +556,18 @@ class FlatInputMaps
"LEFT", "selectChild",
"RIGHT", "selectParent",
"KP_LEFT", "selectChild",
- "KP_RIGHT", "selectParent"
+ "KP_RIGHT", "selectParent",
+ "shift LEFT", "selectChild",
+ "shift RIGHT", "selectParent",
+ "shift KP_LEFT", "selectChild",
+ "shift KP_RIGHT", "selectParent",
+ "alt LEFT", "selectChild",
+ "alt RIGHT", "selectParent",
+ "alt KP_LEFT", "selectChild",
+ "alt KP_RIGHT", "selectParent"
} ) );
}
- private static void copyInputMap( UIDefaults defaults, String srcKey, String destKey ) {
- // Note: not using `defaults.get(key)` here because this would resolve the lazy value
- Object inputMap = defaults.remove( srcKey );
- defaults.put( srcKey, inputMap );
- defaults.put( destKey, inputMap );
- }
-
private static void modifyInputMap( UIDefaults defaults, String key, Object... bindings ) {
// Note: not using `defaults.get(key)` here because this would resolve the lazy value
defaults.put( key, new LazyModifyInputMap( defaults.remove( key ), bindings ) );
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
index 166efa36..5d95d0a5 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
@@ -281,13 +281,14 @@ public class FlatComboBoxUI
// macOS
if( SystemInfo.IS_MAC && editor instanceof JTextComponent ) {
// delegate actions from editor text field to combobox, which is necessary
- // because text field on macOS (based on Aqua LaF UI defaults)
- // already handle those keys
+ // because text field on macOS already handle those keys
InputMap inputMap = ((JTextComponent)editor).getInputMap();
new EditorDelegateAction( inputMap, KeyStroke.getKeyStroke( "UP" ) );
new EditorDelegateAction( inputMap, KeyStroke.getKeyStroke( "KP_UP" ) );
new EditorDelegateAction( inputMap, KeyStroke.getKeyStroke( "DOWN" ) );
new EditorDelegateAction( inputMap, KeyStroke.getKeyStroke( "KP_DOWN" ) );
+ new EditorDelegateAction( inputMap, KeyStroke.getKeyStroke( "HOME" ) );
+ new EditorDelegateAction( inputMap, KeyStroke.getKeyStroke( "END" ) );
}
}
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
index 09e01416..955da633 100644
--- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
+++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
@@ -178,6 +178,7 @@ ColorChooser.swatchesDefaultRecentColor=$control
ComboBox.border=com.formdev.flatlaf.ui.FlatRoundBorder
ComboBox.padding=2,6,2,6
+[mac]ComboBox.showPopupOnNavigation=true
#---- Component ----
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
index 069e8b8e..017b1fea 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
@@ -192,6 +192,7 @@ ComboBox.noActionOnKeyNavigation false
ComboBox.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
ComboBox.selectionBackground #4b6eaf javax.swing.plaf.ColorUIResource [UI]
ComboBox.selectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
+ComboBox.showPopupOnNavigation true
ComboBox.timeFactor 1000
ComboBoxUI com.formdev.flatlaf.ui.FlatComboBoxUI
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
index 15d57e48..45273420 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
@@ -193,6 +193,7 @@ ComboBox.noActionOnKeyNavigation false
ComboBox.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
ComboBox.selectionBackground #2675bf javax.swing.plaf.ColorUIResource [UI]
ComboBox.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
+ComboBox.showPopupOnNavigation true
ComboBox.timeFactor 1000
ComboBoxUI com.formdev.flatlaf.ui.FlatComboBoxUI
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_InputMap_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_InputMap_1.8.0_202-mac.txt
index a958ea8c..6d2b12d1 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_InputMap_1.8.0_202-mac.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_InputMap_1.8.0_202-mac.txt
@@ -22,17 +22,17 @@ CheckBox.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [
#---- ComboBox ----
ComboBox.ancestorInputMap [lazy] 11 javax.swing.plaf.InputMapUIResource [UI]
- DOWN selectNext2
+ DOWN selectNext
END endPassThrough
ENTER enterPressed
ESCAPE hidePopup
HOME homePassThrough
- KP_DOWN selectNext2
- KP_UP selectPrevious2
+ KP_DOWN selectNext
+ KP_UP selectPrevious
PAGE_DOWN pageDownPassThrough
PAGE_UP pageUpPassThrough
SPACE spacePopup
- UP selectPrevious2
+ UP selectPrevious
#---- Desktop ----
@@ -166,7 +166,7 @@ FileChooser.ancestorInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [
#---- FormattedTextField ----
-FormattedTextField.focusInputMap [lazy] 76 javax.swing.plaf.InputMapUIResource [UI]
+FormattedTextField.focusInputMap [lazy] 70 javax.swing.plaf.InputMapUIResource [UI]
alt BACK_SPACE delete-previous-word
alt DELETE delete-next-word
alt KP_LEFT caret-previous-word
@@ -210,8 +210,6 @@ FormattedTextField.focusInputMap [lazy] 76 javax.swing.plaf.InputMapUIResourc
KP_RIGHT caret-forward
KP_UP increment
LEFT caret-backward
- PAGE_DOWN page-down
- PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
UP increment
@@ -226,8 +224,6 @@ FormattedTextField.focusInputMap [lazy] 76 javax.swing.plaf.InputMapUIResourc
shift meta KP_RIGHT selection-end-line
shift meta KP_UP selection-begin
shift meta LEFT selection-begin-line
- shift meta PAGE_DOWN selection-page-right
- shift meta PAGE_UP selection-page-left
shift meta RIGHT selection-end-line
shift meta UP selection-begin
shift BACK_SPACE delete-previous
@@ -239,32 +235,22 @@ FormattedTextField.focusInputMap [lazy] 76 javax.swing.plaf.InputMapUIResourc
shift KP_RIGHT selection-forward
shift KP_UP selection-begin-line
shift LEFT selection-backward
- shift PAGE_DOWN selection-page-down
- shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-begin-line
#---- List ----
-List.focusInputMap.RightToLeft [lazy] 16 javax.swing.plaf.InputMapUIResource [UI]
- ctrl KP_LEFT selectNextColumnChangeLead
- ctrl KP_RIGHT selectPreviousColumnChangeLead
- ctrl LEFT selectNextColumnChangeLead
- ctrl RIGHT selectPreviousColumnChangeLead
+List.focusInputMap.RightToLeft [lazy] 8 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT selectNextColumn
KP_RIGHT selectPreviousColumn
LEFT selectNextColumn
RIGHT selectPreviousColumn
- shift ctrl KP_LEFT selectNextColumnExtendSelection
- shift ctrl KP_RIGHT selectPreviousColumnExtendSelection
- shift ctrl LEFT selectNextColumnExtendSelection
- shift ctrl RIGHT selectPreviousColumnExtendSelection
shift KP_LEFT selectNextColumnExtendSelection
shift KP_RIGHT selectPreviousColumnExtendSelection
shift LEFT selectNextColumnExtendSelection
shift RIGHT selectPreviousColumnExtendSelection
-List.focusInputMap [lazy] 29 javax.swing.plaf.InputMapUIResource [UI]
+List.focusInputMap [lazy] 27 javax.swing.plaf.InputMapUIResource [UI]
meta A selectAll
meta C copy
meta V paste
@@ -272,8 +258,6 @@ List.focusInputMap [lazy] 29 javax.swing.plaf.InputMapUIResource
COPY copy
CUT cut
DOWN selectNextRow
- END selectLastRow
- HOME selectFirstRow
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
@@ -298,7 +282,7 @@ List.focusInputMap [lazy] 29 javax.swing.plaf.InputMapUIResource
#---- PasswordField ----
-PasswordField.focusInputMap [lazy] 73 javax.swing.plaf.InputMapUIResource [UI]
+PasswordField.focusInputMap [lazy] 67 javax.swing.plaf.InputMapUIResource [UI]
alt KP_LEFT caret-begin-line
alt KP_RIGHT caret-end-line
alt LEFT caret-begin-line
@@ -339,8 +323,6 @@ PasswordField.focusInputMap [lazy] 73 javax.swing.plaf.InputMapUIResource
KP_RIGHT caret-forward
KP_UP caret-begin-line
LEFT caret-backward
- PAGE_DOWN page-down
- PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
UP caret-begin-line
@@ -355,8 +337,6 @@ PasswordField.focusInputMap [lazy] 73 javax.swing.plaf.InputMapUIResource
shift meta KP_RIGHT selection-end-line
shift meta KP_UP selection-begin
shift meta LEFT selection-begin-line
- shift meta PAGE_DOWN selection-page-right
- shift meta PAGE_UP selection-page-left
shift meta RIGHT selection-end-line
shift meta UP selection-begin
shift BACK_SPACE delete-previous
@@ -368,8 +348,6 @@ PasswordField.focusInputMap [lazy] 73 javax.swing.plaf.InputMapUIResource
shift KP_RIGHT selection-forward
shift KP_UP selection-begin-line
shift LEFT selection-backward
- shift PAGE_DOWN selection-page-down
- shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-begin-line
@@ -470,24 +448,6 @@ ScrollBar.ancestorInputMap [lazy] 12 javax.swing.plaf.InputMapUIResource
PAGE_UP negativeBlockIncrement
RIGHT positiveUnitIncrement
UP negativeUnitIncrement
-ScrollBar.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
- KP_LEFT positiveUnitIncrement
- KP_RIGHT negativeUnitIncrement
- LEFT positiveUnitIncrement
- RIGHT negativeUnitIncrement
-ScrollBar.focusInputMap [lazy] 12 javax.swing.plaf.InputMapUIResource [UI]
- DOWN positiveUnitIncrement
- END maxScroll
- HOME minScroll
- KP_DOWN positiveUnitIncrement
- KP_LEFT negativeUnitIncrement
- KP_RIGHT positiveUnitIncrement
- KP_UP negativeUnitIncrement
- LEFT negativeUnitIncrement
- PAGE_DOWN positiveBlockIncrement
- PAGE_UP negativeBlockIncrement
- RIGHT positiveUnitIncrement
- UP negativeUnitIncrement
#---- ScrollPane ----
@@ -560,16 +520,12 @@ SplitPane.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource
#---- TabbedPane ----
-TabbedPane.ancestorInputMap [lazy] 6 javax.swing.plaf.InputMapUIResource [UI]
- ctrl KP_UP requestFocus
+TabbedPane.ancestorInputMap [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
ctrl PAGE_DOWN navigatePageDown
ctrl PAGE_UP navigatePageUp
ctrl TAB navigateNext
- ctrl UP requestFocus
shift ctrl TAB navigatePrevious
-TabbedPane.focusInputMap [lazy] 10 javax.swing.plaf.InputMapUIResource [UI]
- ctrl DOWN requestFocusForVisibleComponent
- ctrl KP_DOWN requestFocusForVisibleComponent
+TabbedPane.focusInputMap [lazy] 8 javax.swing.plaf.InputMapUIResource [UI]
DOWN navigateDown
KP_DOWN navigateDown
KP_LEFT navigateLeft
@@ -595,7 +551,7 @@ Table.ancestorInputMap.RightToLeft [lazy] 12 javax.swing.plaf.InputMapUIResou
shift KP_RIGHT selectPreviousColumnExtendSelection
shift LEFT selectNextColumnExtendSelection
shift RIGHT selectPreviousColumnExtendSelection
-Table.ancestorInputMap [lazy] 38 javax.swing.plaf.InputMapUIResource [UI]
+Table.ancestorInputMap [lazy] 34 javax.swing.plaf.InputMapUIResource [UI]
alt TAB focusHeader
meta A selectAll
meta C copy
@@ -604,17 +560,13 @@ Table.ancestorInputMap [lazy] 38 javax.swing.plaf.InputMapUIResource
COPY copy
CUT cut
DOWN selectNextRow
- END selectLastRow
ENTER selectNextRowCell
ESCAPE cancel
- HOME selectFirstRow
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
KP_UP selectPreviousRow
LEFT selectPreviousColumn
- PAGE_DOWN scrollDownChangeSelection
- PAGE_UP scrollUpChangeSelection
PASTE paste
RIGHT selectNextColumn
TAB selectNextColumnCell
@@ -745,7 +697,7 @@ TextArea.focusInputMap [lazy] 83 javax.swing.plaf.InputMapUIResource
#---- TextField ----
-TextField.focusInputMap [lazy] 75 javax.swing.plaf.InputMapUIResource [UI]
+TextField.focusInputMap [lazy] 69 javax.swing.plaf.InputMapUIResource [UI]
alt BACK_SPACE delete-previous-word
alt DELETE delete-next-word
alt KP_LEFT caret-previous-word
@@ -788,8 +740,6 @@ TextField.focusInputMap [lazy] 75 javax.swing.plaf.InputMapUIResource
KP_RIGHT caret-forward
KP_UP caret-begin-line
LEFT caret-backward
- PAGE_DOWN page-down
- PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
UP caret-begin-line
@@ -804,8 +754,6 @@ TextField.focusInputMap [lazy] 75 javax.swing.plaf.InputMapUIResource
shift meta KP_RIGHT selection-end-line
shift meta KP_UP selection-begin
shift meta LEFT selection-begin-line
- shift meta PAGE_DOWN selection-page-right
- shift meta PAGE_UP selection-page-left
shift meta RIGHT selection-end-line
shift meta UP selection-begin
shift BACK_SPACE delete-previous
@@ -817,8 +765,6 @@ TextField.focusInputMap [lazy] 75 javax.swing.plaf.InputMapUIResource
shift KP_RIGHT selection-forward
shift KP_UP selection-begin-line
shift LEFT selection-backward
- shift PAGE_DOWN selection-page-down
- shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-begin-line
@@ -935,12 +881,24 @@ ToolBar.ancestorInputMap [lazy] 8 javax.swing.plaf.InputMapUIResource [
Tree.ancestorInputMap [lazy] 1 javax.swing.plaf.InputMapUIResource [UI]
ESCAPE cancel
-Tree.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
+Tree.focusInputMap.RightToLeft [lazy] 12 javax.swing.plaf.InputMapUIResource [UI]
+ alt KP_LEFT selectChild
+ alt KP_RIGHT selectParent
+ alt LEFT selectChild
+ alt RIGHT selectParent
KP_LEFT selectChild
KP_RIGHT selectParent
LEFT selectChild
RIGHT selectParent
-Tree.focusInputMap [lazy] 19 javax.swing.plaf.InputMapUIResource [UI]
+ shift KP_LEFT selectChild
+ shift KP_RIGHT selectParent
+ shift LEFT selectChild
+ shift RIGHT selectParent
+Tree.focusInputMap [lazy] 27 javax.swing.plaf.InputMapUIResource [UI]
+ alt KP_LEFT selectParent
+ alt KP_RIGHT selectChild
+ alt LEFT selectParent
+ alt RIGHT selectChild
meta A selectAll
meta C copy
meta V paste
@@ -958,5 +916,9 @@ Tree.focusInputMap [lazy] 19 javax.swing.plaf.InputMapUIResource
UP selectPrevious
shift DOWN selectNextExtendSelection
shift KP_DOWN selectNextExtendSelection
+ shift KP_LEFT selectParent
+ shift KP_RIGHT selectChild
shift KP_UP selectPreviousExtendSelection
+ shift LEFT selectParent
+ shift RIGHT selectChild
shift UP selectPreviousExtendSelection
From c706a79f7457659eab04fd9a381c1e00dee86375 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Mon, 16 Mar 2020 22:46:33 +0100
Subject: [PATCH 009/500] UIScale: fixed NPE in getSystemScaleFactor()
(occurred in progress bar on startup in NB)
---
.../src/main/java/com/formdev/flatlaf/util/UIScale.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
index 10d34ff5..9f7ac69b 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
@@ -97,7 +97,7 @@ public class UIScale
}
public static double getSystemScaleFactor( GraphicsConfiguration gc ) {
- return isSystemScalingEnabled() ? gc.getDefaultTransform().getScaleX() : 1;
+ return (isSystemScalingEnabled() && gc != null) ? gc.getDefaultTransform().getScaleX() : 1;
}
//---- user scaling (Java 8) ----------------------------------------------
From e51ffe2a1c790219402e2b32a3b82c1102b5742a Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Mon, 16 Mar 2020 22:47:44 +0100
Subject: [PATCH 010/500] release 0.28
---
CHANGELOG.md | 6 +++++-
build.gradle.kts | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index deb99d01..c5be7528 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,7 @@
FlatLaf Change Log
==================
-## Unreleased
+## 0.28
- PasswordField: Warn about enabled Caps Lock.
- TabbedPane: Support Ctrl+TAB / Ctrl+Shift+TAB to switch
@@ -11,6 +11,10 @@ FlatLaf Change Log
- IntelliJ Themes: Added Gradianto themes to demo.
- Button, CheckBox and RadioButton: Fixed NPE when button has children. (PR #68)
- ScrollBar: Improved colors.
+- Reviewed (and tested) all key bindings on Windows and macOS. Linux key
+ bindings are equal to Windows key bindings. macOS key bindings are slightly
+ different for platform specific behavior.
+- UI default values are no longer based on Metal/Aqua UI defaults.
## 0.27
diff --git a/build.gradle.kts b/build.gradle.kts
index 82af0dc3..9d44f41b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-val releaseVersion = "0.27"
-val developmentVersion = "0.28-SNAPSHOT"
+val releaseVersion = "0.28"
+val developmentVersion = "0.29-SNAPSHOT"
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
From 1d9c8ca65e0c461dc528cce6a75640a55f8ba7a8 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Thu, 26 Mar 2020 13:06:12 +0100
Subject: [PATCH 011/500] Linux: fixed scaling if `GDK_SCALE` environment
variable is set or if running on JetBrains Runtime (issue #69)
---
CHANGELOG.md | 6 ++++++
.../com/formdev/flatlaf/LinuxFontPolicy.java | 19 ++++++++++++++++++-
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5be7528..71c17239 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,12 @@
FlatLaf Change Log
==================
+## Unreleased
+
+- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
+ on JetBrains Runtime. (issue #69)
+
+
## 0.28
- PasswordField: Warn about enabled Caps Lock.
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
index cee1e295..822e2ad5 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
@@ -17,6 +17,7 @@
package com.formdev.flatlaf;
import java.awt.Font;
+import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
import java.awt.Toolkit;
import java.io.BufferedReader;
@@ -31,6 +32,7 @@ import java.util.logging.Level;
import javax.swing.text.StyleContext;
import com.formdev.flatlaf.util.StringUtils;
import com.formdev.flatlaf.util.SystemInfo;
+import com.formdev.flatlaf.util.UIScale;
/**
* @author Karl Tauber
@@ -99,6 +101,10 @@ class LinuxFontPolicy
}
private static double getGnomeFontScale() {
+ // do not scale font here if JRE scales
+ if( isSystemScaling() )
+ return 1;
+
// see class com.sun.java.swing.plaf.gtk.PangoFonts background information
Object value = Toolkit.getDefaultToolkit().getDesktopProperty( "gnome.Xft/DPI" );
@@ -168,7 +174,7 @@ class LinuxFontPolicy
// font dpi
int dpi = 96;
- if( forceFontDPI != null ) {
+ if( forceFontDPI != null && !isSystemScaling() ) {
try {
dpi = Integer.parseInt( forceFontDPI );
if( dpi <= 0 )
@@ -247,4 +253,15 @@ class LinuxFontPolicy
}
return null;
}
+
+ /**
+ * Returns true if the JRE scales, which is the case if:
+ * - environment variable GDK_SCALE is set and running on Java 9 or later
+ * - running on JetBrains Runtime 11 or later and scaling is enabled in system Settings
+ */
+ private static boolean isSystemScaling() {
+ GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment()
+ .getDefaultScreenDevice().getDefaultConfiguration();
+ return UIScale.getSystemScaleFactor( gc ) > 1;
+ }
}
From 225b722b1b80ac2bbd5f11f1ac938e0db9beeb92 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Thu, 26 Mar 2020 17:20:09 +0100
Subject: [PATCH 012/500] Linux: fixed wrong font size if `GDK_SCALE`
environment variable is set or if running on JetBrains Runtime (issue #69)
---
.../src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
index 822e2ad5..1da961d8 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
@@ -103,7 +103,7 @@ class LinuxFontPolicy
private static double getGnomeFontScale() {
// do not scale font here if JRE scales
if( isSystemScaling() )
- return 1;
+ return 96. / 72.;
// see class com.sun.java.swing.plaf.gtk.PangoFonts background information
From 12af2de99ec239064d2683763ce1c5971c102877 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Fri, 27 Mar 2020 10:44:43 +0100
Subject: [PATCH 013/500] no longer use system property `sun.java2d.uiScale`
(Java 8 only)
---
CHANGELOG.md | 1 +
.../src/main/java/com/formdev/flatlaf/util/UIScale.java | 7 ++-----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 71c17239..7901e4bb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ FlatLaf Change Log
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
on JetBrains Runtime. (issue #69)
+- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
## 0.28
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
index 9f7ac69b..8f89cad4 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
@@ -177,17 +177,14 @@ public class UIScale
}
/**
- * Applies a custom scale factor given in system properties "flatlaf.uiScale"
- * or "sun.java2d.uiScale" to the given font.
+ * Applies a custom scale factor given in system property "flatlaf.uiScale"
+ * to the given font.
*/
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
if( UIScale.isSystemScalingEnabled() )
return font;
String uiScale = System.getProperty( "flatlaf.uiScale" );
- if( uiScale == null )
- uiScale = System.getProperty( "sun.java2d.uiScale" );
-
float scaleFactor = parseScaleFactor( uiScale );
if( scaleFactor <= 0 )
return font;
From a3788038bbbed7456d70e869183378183fef7987 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Fri, 27 Mar 2020 10:51:20 +0100
Subject: [PATCH 014/500] Tree: fixed repainting wide selection on focus
gained/lost
---
CHANGELOG.md | 1 +
.../src/main/resources/com/formdev/flatlaf/FlatLaf.properties | 2 +-
.../flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt | 1 +
.../flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt | 1 +
.../flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt | 1 +
.../flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt | 1 +
6 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7901e4bb..2e9fd22f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ FlatLaf Change Log
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
on JetBrains Runtime. (issue #69)
+- Tree: Fixed repainting wide selection on focus gained/lost.
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
index 955da633..aa1521f4 100644
--- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
+++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
@@ -269,7 +269,6 @@ InternalFrameTitlePane.border=0,8,0,0
#---- List ----
-List.border=1,0,1,0
List.border=0,0,0,0
List.cellMargins=1,6,1,6
List.cellFocusColor=@cellFocusColor
@@ -599,6 +598,7 @@ Tree.dropLineColor=@dropLineColor
Tree.rendererFillBackground=false
Tree.rendererMargins=1,2,1,2
Tree.wideSelection=true
+Tree.repaintWholeRow=true
Tree.paintLines=false
Tree.leftChildIndent=7
Tree.rightChildIndent=11
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
index 017b1fea..76bfc81c 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
@@ -1124,6 +1124,7 @@ Tree.openIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatTre
Tree.paintLines false
Tree.rendererFillBackground false
Tree.rendererMargins 1,2,1,2 javax.swing.plaf.InsetsUIResource [UI]
+Tree.repaintWholeRow true
Tree.rightChildIndent 11
Tree.rowHeight 0
Tree.scrollsOnExpand true
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt
index a9006f26..8ee08900 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt
@@ -1122,6 +1122,7 @@ Tree.openIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatTre
Tree.paintLines false
Tree.rendererFillBackground false
Tree.rendererMargins 1,2,1,2 javax.swing.plaf.InsetsUIResource [UI]
+Tree.repaintWholeRow true
Tree.rightChildIndent 11
Tree.rowHeight 0
Tree.scrollsOnExpand true
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
index 45273420..cf2c102b 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
@@ -1126,6 +1126,7 @@ Tree.openIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatTre
Tree.paintLines false
Tree.rendererFillBackground false
Tree.rendererMargins 1,2,1,2 javax.swing.plaf.InsetsUIResource [UI]
+Tree.repaintWholeRow true
Tree.rightChildIndent 11
Tree.rowHeight 0
Tree.scrollsOnExpand true
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt
index 0ddf06d9..d4ec7bc1 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt
@@ -1124,6 +1124,7 @@ Tree.openIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatTre
Tree.paintLines false
Tree.rendererFillBackground false
Tree.rendererMargins 1,2,1,2 javax.swing.plaf.InsetsUIResource [UI]
+Tree.repaintWholeRow true
Tree.rightChildIndent 11
Tree.rowHeight 0
Tree.scrollsOnExpand true
From 4ac5ad06f2747838681b7a963add43753d451c34 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Fri, 27 Mar 2020 18:54:30 +0100
Subject: [PATCH 015/500] IntelliJ Themes: simplified applying theme properties
to UI defaults
---
.../src/main/java/com/formdev/flatlaf/FlatLaf.java | 12 +++++++-----
.../main/java/com/formdev/flatlaf/IntelliJTheme.java | 9 +--------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
index c02ec1e1..55a8f087 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
@@ -280,16 +280,18 @@ public abstract class FlatLaf
// initialize text antialiasing
putAATextInfo( defaults );
- invokePostInitialization( defaults );
+ // apply additional defaults (e.g. from IntelliJ themes)
+ applyAdditionalDefaults( defaults );
- return defaults;
- }
-
- void invokePostInitialization( UIDefaults defaults ) {
if( postInitialization != null ) {
postInitialization.accept( defaults );
postInitialization = null;
}
+
+ return defaults;
+ }
+
+ void applyAdditionalDefaults( UIDefaults defaults ) {
}
List> getLafClassesForDefaultsLoading() {
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java
index 33f7dfdc..c0304f4b 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java
@@ -513,15 +513,8 @@ public class IntelliJTheme
}
@Override
- public UIDefaults getDefaults() {
- UIDefaults defaults = super.getDefaults();
+ void applyAdditionalDefaults( UIDefaults defaults ) {
theme.applyProperties( defaults );
- super.invokePostInitialization( defaults );
- return defaults;
- }
-
- @Override
- void invokePostInitialization( UIDefaults defaults ) {
}
@Override
From 93b82c0e97172f17fb3b53e6bb691bc7cf4bd92f Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Fri, 27 Mar 2020 23:21:55 +0100
Subject: [PATCH 016/500] FlatDefaultsAddon: added afterDefaultsLoading()
method to allow modification of UI defaults by Addons
---
.../formdev/flatlaf/FlatDefaultsAddon.java | 9 ++++++++
.../java/com/formdev/flatlaf/FlatLaf.java | 17 ++++++++++++--
.../com/formdev/flatlaf/UIDefaultsLoader.java | 22 ++++++++-----------
3 files changed, 33 insertions(+), 15 deletions(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDefaultsAddon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDefaultsAddon.java
index 4e469d8f..1737d8e3 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDefaultsAddon.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDefaultsAddon.java
@@ -17,6 +17,8 @@
package com.formdev.flatlaf;
import java.io.InputStream;
+import javax.swing.LookAndFeel;
+import javax.swing.UIDefaults;
/**
* Addon for FlatLaf UI defaults.
@@ -50,6 +52,13 @@ public abstract class FlatDefaultsAddon
return addonClass.getResourceAsStream( propertiesName );
}
+ /**
+ * Allows modifying UI defaults after loading UI defaults.
+ * The default implementation does nothing.
+ */
+ public void afterDefaultsLoading( LookAndFeel laf, UIDefaults defaults ) {
+ }
+
/**
* Returns the priority used to sort addon loading.
* The order is only important if you want overwrite UI defaults of other addons.
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
index 55a8f087..1f11462b 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
@@ -31,8 +31,10 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.ref.WeakReference;
import java.lang.reflect.Method;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.ServiceLoader;
import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -266,12 +268,19 @@ public abstract class FlatLaf
initIconColors( defaults, isDark() );
FlatInputMaps.initInputMaps( defaults );
+ // get addons and sort them by priority
+ ServiceLoader addonLoader = ServiceLoader.load( FlatDefaultsAddon.class );
+ List addons = new ArrayList<>();
+ for( FlatDefaultsAddon addon : addonLoader )
+ addons.add( addon );
+ addons.sort( (addon1, addon2) -> addon1.getPriority() - addon2.getPriority() );
+
// load defaults from properties
List> lafClassesForDefaultsLoading = getLafClassesForDefaultsLoading();
if( lafClassesForDefaultsLoading != null )
- UIDefaultsLoader.loadDefaultsFromProperties( lafClassesForDefaultsLoading, defaults );
+ UIDefaultsLoader.loadDefaultsFromProperties( lafClassesForDefaultsLoading, addons, defaults );
else
- UIDefaultsLoader.loadDefaultsFromProperties( getClass(), defaults );
+ UIDefaultsLoader.loadDefaultsFromProperties( getClass(), addons, defaults );
// use Aqua MenuBarUI if Mac screen menubar is enabled
if( SystemInfo.IS_MAC && Boolean.getBoolean( "apple.laf.useScreenMenuBar" ) )
@@ -283,6 +292,10 @@ public abstract class FlatLaf
// apply additional defaults (e.g. from IntelliJ themes)
applyAdditionalDefaults( defaults );
+ // allow addons modifying UI defaults
+ for( FlatDefaultsAddon addon : addons )
+ addon.afterDefaultsLoading( this, defaults );
+
if( postInitialization != null ) {
postInitialization.accept( defaults );
postInitialization = null;
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
index d19e0966..cc508fe2 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
@@ -28,7 +28,6 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
-import java.util.ServiceLoader;
import java.util.function.Function;
import java.util.logging.Level;
import javax.swing.UIDefaults;
@@ -69,7 +68,9 @@ class UIDefaultsLoader
private static final String OPTIONAL_PREFIX = "?";
private static final String GLOBAL_PREFIX = "*.";
- static void loadDefaultsFromProperties( Class> lookAndFeelClass, UIDefaults defaults ) {
+ static void loadDefaultsFromProperties( Class> lookAndFeelClass, List addons,
+ UIDefaults defaults )
+ {
// determine classes in class hierarchy in reverse order
ArrayList> lafClasses = new ArrayList<>();
for( Class> lafClass = lookAndFeelClass;
@@ -79,10 +80,12 @@ class UIDefaultsLoader
lafClasses.add( 0, lafClass );
}
- loadDefaultsFromProperties( lafClasses, defaults );
+ loadDefaultsFromProperties( lafClasses, addons, defaults );
}
- static void loadDefaultsFromProperties( List> lafClasses, UIDefaults defaults ) {
+ static void loadDefaultsFromProperties( List> lafClasses, List addons,
+ UIDefaults defaults )
+ {
try {
// load core properties files
Properties properties = new Properties();
@@ -94,15 +97,8 @@ class UIDefaultsLoader
}
}
- // get addons and sort them by priority
- ServiceLoader addonLoader = ServiceLoader.load( FlatDefaultsAddon.class );
- List addonList = new ArrayList<>();
- for( FlatDefaultsAddon addon : addonLoader )
- addonList.add( addon );
- addonList.sort( (addon1, addon2) -> addon1.getPriority() - addon2.getPriority() );
-
// load properties from addons
- for( FlatDefaultsAddon addon : addonList ) {
+ for( FlatDefaultsAddon addon : addons ) {
for( Class> lafClass : lafClasses ) {
try( InputStream in = addon.getDefaults( lafClass ) ) {
if( in != null )
@@ -113,7 +109,7 @@ class UIDefaultsLoader
// collect addon class loaders
List addonClassLoaders = new ArrayList<>();
- for( FlatDefaultsAddon addon : addonList ) {
+ for( FlatDefaultsAddon addon : addons ) {
ClassLoader addonClassLoader = addon.getClass().getClassLoader();
if( !addonClassLoaders.contains( addonClassLoader ) )
addonClassLoaders.add( addonClassLoader );
From f2ab848c46728a02c9842f514c5bd6b5fa28efe3 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Fri, 27 Mar 2020 23:49:25 +0100
Subject: [PATCH 017/500] FlatOptionPaneTest: scroll pane added
---
.../formdev/flatlaf/demo/OptionPanePanel.jfd | 4 +-
.../flatlaf/testing/FlatOptionPaneTest.java | 378 ++++++++-------
.../flatlaf/testing/FlatOptionPaneTest.jfd | 454 +++++++++---------
3 files changed, 424 insertions(+), 412 deletions(-)
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/OptionPanePanel.jfd b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/OptionPanePanel.jfd
index b0408f95..9c9e6980 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/OptionPanePanel.jfd
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/OptionPanePanel.jfd
@@ -1,4 +1,4 @@
-JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8"
+JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -243,7 +243,7 @@ new FormModel {
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
- "size": new java.awt.Dimension( 790, 840 )
+ "size": new java.awt.Dimension( 840, 900 )
} )
}
}
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatOptionPaneTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatOptionPaneTest.java
index aed743a4..38b90638 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatOptionPaneTest.java
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatOptionPaneTest.java
@@ -21,13 +21,14 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.*;
import javax.swing.border.*;
+import com.formdev.flatlaf.demo.ScrollablePanel;
import net.miginfocom.swing.*;
/**
* @author Karl Tauber
*/
public class FlatOptionPaneTest
- extends FlatTestPanel
+ extends JScrollPane
{
public static void main( String[] args ) {
SwingUtilities.invokeLater( () -> {
@@ -55,6 +56,7 @@ public class FlatOptionPaneTest
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
+ ScrollablePanel panel9 = new ScrollablePanel();
JLabel plainLabel = new JLabel();
JPanel panel1 = new JPanel();
JOptionPane plainOptionPane = new JOptionPane();
@@ -89,194 +91,200 @@ public class FlatOptionPaneTest
FlatOptionPaneTest.ShowDialogLinkLabel customShowDialogLabel = new FlatOptionPaneTest.ShowDialogLinkLabel();
//======== this ========
- setLayout(new MigLayout(
- "flowy,ltr,insets dialog,hidemode 3",
- // columns
- "[]" +
- "[]" +
- "[fill]",
- // rows
- "[top]" +
- "[top]" +
- "[top]" +
- "[top]" +
- "[top]" +
- "[top]" +
- "[top]" +
- "[top]"));
+ setBorder(BorderFactory.createEmptyBorder());
- //---- plainLabel ----
- plainLabel.setText("Plain");
- add(plainLabel, "cell 0 0");
-
- //======== panel1 ========
+ //======== panel9 ========
{
- panel1.setBorder(LineBorder.createGrayLineBorder());
- panel1.setLayout(new BorderLayout());
+ panel9.setLayout(new MigLayout(
+ "flowy,ltr,insets dialog,hidemode 3",
+ // columns
+ "[]" +
+ "[]" +
+ "[fill]",
+ // rows
+ "[top]" +
+ "[top]" +
+ "[top]" +
+ "[top]" +
+ "[top]" +
+ "[top]" +
+ "[top]" +
+ "[top]"));
- //---- plainOptionPane ----
- plainOptionPane.setMessage("Hello world.");
- panel1.add(plainOptionPane, BorderLayout.CENTER);
+ //---- plainLabel ----
+ plainLabel.setText("Plain");
+ panel9.add(plainLabel, "cell 0 0");
+
+ //======== panel1 ========
+ {
+ panel1.setBorder(LineBorder.createGrayLineBorder());
+ panel1.setLayout(new BorderLayout());
+
+ //---- plainOptionPane ----
+ plainOptionPane.setMessage("Hello world.");
+ panel1.add(plainOptionPane, BorderLayout.CENTER);
+ }
+ panel9.add(panel1, "cell 1 0");
+
+ //---- plainShowDialogLabel ----
+ plainShowDialogLabel.setOptionPane(plainOptionPane);
+ plainShowDialogLabel.setTitleLabel(plainLabel);
+ panel9.add(plainShowDialogLabel, "cell 2 0");
+
+ //---- errorLabel ----
+ errorLabel.setText("Error");
+ panel9.add(errorLabel, "cell 0 1");
+
+ //======== panel2 ========
+ {
+ panel2.setBorder(LineBorder.createGrayLineBorder());
+ panel2.setLayout(new BorderLayout());
+
+ //---- errorOptionPane ----
+ errorOptionPane.setMessageType(JOptionPane.ERROR_MESSAGE);
+ errorOptionPane.setOptionType(JOptionPane.OK_CANCEL_OPTION);
+ errorOptionPane.setMessage("Your PC ran into a problem. Buy a new one.");
+ panel2.add(errorOptionPane, BorderLayout.CENTER);
+ }
+ panel9.add(panel2, "cell 1 1");
+
+ //---- errorShowDialogLabel ----
+ errorShowDialogLabel.setTitleLabel(errorLabel);
+ errorShowDialogLabel.setOptionPane(errorOptionPane);
+ panel9.add(errorShowDialogLabel, "cell 2 1");
+
+ //---- informationLabel ----
+ informationLabel.setText("Information");
+ panel9.add(informationLabel, "cell 0 2");
+
+ //======== panel3 ========
+ {
+ panel3.setBorder(LineBorder.createGrayLineBorder());
+ panel3.setLayout(new BorderLayout());
+
+ //---- informationOptionPane ----
+ informationOptionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE);
+ informationOptionPane.setOptionType(JOptionPane.YES_NO_OPTION);
+ informationOptionPane.setMessage("Text with\nmultiple lines\n(use \\n to separate lines)");
+ panel3.add(informationOptionPane, BorderLayout.CENTER);
+ }
+ panel9.add(panel3, "cell 1 2");
+
+ //---- informationShowDialogLabel ----
+ informationShowDialogLabel.setOptionPane(informationOptionPane);
+ informationShowDialogLabel.setTitleLabel(informationLabel);
+ panel9.add(informationShowDialogLabel, "cell 2 2");
+
+ //---- questionLabel ----
+ questionLabel.setText("Question");
+ panel9.add(questionLabel, "cell 0 3");
+
+ //======== panel4 ========
+ {
+ panel4.setBorder(LineBorder.createGrayLineBorder());
+ panel4.setLayout(new BorderLayout());
+
+ //---- questionOptionPane ----
+ questionOptionPane.setMessageType(JOptionPane.QUESTION_MESSAGE);
+ questionOptionPane.setOptionType(JOptionPane.YES_NO_CANCEL_OPTION);
+ questionOptionPane.setMessage("Answer the question. What question? Don't know. Just writing useless text to make this longer than 80 characters.");
+ panel4.add(questionOptionPane, BorderLayout.CENTER);
+ }
+ panel9.add(panel4, "cell 1 3");
+
+ //---- questionShowDialogLabel ----
+ questionShowDialogLabel.setOptionPane(questionOptionPane);
+ questionShowDialogLabel.setTitleLabel(questionLabel);
+ panel9.add(questionShowDialogLabel, "cell 2 3");
+
+ //---- warningLabel ----
+ warningLabel.setText("Warning");
+ panel9.add(warningLabel, "cell 0 4");
+
+ //======== panel5 ========
+ {
+ panel5.setBorder(LineBorder.createGrayLineBorder());
+ panel5.setLayout(new BorderLayout());
+
+ //---- warningOptionPane ----
+ warningOptionPane.setMessageType(JOptionPane.WARNING_MESSAGE);
+ warningOptionPane.setOptionType(JOptionPane.OK_CANCEL_OPTION);
+ warningOptionPane.setMessage("I like bold,
and I like italic,
and I like to have
many lines.
Lots of lines.");
+ panel5.add(warningOptionPane, BorderLayout.CENTER);
+ }
+ panel9.add(panel5, "cell 1 4");
+
+ //---- warningShowDialogLabel ----
+ warningShowDialogLabel.setOptionPane(warningOptionPane);
+ warningShowDialogLabel.setTitleLabel(warningLabel);
+ panel9.add(warningShowDialogLabel, "cell 2 4");
+
+ //---- inputLabel ----
+ inputLabel.setText("Input");
+ panel9.add(inputLabel, "cell 0 5");
+
+ //======== panel7 ========
+ {
+ panel7.setBorder(LineBorder.createGrayLineBorder());
+ panel7.setLayout(new BorderLayout());
+
+ //---- inputOptionPane ----
+ inputOptionPane.setWantsInput(true);
+ inputOptionPane.setOptionType(JOptionPane.OK_CANCEL_OPTION);
+ inputOptionPane.setMessage("Enter whatever you want:");
+ panel7.add(inputOptionPane, BorderLayout.CENTER);
+ }
+ panel9.add(panel7, "cell 1 5");
+
+ //---- inputShowDialogLabel ----
+ inputShowDialogLabel.setOptionPane(inputOptionPane);
+ inputShowDialogLabel.setTitleLabel(inputLabel);
+ panel9.add(inputShowDialogLabel, "cell 2 5");
+
+ //---- inputIconLabel ----
+ inputIconLabel.setText("Input + icon");
+ panel9.add(inputIconLabel, "cell 0 6");
+
+ //======== panel8 ========
+ {
+ panel8.setBorder(LineBorder.createGrayLineBorder());
+ panel8.setLayout(new BorderLayout());
+
+ //---- inputIconOptionPane ----
+ inputIconOptionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE);
+ inputIconOptionPane.setWantsInput(true);
+ inputIconOptionPane.setOptionType(JOptionPane.OK_CANCEL_OPTION);
+ inputIconOptionPane.setMessage("Enter something:");
+ panel8.add(inputIconOptionPane, BorderLayout.CENTER);
+ }
+ panel9.add(panel8, "cell 1 6");
+
+ //---- inputIconShowDialogLabel ----
+ inputIconShowDialogLabel.setTitleLabel(inputIconLabel);
+ inputIconShowDialogLabel.setOptionPane(inputIconOptionPane);
+ panel9.add(inputIconShowDialogLabel, "cell 2 6");
+
+ //---- customLabel ----
+ customLabel.setText("Custom");
+ panel9.add(customLabel, "cell 0 7");
+
+ //======== panel6 ========
+ {
+ panel6.setBorder(LineBorder.createGrayLineBorder());
+ panel6.setLayout(new BorderLayout());
+
+ //---- customOptionPane ----
+ customOptionPane.setIcon(UIManager.getIcon("Tree.leafIcon"));
+ panel6.add(customOptionPane, BorderLayout.CENTER);
+ }
+ panel9.add(panel6, "cell 1 7");
+
+ //---- customShowDialogLabel ----
+ customShowDialogLabel.setOptionPane(customOptionPane);
+ customShowDialogLabel.setTitleLabel(customLabel);
+ panel9.add(customShowDialogLabel, "cell 2 7");
}
- add(panel1, "cell 1 0");
-
- //---- plainShowDialogLabel ----
- plainShowDialogLabel.setOptionPane(plainOptionPane);
- plainShowDialogLabel.setTitleLabel(plainLabel);
- add(plainShowDialogLabel, "cell 2 0");
-
- //---- errorLabel ----
- errorLabel.setText("Error");
- add(errorLabel, "cell 0 1");
-
- //======== panel2 ========
- {
- panel2.setBorder(LineBorder.createGrayLineBorder());
- panel2.setLayout(new BorderLayout());
-
- //---- errorOptionPane ----
- errorOptionPane.setMessageType(JOptionPane.ERROR_MESSAGE);
- errorOptionPane.setOptionType(JOptionPane.OK_CANCEL_OPTION);
- errorOptionPane.setMessage("Your PC ran into a problem. Buy a new one.");
- panel2.add(errorOptionPane, BorderLayout.CENTER);
- }
- add(panel2, "cell 1 1");
-
- //---- errorShowDialogLabel ----
- errorShowDialogLabel.setTitleLabel(errorLabel);
- errorShowDialogLabel.setOptionPane(errorOptionPane);
- add(errorShowDialogLabel, "cell 2 1");
-
- //---- informationLabel ----
- informationLabel.setText("Information");
- add(informationLabel, "cell 0 2");
-
- //======== panel3 ========
- {
- panel3.setBorder(LineBorder.createGrayLineBorder());
- panel3.setLayout(new BorderLayout());
-
- //---- informationOptionPane ----
- informationOptionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE);
- informationOptionPane.setOptionType(JOptionPane.YES_NO_OPTION);
- informationOptionPane.setMessage("Text with\nmultiple lines\n(use \\n to separate lines)");
- panel3.add(informationOptionPane, BorderLayout.CENTER);
- }
- add(panel3, "cell 1 2");
-
- //---- informationShowDialogLabel ----
- informationShowDialogLabel.setOptionPane(informationOptionPane);
- informationShowDialogLabel.setTitleLabel(informationLabel);
- add(informationShowDialogLabel, "cell 2 2");
-
- //---- questionLabel ----
- questionLabel.setText("Question");
- add(questionLabel, "cell 0 3");
-
- //======== panel4 ========
- {
- panel4.setBorder(LineBorder.createGrayLineBorder());
- panel4.setLayout(new BorderLayout());
-
- //---- questionOptionPane ----
- questionOptionPane.setMessageType(JOptionPane.QUESTION_MESSAGE);
- questionOptionPane.setOptionType(JOptionPane.YES_NO_CANCEL_OPTION);
- questionOptionPane.setMessage("Answer the question. What question? Don't know. Just writing useless text to make this longer than 80 characters.");
- panel4.add(questionOptionPane, BorderLayout.CENTER);
- }
- add(panel4, "cell 1 3");
-
- //---- questionShowDialogLabel ----
- questionShowDialogLabel.setOptionPane(questionOptionPane);
- questionShowDialogLabel.setTitleLabel(questionLabel);
- add(questionShowDialogLabel, "cell 2 3");
-
- //---- warningLabel ----
- warningLabel.setText("Warning");
- add(warningLabel, "cell 0 4");
-
- //======== panel5 ========
- {
- panel5.setBorder(LineBorder.createGrayLineBorder());
- panel5.setLayout(new BorderLayout());
-
- //---- warningOptionPane ----
- warningOptionPane.setMessageType(JOptionPane.WARNING_MESSAGE);
- warningOptionPane.setOptionType(JOptionPane.OK_CANCEL_OPTION);
- warningOptionPane.setMessage("I like bold,
and I like italic,
and I like to have
many lines.
Lots of lines.");
- panel5.add(warningOptionPane, BorderLayout.CENTER);
- }
- add(panel5, "cell 1 4");
-
- //---- warningShowDialogLabel ----
- warningShowDialogLabel.setOptionPane(warningOptionPane);
- warningShowDialogLabel.setTitleLabel(warningLabel);
- add(warningShowDialogLabel, "cell 2 4");
-
- //---- inputLabel ----
- inputLabel.setText("Input");
- add(inputLabel, "cell 0 5");
-
- //======== panel7 ========
- {
- panel7.setBorder(LineBorder.createGrayLineBorder());
- panel7.setLayout(new BorderLayout());
-
- //---- inputOptionPane ----
- inputOptionPane.setWantsInput(true);
- inputOptionPane.setOptionType(JOptionPane.OK_CANCEL_OPTION);
- inputOptionPane.setMessage("Enter whatever you want:");
- panel7.add(inputOptionPane, BorderLayout.CENTER);
- }
- add(panel7, "cell 1 5");
-
- //---- inputShowDialogLabel ----
- inputShowDialogLabel.setOptionPane(inputOptionPane);
- inputShowDialogLabel.setTitleLabel(inputLabel);
- add(inputShowDialogLabel, "cell 2 5");
-
- //---- inputIconLabel ----
- inputIconLabel.setText("Input + icon");
- add(inputIconLabel, "cell 0 6");
-
- //======== panel8 ========
- {
- panel8.setBorder(LineBorder.createGrayLineBorder());
- panel8.setLayout(new BorderLayout());
-
- //---- inputIconOptionPane ----
- inputIconOptionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE);
- inputIconOptionPane.setWantsInput(true);
- inputIconOptionPane.setOptionType(JOptionPane.OK_CANCEL_OPTION);
- inputIconOptionPane.setMessage("Enter something:");
- panel8.add(inputIconOptionPane, BorderLayout.CENTER);
- }
- add(panel8, "cell 1 6");
-
- //---- inputIconShowDialogLabel ----
- inputIconShowDialogLabel.setTitleLabel(inputIconLabel);
- inputIconShowDialogLabel.setOptionPane(inputIconOptionPane);
- add(inputIconShowDialogLabel, "cell 2 6");
-
- //---- customLabel ----
- customLabel.setText("Custom");
- add(customLabel, "cell 0 7");
-
- //======== panel6 ========
- {
- panel6.setBorder(LineBorder.createGrayLineBorder());
- panel6.setLayout(new BorderLayout());
-
- //---- customOptionPane ----
- customOptionPane.setIcon(UIManager.getIcon("Tree.leafIcon"));
- panel6.add(customOptionPane, BorderLayout.CENTER);
- }
- add(panel6, "cell 1 7");
-
- //---- customShowDialogLabel ----
- customShowDialogLabel.setOptionPane(customOptionPane);
- customShowDialogLabel.setTitleLabel(customLabel);
- add(customShowDialogLabel, "cell 2 7");
+ setViewportView(panel9);
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatOptionPaneTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatOptionPaneTest.jfd
index 529f099f..ff83c766 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatOptionPaneTest.jfd
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatOptionPaneTest.jfd
@@ -1,4 +1,4 @@
-JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8"
+JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -6,240 +6,244 @@ new FormModel {
auxiliary() {
"JavaCodeGenerator.defaultVariableLocal": true
}
- add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
- "$layoutConstraints": "flowy,ltr,insets dialog,hidemode 3"
- "$columnConstraints": "[][][fill]"
- "$rowConstraints": "[top][top][top][top][top][top][top][top]"
- } ) {
+ add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "this"
- add( new FormComponent( "javax.swing.JLabel" ) {
- name: "plainLabel"
- "text": "Plain"
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 0 0"
- } )
- add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
- name: "panel1"
- "border": &LineBorder0 new javax.swing.border.LineBorder( sfield java.awt.Color gray, 1, false )
- add( new FormComponent( "javax.swing.JOptionPane" ) {
- name: "plainOptionPane"
- "message": "Hello world."
- }, new FormLayoutConstraints( class java.lang.String ) {
- "value": "Center"
+ "border": new javax.swing.border.EmptyBorder( 0, 0, 0, 0 )
+ add( new FormContainer( "com.formdev.flatlaf.demo.ScrollablePanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
+ "$layoutConstraints": "flowy,ltr,insets dialog,hidemode 3"
+ "$columnConstraints": "[][][fill]"
+ "$rowConstraints": "[top][top][top][top][top][top][top][top]"
+ } ) {
+ name: "panel9"
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "plainLabel"
+ "text": "Plain"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 0"
} )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 1 0"
- } )
- add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
- name: "plainShowDialogLabel"
- "optionPane": new FormReference( "plainOptionPane" )
- "titleLabel": new FormReference( "plainLabel" )
- auxiliary() {
- "JavaCodeGenerator.variableLocal": false
- }
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 2 0"
- } )
- add( new FormComponent( "javax.swing.JLabel" ) {
- name: "errorLabel"
- "text": "Error"
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 0 1"
- } )
- add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
- name: "panel2"
- "border": #LineBorder0
- add( new FormComponent( "javax.swing.JOptionPane" ) {
- name: "errorOptionPane"
- "messageType": 0
- "optionType": 2
- "message": "Your PC ran into a problem. Buy a new one."
- }, new FormLayoutConstraints( class java.lang.String ) {
- "value": "Center"
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "panel1"
+ "border": &LineBorder0 new javax.swing.border.LineBorder( sfield java.awt.Color gray, 1, false )
+ add( new FormComponent( "javax.swing.JOptionPane" ) {
+ name: "plainOptionPane"
+ "message": "Hello world."
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 0"
} )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 1 1"
- } )
- add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
- name: "errorShowDialogLabel"
- "titleLabel": new FormReference( "errorLabel" )
- "optionPane": new FormReference( "errorOptionPane" )
- auxiliary() {
- "JavaCodeGenerator.variableLocal": false
- }
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 2 1"
- } )
- add( new FormComponent( "javax.swing.JLabel" ) {
- name: "informationLabel"
- "text": "Information"
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 0 2"
- } )
- add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
- name: "panel3"
- "border": #LineBorder0
- add( new FormComponent( "javax.swing.JOptionPane" ) {
- name: "informationOptionPane"
- "messageType": 1
- "optionType": 0
- "message": "Text with\nmultiple lines\n(use \\n to separate lines)"
- }, new FormLayoutConstraints( class java.lang.String ) {
- "value": "Center"
- } )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 1 2"
- } )
- add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
- name: "informationShowDialogLabel"
- "optionPane": new FormReference( "informationOptionPane" )
- "titleLabel": new FormReference( "informationLabel" )
- auxiliary() {
- "JavaCodeGenerator.variableLocal": false
- }
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 2 2"
- } )
- add( new FormComponent( "javax.swing.JLabel" ) {
- name: "questionLabel"
- "text": "Question"
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 0 3"
- } )
- add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
- name: "panel4"
- "border": #LineBorder0
- add( new FormComponent( "javax.swing.JOptionPane" ) {
- name: "questionOptionPane"
- "messageType": 3
- "optionType": 1
- "message": "Answer the question. What question? Don't know. Just writing useless text to make this longer than 80 characters."
- }, new FormLayoutConstraints( class java.lang.String ) {
- "value": "Center"
- } )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 1 3"
- } )
- add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
- name: "questionShowDialogLabel"
- "optionPane": new FormReference( "questionOptionPane" )
- "titleLabel": new FormReference( "questionLabel" )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 2 3"
- } )
- add( new FormComponent( "javax.swing.JLabel" ) {
- name: "warningLabel"
- "text": "Warning"
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 0 4"
- } )
- add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
- name: "panel5"
- "border": #LineBorder0
- add( new FormComponent( "javax.swing.JOptionPane" ) {
- name: "warningOptionPane"
- "messageType": 2
- "optionType": 2
- "message": "I like bold,
and I like italic,
and I like to have
many lines.
Lots of lines."
- }, new FormLayoutConstraints( class java.lang.String ) {
- "value": "Center"
- } )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 1 4"
- } )
- add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
- name: "warningShowDialogLabel"
- "optionPane": new FormReference( "warningOptionPane" )
- "titleLabel": new FormReference( "warningLabel" )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 2 4"
- } )
- add( new FormComponent( "javax.swing.JLabel" ) {
- name: "inputLabel"
- "text": "Input"
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 0 5"
- } )
- add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
- name: "panel7"
- "border": #LineBorder0
- add( new FormComponent( "javax.swing.JOptionPane" ) {
- name: "inputOptionPane"
- "wantsInput": true
- "optionType": 2
- "message": "Enter whatever you want:"
- }, new FormLayoutConstraints( class java.lang.String ) {
- "value": "Center"
- } )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 1 5"
- } )
- add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
- name: "inputShowDialogLabel"
- "optionPane": new FormReference( "inputOptionPane" )
- "titleLabel": new FormReference( "inputLabel" )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 2 5"
- } )
- add( new FormComponent( "javax.swing.JLabel" ) {
- name: "inputIconLabel"
- "text": "Input + icon"
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 0 6"
- } )
- add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
- name: "panel8"
- "border": #LineBorder0
- add( new FormComponent( "javax.swing.JOptionPane" ) {
- name: "inputIconOptionPane"
- "messageType": 1
- "wantsInput": true
- "optionType": 2
- "message": "Enter something:"
- }, new FormLayoutConstraints( class java.lang.String ) {
- "value": "Center"
- } )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 1 6"
- } )
- add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
- name: "inputIconShowDialogLabel"
- "titleLabel": new FormReference( "inputIconLabel" )
- "optionPane": new FormReference( "inputIconOptionPane" )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 2 6"
- } )
- add( new FormComponent( "javax.swing.JLabel" ) {
- name: "customLabel"
- "text": "Custom"
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 0 7"
- } )
- add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
- name: "panel6"
- "border": #LineBorder0
- add( new FormComponent( "javax.swing.JOptionPane" ) {
- name: "customOptionPane"
- "icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.leafIcon" )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
+ name: "plainShowDialogLabel"
+ "optionPane": new FormReference( "plainOptionPane" )
+ "titleLabel": new FormReference( "plainLabel" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
- }, new FormLayoutConstraints( class java.lang.String ) {
- "value": "Center"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 0"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "errorLabel"
+ "text": "Error"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 1"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "panel2"
+ "border": #LineBorder0
+ add( new FormComponent( "javax.swing.JOptionPane" ) {
+ name: "errorOptionPane"
+ "messageType": 0
+ "optionType": 2
+ "message": "Your PC ran into a problem. Buy a new one."
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 1"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
+ name: "errorShowDialogLabel"
+ "titleLabel": new FormReference( "errorLabel" )
+ "optionPane": new FormReference( "errorOptionPane" )
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 1"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "informationLabel"
+ "text": "Information"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 2"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "panel3"
+ "border": #LineBorder0
+ add( new FormComponent( "javax.swing.JOptionPane" ) {
+ name: "informationOptionPane"
+ "messageType": 1
+ "optionType": 0
+ "message": "Text with\nmultiple lines\n(use \\n to separate lines)"
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 2"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
+ name: "informationShowDialogLabel"
+ "optionPane": new FormReference( "informationOptionPane" )
+ "titleLabel": new FormReference( "informationLabel" )
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 2"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "questionLabel"
+ "text": "Question"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 3"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "panel4"
+ "border": #LineBorder0
+ add( new FormComponent( "javax.swing.JOptionPane" ) {
+ name: "questionOptionPane"
+ "messageType": 3
+ "optionType": 1
+ "message": "Answer the question. What question? Don't know. Just writing useless text to make this longer than 80 characters."
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 3"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
+ name: "questionShowDialogLabel"
+ "optionPane": new FormReference( "questionOptionPane" )
+ "titleLabel": new FormReference( "questionLabel" )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 3"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "warningLabel"
+ "text": "Warning"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 4"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "panel5"
+ "border": #LineBorder0
+ add( new FormComponent( "javax.swing.JOptionPane" ) {
+ name: "warningOptionPane"
+ "messageType": 2
+ "optionType": 2
+ "message": "I like bold,
and I like italic,
and I like to have
many lines.
Lots of lines."
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 4"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
+ name: "warningShowDialogLabel"
+ "optionPane": new FormReference( "warningOptionPane" )
+ "titleLabel": new FormReference( "warningLabel" )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 4"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "inputLabel"
+ "text": "Input"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 5"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "panel7"
+ "border": #LineBorder0
+ add( new FormComponent( "javax.swing.JOptionPane" ) {
+ name: "inputOptionPane"
+ "wantsInput": true
+ "optionType": 2
+ "message": "Enter whatever you want:"
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 5"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
+ name: "inputShowDialogLabel"
+ "optionPane": new FormReference( "inputOptionPane" )
+ "titleLabel": new FormReference( "inputLabel" )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 5"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "inputIconLabel"
+ "text": "Input + icon"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 6"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "panel8"
+ "border": #LineBorder0
+ add( new FormComponent( "javax.swing.JOptionPane" ) {
+ name: "inputIconOptionPane"
+ "messageType": 1
+ "wantsInput": true
+ "optionType": 2
+ "message": "Enter something:"
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 6"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
+ name: "inputIconShowDialogLabel"
+ "titleLabel": new FormReference( "inputIconLabel" )
+ "optionPane": new FormReference( "inputIconOptionPane" )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 6"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "customLabel"
+ "text": "Custom"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 7"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "panel6"
+ "border": #LineBorder0
+ add( new FormComponent( "javax.swing.JOptionPane" ) {
+ name: "customOptionPane"
+ "icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.leafIcon" )
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 7"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
+ name: "customShowDialogLabel"
+ "optionPane": new FormReference( "customOptionPane" )
+ "titleLabel": new FormReference( "customLabel" )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 7"
} )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 1 7"
- } )
- add( new FormComponent( "com.formdev.flatlaf.testing.FlatOptionPaneTest$ShowDialogLinkLabel" ) {
- name: "customShowDialogLabel"
- "optionPane": new FormReference( "customOptionPane" )
- "titleLabel": new FormReference( "customLabel" )
- }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 2 7"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
- "size": new java.awt.Dimension( 790, 920 )
+ "size": new java.awt.Dimension( 840, 900 )
} )
}
}
From e2618c37a215a6557925291677d822a71109a6a7 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sat, 28 Mar 2020 09:41:03 +0100
Subject: [PATCH 018/500] Testing: added "size variant" combobox to control bar
if Aqua or Nimbus LaF are active
---
.../flatlaf/testing/FlatTestFrame.java | 38 ++++++++++++++++++-
.../formdev/flatlaf/testing/FlatTestFrame.jfd | 20 ++++++++--
2 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
index 378b42f7..af6722bf 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
@@ -142,6 +142,8 @@ public class FlatTestFrame
if( scaleFactor != null )
scaleFactorComboBox.setSelectedItem( scaleFactor );
+ updateSizeVariantComboBox();
+
// register F1, F2, ... keys to switch to Light, Dark or other LaFs
registerSwitchToLookAndFeel( KeyEvent.VK_F1, FlatLightLaf.class.getName() );
registerSwitchToLookAndFeel( KeyEvent.VK_F2, FlatDarkLaf.class.getName() );
@@ -198,6 +200,9 @@ public class FlatTestFrame
// enable/disable scale factor combobox
updateScaleFactorComboBox();
+ // show/hide size variant combobox
+ updateSizeVariantComboBox();
+
// this is necessary because embedded JOptionPane's "steal" the default button
getRootPane().setDefaultButton( closeButton );
} );
@@ -401,6 +406,23 @@ public class FlatTestFrame
scaleFactorComboBox.setEnabled( !UIScale.isSystemScalingEnabled() && UIManager.getLookAndFeel() instanceof FlatLaf );
}
+ private void sizeVariantChanged() {
+ String sel = (String) sizeVariantComboBox.getSelectedItem();
+ String sizeVariant = "default".equals( sel ) ? null : sel;
+
+ updateComponentsRecur( content, (c, type) -> {
+ if( c instanceof JComponent )
+ ((JComponent)c).putClientProperty( "JComponent.sizeVariant", sizeVariant );
+ } );
+ }
+
+ private void updateSizeVariantComboBox() {
+ LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
+ boolean visible = lookAndFeel instanceof NimbusLookAndFeel ||
+ "com.apple.laf.AquaLookAndFeel".equals( lookAndFeel.getClass().getName() );
+ sizeVariantComboBox.setVisible( visible );
+ }
+
private void updateComponentsRecur( Container container, BiConsumer action ) {
for( Component c : container.getComponents() ) {
if( c instanceof JPanel || c instanceof JDesktopPane ) {
@@ -471,6 +493,7 @@ public class FlatTestFrame
explicitColorsCheckBox = new JCheckBox();
backgroundCheckBox = new JCheckBox();
opaqueTriStateCheckBox = new TriStateCheckBox();
+ sizeVariantComboBox = new JComboBox<>();
closeButton = new JButton();
themesPanel = new IJThemesPanel();
@@ -508,6 +531,7 @@ public class FlatTestFrame
"[fill]" +
"[fill]" +
"[fill]" +
+ "[fill]" +
"[grow,fill]" +
"[button,fill]",
// rows
@@ -573,9 +597,20 @@ public class FlatTestFrame
opaqueTriStateCheckBox.addActionListener(e -> opaqueChanged());
buttonBar.add(opaqueTriStateCheckBox, "cell 7 0");
+ //---- sizeVariantComboBox ----
+ sizeVariantComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
+ "mini",
+ "small",
+ "default",
+ "large"
+ }));
+ sizeVariantComboBox.setSelectedIndex(2);
+ sizeVariantComboBox.addActionListener(e -> sizeVariantChanged());
+ buttonBar.add(sizeVariantComboBox, "cell 8 0");
+
//---- closeButton ----
closeButton.setText("Close");
- buttonBar.add(closeButton, "cell 9 0");
+ buttonBar.add(closeButton, "cell 10 0");
}
dialogPane.add(buttonBar, BorderLayout.SOUTH);
dialogPane.add(themesPanel, BorderLayout.EAST);
@@ -596,6 +631,7 @@ public class FlatTestFrame
private JCheckBox explicitColorsCheckBox;
private JCheckBox backgroundCheckBox;
private TriStateCheckBox opaqueTriStateCheckBox;
+ private JComboBox sizeVariantComboBox;
private JButton closeButton;
private IJThemesPanel themesPanel;
// JFormDesigner - End of variables declaration //GEN-END:variables
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd
index f92a2a2f..3b665f35 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd
@@ -1,4 +1,4 @@
-JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8"
+JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -21,7 +21,7 @@ new FormModel {
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog"
- "$columnConstraints": "[fill][fill][fill][fill][fill][fill][fill][fill][grow,fill][button,fill]"
+ "$columnConstraints": "[fill][fill][fill][fill][fill][fill][fill][fill][fill][grow,fill][button,fill]"
"$rowSpecs": "[fill]"
} ) {
name: "buttonBar"
@@ -105,11 +105,25 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 0"
} )
+ add( new FormComponent( "javax.swing.JComboBox" ) {
+ name: "sizeVariantComboBox"
+ "model": new javax.swing.DefaultComboBoxModel {
+ selectedItem: "mini"
+ addElement( "mini" )
+ addElement( "small" )
+ addElement( "default" )
+ addElement( "large" )
+ }
+ "selectedIndex": 2
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sizeVariantChanged", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 8 0"
+ } )
add( new FormComponent( "javax.swing.JButton" ) {
name: "closeButton"
"text": "Close"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 9 0"
+ "value": "cell 10 0"
} )
}, new FormLayoutConstraints( class java.lang.String ) {
"value": "South"
From 1bebfe9cf27bff00b99b4a2a0a60a4893290acb7 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sat, 28 Mar 2020 09:41:51 +0100
Subject: [PATCH 019/500] IntelliJ Themes Demo: updated Arc, Arc Orange and
Hiberbee themes (used IJThemesUpdater)
---
.../demo/intellijthemes/Hiberbee.theme.json | 319 ++++++++----------
.../arc-theme-orange.theme.json | 3 +-
.../demo/intellijthemes/arc-theme.theme.json | 3 +-
3 files changed, 142 insertions(+), 183 deletions(-)
diff --git a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/Hiberbee.theme.json b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/Hiberbee.theme.json
index d2dafd0b..79535329 100644
--- a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/Hiberbee.theme.json
+++ b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/Hiberbee.theme.json
@@ -1,114 +1,124 @@
{
+ "name": "Hiberbee",
"author": "Vlad Volkov",
+ "dark": true,
+ "editorScheme": "/colors/Hiberbee.xml",
"colors": {
"accent": "#FFC83C",
+ "desaturatedBlue": "#1e282d",
+ "desaturatedOrange": "#8049117f",
+ "green": "#5B8021",
"greyDot15": "#d8d8d8",
+ "greyDot20": "#cccccc",
"greyDot25": "#bfbfbf",
"greyDot33": "#aaaaaa",
"greyDot50": "#7d7d7d",
+ "greyDot60": "#666666",
"greyDot65": "#5a5a5a",
"greyDot70": "#4d4d4d",
"greyDot75": "#434343",
"greyDot80": "#323232",
"greyDot85": "#252525",
- "greyDot90": "#191919",
+ "greyDot90": "#1f2021",
+ "lightBlue": "#57D1EB",
"navyDot85": "#191d21",
"navyDot90": "#1f2021",
- "lightBlue": "#90dae6",
- "green": "#5B8021",
"red": "#800040",
- "desaturatedBlue": "#1e282d",
- "desaturatedOrange": "#8049117f",
"transparentGreen": "#5B80217f",
"transparentRed": "#8000407f",
- "transparentYellow": "#8066357f",
"transparentViolet": "#9478F67f",
+ "transparentYellow": "#8066357f",
"yellow": "#806635"
},
- "dark": true,
- "editorScheme": "/Hiberbee.xml",
"icons": {
"ColorPalette": {
+ "Actions.Blue": "#57D1EB",
+ "Actions.Green": "#92D923",
"Actions.Grey": "#afafaf",
- "Actions.Red": "#ff0072",
- "Actions.Yellow": "#f7cd46",
- "Actions.Green": "#A6E22E",
- "Actions.Blue": "#307bf6",
- "Actions.GreyInline": "#afafaf",
- "Actions.GreyInline.Dark": "#7d7d7d",
- "Objects.Grey": "#c8c8c8",
- "Objects.RedStatus": "#EC5F5D",
- "Objects.Red": "#ff0072",
+ "Actions.GreyInline": "#7f7f7f",
+ "Actions.GreyInline.Dark": "#646464",
+ "Actions.Red": "#ff6188",
+ "Actions.Yellow": "#FFC83C",
+ "Objects.BlackText": "greyDot33",
+ "Objects.Blue": "#57D1EB",
+ "Objects.Green": "#92D923",
+ "Objects.GreenAndroid": "#92D923",
+ "Objects.Grey": "#7f7f7f",
"Objects.Pink": "#ffa9ca",
- "Objects.Yellow": "#f7cd46",
- "Objects.Green": "#78b756",
- "Objects.Purple": "#9478f6",
- "Objects.BlackText": "#4d4d4d",
- "Objects.Blue": "#49b0f1",
- "Objects.YellowDark": "#fd971f",
- "Objects.GreenAndroid": "#78c856"
+ "Objects.Purple": "#9380FF",
+ "Objects.Red": "#ed005c",
+ "Objects.RedStatus": "#EC5F5D",
+ "Objects.Yellow": "#FFC83C",
+ "Objects.YellowDark": "#FD971F"
}
},
- "name": "Hiberbee",
"ui": {
- "ActionButton.hoverBackground": "greyDot65",
- "ActionButton.hoverBorderColor": "greyDot50",
- "ActionButton.pressedBackground": "greyDot65",
- "Borders.ContrastBorderColor": "greyDot65",
- "ActionButton.pressedBorderColor": "lightBlue",
- "Borders.color": "greyDot65",
- "Button.arc": "5",
- "Button.background": "greyDot80",
+ "*": {
+ "arc": "3",
+ "shadow": "greyDot75",
+ "background": "greyDot80",
+ "borderColor": "greyDot70",
+ "caretForeground": "accent",
+ "color": "greyDot50",
+ "foreground": "greyDot20",
+ "hoverBackground": "greyDot70",
+ "selectedBackground": "greyDot85",
+ "selectedForeground": "greyDot15",
+ "selectedInactiveBackground": "greyDot70",
+ "selectionBackground": "navyDot85",
+ "selectionForeground": "accent",
+ "separatorColor": "greyDot75",
+ "underlineHeight": 1
+ },
+ "ActionButton": {
+ "hoverBorderColor": "greyDot50",
+ "pressedBackground": "greyDot65",
+ "pressedBorderColor": "greyDot50"
+ },
+ "Borders": {
+ "ContrastBorderColor": "greyDot65",
+ "color": "greyDot70"
+ },
"Button.default.endBackground": "greyDot80",
"Button.default.endBorderColor": "greyDot65",
- "Button.default.startBorderColor": "greyDot65",
- "Button.default.focusColor": "greyDot50",
- "Button.default.focusedBorderColor": "lightBlue",
- "Button.default.foreground": "greyDot25",
- "Button.default.shadowColor": "navyDot90",
+ "Button.default.focusColor": "greyDot80",
+ "Button.default.focusedBorderColor": "greyDot15",
+ "Button.default.foreground": "greyDot15",
"Button.default.startBackground": "greyDot80",
+ "Button.default.startBorderColor": "greyDot65",
"Button.endBackground": "greyDot80",
- "Button.startBorderColor": "greyDot65",
"Button.endBorderColor": "greyDot65",
"Button.focusedBorderColor": "accent",
- "Button.foreground": "greyDot25",
- "Button.shadowColor": "navyDot90",
- "Button.shadowWidth": "0",
"Button.startBackground": "greyDot80",
- "CheckBox.background": "greyDot80",
- "CheckBoxMenuItem.background": "greyDot80",
- "CheckBoxMenuItem.disabledBackground": "greyDot85",
- "CheckBoxMenuItem.selectionForeground": "accent",
+ "Button.startBorderColor": "greyDot65",
+ "CheckBox.disabledText": "greyDot33",
+ "CheckBox.select": "greyDot50",
+ "CheckBoxMenuItem.disabledBackground": "greyDot80",
"ComboBox.ArrowButton.disabledIconColor": "greyDot50",
"ComboBox.ArrowButton.iconColor": "accent",
"ComboBox.ArrowButton.nonEditableBackground": "greyDot70",
- "ComboBox.background": "greyDot80",
"ComboBox.modifiedItemForeground": "accent",
+ "ComboBox.disabledForeground": "greyDot70",
"ComboBox.nonEditableBackground": "greyDot75",
- "ComboPopup.border": "1,1,1,1,5a5a5a",
- "CompletionPopup.foreground": "greyDot25",
- "CompletionPopup.matchForeground": "accent",
- "CompletionPopup.selectionBackground": "navyDot85",
- "CompletionPopup.selectionInactiveBackground": "greyDot80",
- "Component.arc": "5",
- "Component.borderColor": "greyDot65",
- "Component.errorFocusColor": "red",
- "Component.focusColor": "accent",
+ "ComboPopup.border": "1,1,1,1,4d4d4d",
+ "CompletionPopup": {
+ "foreground": "greyDot20",
+ "matchForeground": "accent"
+ },
+ "Component.arc": "3",
+ "Label.foreground": "greyDot15",
+ "Component.disabledBorderColor": "greyDot70",
+ "Component.infoForeground": "greyDot50",
+ "Component.errorFocusColor": "#F65F87",
+ "Component.focusColor": "greyDot50",
"Component.focusWidth": "0",
"Component.focusedBorderColor": "greyDot50",
"Component.hoverIconColor": "accent",
- "Component.iconColor": "lightBlue",
"Component.inactiveErrorFocusColor": "transparentRed",
"Component.inactiveWarningFocusColor": "transparentYellow",
"Component.warningFocusColor": "yellow",
- "Counter.background": "greyDot80",
- "Counter.foreground": "greyDot25",
"Debugger.Variables.changedValueForeground": "accent",
"Debugger.Variables.evaluatingExpressionForeground": "lightBlue",
- "DebuggerPopup.borderColor": "greyDot65",
- "DefaultTabs.background": "greyDot80",
- "DefaultTabs.borderColor": "greyDot65",
- "DefaultTabs.hoverBackground": "navyDot85",
"DefaultTabs.underlineColor": "accent",
"DefaultTabs.underlineHeight": 1,
"DefaultTabs.underlinedTabBackground": "greyDot75",
@@ -116,14 +126,8 @@
"DragAndDrop.areaBackground": "greyDot75",
"DragAndDrop.areaForeground": "greyDot25",
"Editor.background": "greyDot90",
- "Editor.foreground": "greyDot25",
- "EditorPane.background": "greyDot80",
- "EditorPane.caretForeground": "accent",
- "EditorPane.foreground": "greyDot25",
"EditorPane.inactiveBackground": "greyDot85",
"EditorPane.inactiveForeground": "greyDot50",
- "EditorPane.selectionBackground": "navyDot85",
- "EditorPane.selectionForeground": "accent",
"EditorTabs.underlineHeight": 1,
"FileColor.Blue": "#23282d",
"FileColor.Green": "#232d28",
@@ -131,55 +135,45 @@
"FileColor.Rose": "#2d2323",
"FileColor.Violet": "#2D232D",
"FileColor.Yellow": "#2d2d23",
+ "FormattedTextField.inactiveBackground": "greyDot80",
+ "FormattedTextField.background": "greyDot75",
"GutterTooltip.infoForeground": "greyDot50",
- "InplaceRefactoringPopup.borderColor": "lightBlue",
- "Label.background": "greyDot80",
+ "Label": {
+ "foreground": "greyDot25",
+ "infoForeground": "greyDot50"
+ },
"Link.activeForeground": "lightBlue",
"Link.hoverForeground": "accent",
"Link.pressedForeground": "lightBlue",
"Link.visitedForeground": "greyDot25",
- "List.background": "greyDot80",
- "List.selectionBackground": "navyDot85",
- "List.selectionForeground": "accent",
"MemoryIndicator.allocatedBackground": "green",
"MemoryIndicator.usedBackground": "red",
"Menu.acceleratorForeground": "greyDot25",
- "Menu.acceleratorSelectionForeground": "accent",
- "Menu.background": "greyDot80",
- "Menu.borderColor": "greyDot65",
- "Menu.foreground": "greyDot25",
- "Menu.selectionForeground": "accent",
- "Menu.separatorColor": "greyDot65",
- "MenuBar.borderColor": "greyDot65",
- "MenuBar.selectionBackground": "navyDot85",
- "MenuBar.shadow": "navyDot90",
- "MenuItem.selectionForeground": "accent",
- "Notification.MoreButton.background": "greyDot85",
"Notification.MoreButton.innerBorderColor": "greyDot65",
- "Notification.ToolWindow.errorBackground": "red",
- "Notification.ToolWindow.errorBorderColor": "greyDot50",
- "Notification.ToolWindow.errorForeground": "greyDot15",
- "Notification.ToolWindow.informativeBackground": "#304000",
- "Notification.ToolWindow.informativeBorderColor": "greyDot65",
- "Notification.ToolWindow.informativeForeground": "greyDot15",
- "Notification.ToolWindow.warningBackground": "yellow",
- "Notification.ToolWindow.warningBorderColor": "greyDot65",
- "Notification.ToolWindow.warningForeground": "greyDot15",
+ "Notification.ToolWindow.errorBackground": "greyDot85",
+ "Notification.ToolWindow.errorBorderColor": "#ed005c",
+ "Notification.ToolWindow.errorForeground": "#F65F87",
+ "Notification.ToolWindow.informativeBackground": "greyDot85",
+ "Notification.ToolWindow.informativeBorderColor": "#92D923",
+ "Notification.ToolWindow.informativeForeground": "#92D923",
+ "Notification.ToolWindow.warningBackground": "greyDot85",
+ "Notification.ToolWindow.warningBorderColor": "accent",
+ "Notification.ToolWindow.warningForeground": "accent",
"Notification.background": "greyDot85",
- "Notification.errorBackground": "red",
- "Notification.errorBorderColor": "greyDot65",
- "Notification.errorForeground": "greyDot15",
- "Notification.foreground": "greyDot25",
+ "Notification.errorBackground": "greyDot85",
+ "Notification.errorBorderColor": "#ed005c",
+ "Notification.errorForeground": "#F65F87",
"OptionPane.background": "greyDot80",
- "OptionPane.foreground": "greyDot25",
+ "OptionPane.foreground": "greyDot33",
"Panel.background": "greyDot80",
- "Panel.foreground": "greyDot25",
+ "Panel.foreground": "greyDot20",
"ParameterInfo.background": "greyDot85",
- "ParameterInfo.currentOverloadBackground": "lightBlue",
- "ParameterInfo.currentParameterForeground": "accent",
"ParameterInfo.foreground": "greyDot25",
+ "ParameterInfo.currentOverloadBackground": "greyDot65",
+ "ParameterInfo.currentParameterForeground": "accent",
"ParameterInfo.infoForeground": "greyDot33",
- "ParameterInfo.lineSeparatorColor": "greyDot70",
+ "ParameterInfo.lineSeparatorColor": "greyDot75",
+ "PasswordField.background": "greyDot75",
"Plugins.Button.installBackground": "greyDot80",
"Plugins.Button.installBorderColor": "greyDot65",
"Plugins.Button.installFillBackground": "greyDot80",
@@ -187,136 +181,99 @@
"Plugins.Button.installForeground": "accent",
"Plugins.SearchField.background": "greyDot75",
"Plugins.SectionHeader.background": "greyDot75",
- "Plugins.SectionHeader.foreground": "greyDot25",
- "Plugins.Tab.hoverBackground": "navyDot85",
- "Plugins.Tab.selectedBackground": "greyDot85",
+ "Plugins.Tab.hoverBackground": "greyDot65",
"Plugins.background": "greyDot80",
"Plugins.disabledForeground": "greyDot50",
- "Plugins.lightSelectionBackground": "greyDot70",
+ "Plugins.lightSelectionBackground": "navyDot85",
"Plugins.tagBackground": "greyDot85",
- "Plugins.tagForeground": "greyDot25",
"Popup.Advertiser.background": "greyDot85",
"Popup.Advertiser.foreground": "greyDot50",
"Popup.Header.activeBackground": "greyDot75",
"Popup.Header.inactiveBackground": "greyDot85",
"Popup.paintBorder": true,
"PopupMenu.background": "greyDot80",
- "PopupMenu.foreground": "greyDot25",
- "PopupMenu.selectionBackground": "navyDot85",
- "PopupMenu.selectionForeground": "lightBlue",
"PopupMenuSeparator.stripeWidth": 1,
- "ProgressBar.failedColor": "red",
- "ProgressBar.failedEndColor": "greyDot65",
- "ProgressBar.indeterminateEndColor": "greyDot25",
+ "ProgressBar.failedColor": "#ed005c",
+ "ProgressBar.failedEndColor": "greyDot75",
"ProgressBar.indeterminateStartColor": "accent",
- "ProgressBar.passedColor": "green",
- "ProgressBar.passedEndColor": "greyDot65",
+ "ProgressBar.indeterminateEndColor": "#FD971F",
+ "ProgressBar.passedColor": "#92D923",
+ "ProgressBar.passedEndColor": "greyDot75",
"ProgressBar.progressColor": "accent",
"ProgressBar.trackColor": "greyDot75",
- "RadioButton.background": "greyDot75",
- "ScrollBar.Mac.hoverTrackColor": "greyDot75",
- "ScrollBar.Mac.trackColor": "greyDot75",
- "ScrollPane.background": "greyDot85",
- "ScrollPane.foreground": "greyDot25",
- "SearchEverywhere.Advertiser.background": "greyDot85",
- "SearchEverywhere.Advertiser.foreground": "greyDot33",
- "SearchEverywhere.Header.background": "greyDot85",
- "SearchEverywhere.List.separatorColor": "greyDot70",
- "SearchEverywhere.List.separatorForeground": "greyDot70",
+ "RadioButton.background": "greyDot80",
+ "RadioButtonMenuItem.disabledBackground": "greyDot80",
+ "ScrollPane.background": "greyDot80",
+ "SearchEverywhere.Advertiser.foreground": "greyDot50",
+ "SearchEverywhere.List.separatorForeground": "greyDot50",
+ "SearchEverywhere.SearchField.infoForeground": "greyDot33",
"SearchEverywhere.SearchField.background": "greyDot75",
- "SearchEverywhere.SearchField.borderColor": "greyDot70",
- "SearchEverywhere.SearchField.infoForeground": "greyDot50",
- "SearchEverywhere.Tab.selectedBackground": "greyDot70",
- "SearchEverywhere.Tab.selectedForeground": "accent",
+ "SearchEverywhere.Header.background": "greyDot80",
+ "SearchEverywhere.Tab.selectedBackground": "greyDot80",
"SearchMatch.endBackground": "accent",
"SearchMatch.startBackground": "accent",
- "Separator.separatorColor": "greyDot70",
"SidePanel.background": "greyDot85",
- "Slider.background": "greyDot80",
- "Slider.focus": "greyDot65",
- "SpeedSearch.background": "greyDot80",
- "SpeedSearch.borderColor": "greyDot70",
- "SpeedSearch.errorForeground": "red",
+ "SpeedSearch.errorForeground": "#F65F87",
"SpeedSearch.foreground": "accent",
- "SplitPane.background": "greyDot80",
- "SplitPane.darkShadow": "navyDot90",
"SplitPane.highlight": "accent",
- "SplitPane.shadow": "navyDot90",
- "TabbedPane.background": "greyDot80",
- "TabbedPane.contentAreaColor": "greyDot80",
- "TabbedPane.disabledUnderlineColor": "greyDot75",
+ "PopupMenu.translucentBackground": "greyDot50",
+ "TabbedPane.disabledUnderlineColor": "greyDot65",
"TabbedPane.focusColor": "greyDot65",
- "TabbedPane.foreground": "greyDot25",
- "TabbedPane.hoverColor": "navyDot85",
"TabbedPane.tabSelectionHeight": 1,
"TabbedPane.underlineColor": "accent",
- "Table.background": "greyDot80",
"Table.dropLineColor": "greyDot75",
"Table.dropLineShortColor": "greyDot70",
+ "Table.focusCellBackground": "greyDot85",
"Table.focusCellForeground": "accent",
- "Table.selectionBackground": "navyDot85",
- "Table.selectionForeground": "accent",
"Table.sortIconColor": "accent",
"Table.stripeColor": "greyDot75",
"TableHeader.background": "greyDot85",
- "TableHeader.bottomSeparatorColor": "greyDot75",
- "TableHeader.separatorColor": "greyDot70",
- "TextArea.background": "greyDot85",
+ "TableHeader.bottomSeparatorColor": "greyDot65",
+ "TextArea.background": "greyDot75",
"TextArea.caretForeground": "accent",
- "TextArea.foreground": "greyDot25",
- "TextArea.selectionBackground": "navyDot85",
+ "TextArea.inactiveBackground": "greyDot80",
"TextField.background": "greyDot75",
- "TextField.caretForeground": "accent",
- "TextField.darkShadow": "navyDot90",
"TextField.foreground": "greyDot25",
+ "TextField.caretForeground": "accent",
"TextField.highlight": "greyDot15",
- "TextField.selectionBackground": "navyDot85",
- "TextPane.background": "greyDot80",
+ "TextField.inactiveForeground": "greyDot33",
+ "TextPane.inactiveBackground": "greyDot80",
"TitlePane.background": "greyDot85",
- "ToggleButton.borderColor": "greyDot70",
- "ToggleButton.buttonColor": "greyDot75",
+ "ToggleButton.buttonColor": "greyDot65",
"ToggleButton.offBackground": "greyDot75",
"ToggleButton.offForeground": "greyDot25",
- "ToggleButton.onBackground": "greyDot50",
- "ToggleButton.onForeground": "accent",
- "ToolBar.background": "greyDot80",
- "ToolBar.borderHandleColor": "greyDot70",
- "ToolBar.darkShadow": "navyDot90",
- "ToolBar.shadow": "navyDot90",
+ "ToggleButton.onBackground": "accent",
+ "ToggleButton.onForeground": "greyDot80",
+ "ToolBar.borderHandleColor": "greyDot65",
"ToolTip.Actions.background": "greyDot80",
"ToolTip.Actions.infoForeground": "greyDot50",
"ToolTip.background": "greyDot75",
- "ToolTip.foreground": "greyDot25",
"ToolTip.infoForeground": "greyDot50",
- "ToolWindow.Button.hoverBackground": "navyDot85",
- "ToolWindow.Button.selectedBackground": "greyDot70",
- "ToolWindow.Button.selectedForeground": "accent",
+ "ToolWindow.Button.hoverBackground": "greyDot65",
+ "ToolWindow.Button.selectedBackground": "greyDot85",
+ "ToolWindow.Button.selectedForeground": "lightBlue",
"ToolWindow.Header.background": "greyDot85",
"ToolWindow.Header.inactiveBackground": "greyDot80",
- "ToolWindow.HeaderTab.hoverBackground": "navyDot85",
- "ToolWindow.HeaderTab.hoverInactiveBackground": "navyDot90",
+ "ToolWindow.HeaderTab.hoverBackground": "greyDot65",
+ "ToolWindow.HeaderTab.hoverInactiveBackground": "greyDot85",
"ToolWindow.HeaderTab.inactiveUnderlineColor": "greyDot75",
- "ToolWindow.HeaderTab.selectedInactiveBackground": "greyDot80",
"ToolWindow.HeaderTab.underlineColor": "accent",
"ToolWindow.HeaderTab.underlineHeight": 1,
+ "ToolWindow.HeaderTab.underlinedTabBackground": "greyDot90",
"ToolWindow.HeaderTab.underlinedTabInactiveBackground": "greyDot75",
"Tree.background": "greyDot85",
+ "Tree.foreground": "greyDot15",
"Tree.modifiedItemForeground": "accent",
- "Tree.paintLines": 0,
- "Tree.rowHeight": 20,
- "Tree.selectionBackground": "navyDot85",
- "Tree.selectionForeground": "accent",
- "Tree.selectionInactiveBackground": "navyDot90",
- "ValidationTooltip.errorBackground": "red",
- "ValidationTooltip.errorBorderColor": "greyDot65",
- "ValidationTooltip.warningBackground": "#805e00",
- "ValidationTooltip.warningBorderColor": "greyDot65",
+ "ValidationTooltip.errorBackground": "greyDot85",
+ "ValidationTooltip.errorBorderColor": "#ed005c",
+ "ValidationTooltip.warningBackground": "greyDot85",
+ "ValidationTooltip.warningBorderColor": "accent",
"VersionControl.FileHistory.Commit.selectedBranchBackground": "greyDot70",
"VersionControl.Log.Commit.currentBranchBackground": "greyDot85",
"VersionControl.Log.Commit.unmatchedForeground": "greyDot25",
"WelcomeScreen.Projects.selectionBackground": "navyDot85",
"WelcomeScreen.Projects.selectionInactiveBackground": "navyDot90",
"WelcomeScreen.separatorColor": "greyDot65",
- "Window.border": "0,0,0,0,5a5a5a"
+ "Window.border": "1,1,1,1,4d4d4d"
}
}
diff --git a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/arc-theme-orange.theme.json b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/arc-theme-orange.theme.json
index 46e3fa3f..505a3225 100644
--- a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/arc-theme-orange.theme.json
+++ b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/arc-theme-orange.theme.json
@@ -36,6 +36,8 @@
}
},
+ "ToolBar.background" : "#F5F5F5",
+ "Popup.Toolbar.background" : "#F5F5F5",
"Panel.background": "#F5F5F5",
"Panel.foreground" : "#5c616c",
"Window.border" : "1,1,1,1,#5c616c",
@@ -53,7 +55,6 @@
"Group.separatorColor" : "#9ba2ab",
"Tree.background" : "#ffffff",
- "Tree.rowHeight": "23",
"ProgressBar.background" : "#f57900",
"ProgressBar.foreground" : "#f57900",
diff --git a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/arc-theme.theme.json b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/arc-theme.theme.json
index 81539b35..ab963ed0 100644
--- a/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/arc-theme.theme.json
+++ b/flatlaf-demo/src/main/resources/com/formdev/flatlaf/demo/intellijthemes/arc-theme.theme.json
@@ -36,6 +36,8 @@
}
},
+ "ToolBar.background" : "#F5F5F5",
+ "Popup.Toolbar.background" : "#F5F5F5",
"Panel.background": "#F5F5F5",
"Panel.foreground" : "#5c616c",
"Window.border" : "1,1,1,1,#5c616c",
@@ -53,7 +55,6 @@
"Group.separatorColor" : "#9ba2ab",
"Tree.background" : "#ffffff",
- "Tree.rowHeight": "23",
"ProgressBar.background" : "#2679db",
"ProgressBar.foreground" : "#2679db",
From 5ed40cab1d7fb6dc02269d680a6849faa871e1e5 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 29 Mar 2020 18:02:35 +0200
Subject: [PATCH 020/500] Demo: support using own FlatLaf themes (`.properties`
files) that are located in working directory of Demo application
---
CHANGELOG.md | 3 +
.../java/com/formdev/flatlaf/FlatLaf.java | 11 +-
.../com/formdev/flatlaf/IntelliJTheme.java | 2 +-
.../com/formdev/flatlaf/UIDefaultsLoader.java | 10 +-
flatlaf-demo/DemoLaf.properties | 13 ++
.../com/formdev/flatlaf/demo/DemoPrefs.java | 32 +++--
.../demo/intellijthemes/IJThemesManager.java | 9 +-
.../demo/intellijthemes/IJThemesPanel.java | 111 +++++++++++++++---
8 files changed, 159 insertions(+), 32 deletions(-)
create mode 100644 flatlaf-demo/DemoLaf.properties
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2e9fd22f..b00180af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,9 @@ FlatLaf Change Log
on JetBrains Runtime. (issue #69)
- Tree: Fixed repainting wide selection on focus gained/lost.
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
+- Demo: Support using own FlatLaf themes (`.properties` files) that are located
+ in working directory of Demo application. Shown in the "Themes" list under
+ category "Current Directory".
## 0.28
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
index 1f11462b..632d2db1 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
@@ -34,6 +34,7 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.Properties;
import java.util.ServiceLoader;
import java.util.function.Consumer;
import java.util.logging.Level;
@@ -278,9 +279,9 @@ public abstract class FlatLaf
// load defaults from properties
List> lafClassesForDefaultsLoading = getLafClassesForDefaultsLoading();
if( lafClassesForDefaultsLoading != null )
- UIDefaultsLoader.loadDefaultsFromProperties( lafClassesForDefaultsLoading, addons, defaults );
+ UIDefaultsLoader.loadDefaultsFromProperties( lafClassesForDefaultsLoading, addons, getAdditionalDefaults(), defaults );
else
- UIDefaultsLoader.loadDefaultsFromProperties( getClass(), addons, defaults );
+ UIDefaultsLoader.loadDefaultsFromProperties( getClass(), addons, getAdditionalDefaults(), defaults );
// use Aqua MenuBarUI if Mac screen menubar is enabled
if( SystemInfo.IS_MAC && Boolean.getBoolean( "apple.laf.useScreenMenuBar" ) )
@@ -307,7 +308,11 @@ public abstract class FlatLaf
void applyAdditionalDefaults( UIDefaults defaults ) {
}
- List> getLafClassesForDefaultsLoading() {
+ protected List> getLafClassesForDefaultsLoading() {
+ return null;
+ }
+
+ protected Properties getAdditionalDefaults() {
return null;
}
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java
index c0304f4b..15779ab5 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java
@@ -518,7 +518,7 @@ public class IntelliJTheme
}
@Override
- ArrayList> getLafClassesForDefaultsLoading() {
+ protected ArrayList> getLafClassesForDefaultsLoading() {
ArrayList> lafClasses = new ArrayList<>();
lafClasses.add( FlatLaf.class );
lafClasses.add( theme.dark ? FlatDarkLaf.class : FlatLightLaf.class );
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
index cc508fe2..26a5a6b7 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
@@ -69,7 +69,7 @@ class UIDefaultsLoader
private static final String GLOBAL_PREFIX = "*.";
static void loadDefaultsFromProperties( Class> lookAndFeelClass, List addons,
- UIDefaults defaults )
+ Properties additionalDefaults, UIDefaults defaults )
{
// determine classes in class hierarchy in reverse order
ArrayList> lafClasses = new ArrayList<>();
@@ -80,11 +80,11 @@ class UIDefaultsLoader
lafClasses.add( 0, lafClass );
}
- loadDefaultsFromProperties( lafClasses, addons, defaults );
+ loadDefaultsFromProperties( lafClasses, addons, additionalDefaults, defaults );
}
static void loadDefaultsFromProperties( List> lafClasses, List addons,
- UIDefaults defaults )
+ Properties additionalDefaults, UIDefaults defaults )
{
try {
// load core properties files
@@ -115,6 +115,10 @@ class UIDefaultsLoader
addonClassLoaders.add( addonClassLoader );
}
+ // add additional defaults
+ if( additionalDefaults != null )
+ properties.putAll( additionalDefaults );
+
// collect all platform specific keys (but do not modify properties)
ArrayList platformSpecificKeys = new ArrayList<>();
for( Object key : properties.keySet() ) {
diff --git a/flatlaf-demo/DemoLaf.properties b/flatlaf-demo/DemoLaf.properties
new file mode 100644
index 00000000..6a76fcd6
--- /dev/null
+++ b/flatlaf-demo/DemoLaf.properties
@@ -0,0 +1,13 @@
+# This file demonstrates using a FlatLaf theme file in the FlatLaf Demo application.
+# Must be in the working directory of the Demo application.
+# Shown in the "Themes" list under category "Current Directory".
+#
+# Modifications to this file are automatically loaded by the FlatLaf Demo application
+# when the Demo window is activated.
+
+
+# base theme (light, dark, intellij or darcula)
+@baseTheme=light
+
+# add you theme defaults here
+@background=#ccc
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoPrefs.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoPrefs.java
index 5a0317fb..ffbfab7e 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoPrefs.java
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoPrefs.java
@@ -16,6 +16,7 @@
package com.formdev.flatlaf.demo;
+import java.io.File;
import java.io.FileInputStream;
import java.util.prefs.Preferences;
import javax.swing.UIManager;
@@ -23,6 +24,8 @@ import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.FlatLightLaf;
import com.formdev.flatlaf.IntelliJTheme;
import com.formdev.flatlaf.demo.intellijthemes.IJThemesPanel;
+import com.formdev.flatlaf.demo.intellijthemes.IJThemesPanel.PropertiesLaf;
+import com.formdev.flatlaf.util.StringUtils;
/**
* @author Karl Tauber
@@ -30,12 +33,12 @@ import com.formdev.flatlaf.demo.intellijthemes.IJThemesPanel;
public class DemoPrefs
{
public static final String KEY_LAF = "laf";
- public static final String KEY_LAF_INTELLIJ_THEME = "lafIntelliJTheme";
+ public static final String KEY_LAF_THEME = "lafTheme";
public static final String RESOURCE_PREFIX = "res:";
public static final String FILE_PREFIX = "file:";
- public static final String INTELLIJ_THEME_UI_KEY = "__FlatLaf.demo.intelliJTheme";
+ public static final String THEME_UI_KEY = "__FlatLaf.demo.theme";
private static Preferences state;
@@ -55,16 +58,27 @@ public class DemoPrefs
else {
String lafClassName = state.get( KEY_LAF, FlatLightLaf.class.getName() );
if( IntelliJTheme.ThemeLaf.class.getName().equals( lafClassName ) ) {
- String intelliJTheme = state.get( KEY_LAF_INTELLIJ_THEME, "" );
- if( intelliJTheme.startsWith( RESOURCE_PREFIX ) )
- IntelliJTheme.install( IJThemesPanel.class.getResourceAsStream( intelliJTheme.substring( RESOURCE_PREFIX.length() ) ) );
- else if( intelliJTheme.startsWith( FILE_PREFIX ) )
- FlatLaf.install( IntelliJTheme.createLaf( new FileInputStream( intelliJTheme.substring( FILE_PREFIX.length() ) ) ) );
+ String theme = state.get( KEY_LAF_THEME, "" );
+ if( theme.startsWith( RESOURCE_PREFIX ) )
+ IntelliJTheme.install( IJThemesPanel.class.getResourceAsStream( theme.substring( RESOURCE_PREFIX.length() ) ) );
+ else if( theme.startsWith( FILE_PREFIX ) )
+ FlatLaf.install( IntelliJTheme.createLaf( new FileInputStream( theme.substring( FILE_PREFIX.length() ) ) ) );
else
FlatLightLaf.install();
- if( !intelliJTheme.isEmpty() )
- UIManager.getLookAndFeelDefaults().put( INTELLIJ_THEME_UI_KEY, intelliJTheme );
+ if( !theme.isEmpty() )
+ UIManager.getLookAndFeelDefaults().put( THEME_UI_KEY, theme );
+ } else if( IJThemesPanel.PropertiesLaf.class.getName().equals( lafClassName ) ) {
+ String theme = state.get( KEY_LAF_THEME, "" );
+ if( theme.startsWith( FILE_PREFIX ) ) {
+ File themeFile = new File( theme.substring( FILE_PREFIX.length() ) );
+ String themeName = StringUtils.removeTrailing( themeFile.getName(), ".properties" );
+ FlatLaf.install( new PropertiesLaf( themeName, themeFile ) );
+ } else
+ FlatLightLaf.install();
+
+ if( !theme.isEmpty() )
+ UIManager.getLookAndFeelDefaults().put( THEME_UI_KEY, theme );
} else
UIManager.setLookAndFeel( lafClassName );
}
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesManager.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesManager.java
index 6e7969a2..22e568cd 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesManager.java
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesManager.java
@@ -68,7 +68,9 @@ class IJThemesManager
// get current working directory
File directory = new File( "" ).getAbsoluteFile();
- File[] themeFiles = directory.listFiles( (dir, name) -> name.endsWith( ".theme.json" ) );
+ File[] themeFiles = directory.listFiles( (dir, name) -> {
+ return name.endsWith( ".theme.json" ) || name.endsWith( ".properties" );
+ } );
if( themeFiles == null )
return;
@@ -77,7 +79,10 @@ class IJThemesManager
moreThemes.clear();
for( File f : themeFiles ) {
- String name = StringUtils.removeTrailing( f.getName(), ".theme.json" );
+ String fname = f.getName();
+ String name = fname.endsWith( ".properties" )
+ ? StringUtils.removeTrailing( fname, ".properties" )
+ : StringUtils.removeTrailing( fname, ".theme.json" );
moreThemes.add( new IJThemeInfo( name, null, null, null, null, null, f, null ) );
lastModifiedMap.put( f, f.lastModified() );
}
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java
index d5b5269d..43b26e42 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java
@@ -28,6 +28,7 @@ import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files;
@@ -37,6 +38,7 @@ import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
+import java.util.Properties;
import java.util.function.Predicate;
import javax.swing.*;
import javax.swing.border.CompoundBorder;
@@ -71,6 +73,7 @@ public class IJThemesPanel
private Window window;
private File lastDirectory;
+ private boolean isAdjustingThemesList;
public IJThemesPanel() {
initComponents();
@@ -134,6 +137,10 @@ public class IJThemesPanel
themes.add( new IJThemeInfo( "Flat IntelliJ", null, null, null, null, null, null, FlatIntelliJLaf.class.getName() ) );
themes.add( new IJThemeInfo( "Flat Darcula", null, null, null, null, null, null, FlatDarculaLaf.class.getName() ) );
+ // add themes from directory
+ categories.put( themes.size(), "Current Directory" );
+ themes.addAll( themesManager.moreThemes );
+
// add uncategorized bundled themes
categories.put( themes.size(), "IntelliJ Themes" );
for( IJThemeInfo ti : themesManager.bundledThemes ) {
@@ -157,10 +164,6 @@ public class IJThemesPanel
themes.add( ti );
}
- // add themes from directory
- categories.put( themes.size(), "Current Directory" );
- themes.addAll( themesManager.moreThemes );
-
// remember selection
IJThemeInfo oldSel = themesList.getSelectedValue();
@@ -193,7 +196,7 @@ public class IJThemesPanel
}
private void themesListValueChanged( ListSelectionEvent e ) {
- if( e.getValueIsAdjusting() )
+ if( e.getValueIsAdjusting() || isAdjustingThemesList )
return;
IJThemeInfo themeInfo = themesList.getSelectedValue();
@@ -223,15 +226,19 @@ public class IJThemesPanel
}
} else if( themeInfo.themeFile != null ) {
try {
- FlatLaf.install( IntelliJTheme.createLaf( new FileInputStream( themeInfo.themeFile ) ) );
- DemoPrefs.getState().put( DemoPrefs.KEY_LAF_INTELLIJ_THEME, DemoPrefs.FILE_PREFIX + themeInfo.themeFile );
+ if( themeInfo.themeFile.getName().endsWith( ".properties" ) ) {
+ FlatLaf.install( new PropertiesLaf( themeInfo.name, themeInfo.themeFile ) );
+ } else
+ FlatLaf.install( IntelliJTheme.createLaf( new FileInputStream( themeInfo.themeFile ) ) );
+
+ DemoPrefs.getState().put( DemoPrefs.KEY_LAF_THEME, DemoPrefs.FILE_PREFIX + themeInfo.themeFile );
} catch( Exception ex ) {
ex.printStackTrace();
showInformationDialog( "Failed to load '" + themeInfo.themeFile + "'.", ex );
}
} else {
IntelliJTheme.install( getClass().getResourceAsStream( themeInfo.resourceName ) );
- DemoPrefs.getState().put( DemoPrefs.KEY_LAF_INTELLIJ_THEME, DemoPrefs.RESOURCE_PREFIX + themeInfo.resourceName );
+ DemoPrefs.getState().put( DemoPrefs.KEY_LAF_THEME, DemoPrefs.RESOURCE_PREFIX + themeInfo.resourceName );
}
// update all components
@@ -331,17 +338,17 @@ public class IJThemesPanel
private void selectedCurrentLookAndFeel() {
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
- String intelliJTheme = UIManager.getLookAndFeelDefaults().getString( DemoPrefs.INTELLIJ_THEME_UI_KEY );
+ String theme = UIManager.getLookAndFeelDefaults().getString( DemoPrefs.THEME_UI_KEY );
- if( intelliJTheme == null && lookAndFeel instanceof IntelliJTheme.ThemeLaf )
+ if( theme == null && (lookAndFeel instanceof IntelliJTheme.ThemeLaf || lookAndFeel instanceof PropertiesLaf) )
return;
Predicate test;
- if( intelliJTheme != null && intelliJTheme.startsWith( DemoPrefs.RESOURCE_PREFIX ) ) {
- String resourceName = intelliJTheme.substring( DemoPrefs.RESOURCE_PREFIX.length() );
+ if( theme != null && theme.startsWith( DemoPrefs.RESOURCE_PREFIX ) ) {
+ String resourceName = theme.substring( DemoPrefs.RESOURCE_PREFIX.length() );
test = ti -> Objects.equals( ti.resourceName, resourceName );
- } else if( intelliJTheme != null && intelliJTheme.startsWith( DemoPrefs.FILE_PREFIX ) ) {
- File themeFile = new File( intelliJTheme.substring( DemoPrefs.FILE_PREFIX.length() ) );
+ } else if( theme != null && theme.startsWith( DemoPrefs.FILE_PREFIX ) ) {
+ File themeFile = new File( theme.substring( DemoPrefs.FILE_PREFIX.length() ) );
test = ti -> Objects.equals( ti.themeFile, themeFile );
} else {
String lafClassName = lookAndFeel.getClass().getName();
@@ -356,11 +363,13 @@ public class IJThemesPanel
}
}
+ isAdjustingThemesList = true;
if( newSel >= 0 ) {
if( newSel != themesList.getSelectedIndex() )
themesList.setSelectedIndex( newSel );
} else
themesList.clearSelection();
+ isAdjustingThemesList = false;
}
private void initComponents() {
@@ -420,4 +429,78 @@ public class IJThemesPanel
private JScrollPane themesScrollPane;
private JList themesList;
// JFormDesigner - End of variables declaration //GEN-END:variables
+
+ //---- class PropertiesLaf ------------------------------------------------
+
+ public static class PropertiesLaf
+ extends FlatLaf
+ {
+ private final String name;
+ private final String baseTheme;
+ private final boolean dark;
+ private final Properties properties;
+
+ public PropertiesLaf( String name, File propertiesFile )
+ throws IOException
+ {
+ this.name = name;
+
+ properties = new Properties();
+ try( InputStream in = new FileInputStream( propertiesFile ) ) {
+ if( in != null )
+ properties.load( in );
+ }
+
+ baseTheme = properties.getProperty( "@baseTheme", "light" );
+ dark = "dark".equalsIgnoreCase( baseTheme ) || "darcula".equalsIgnoreCase( baseTheme );
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String getDescription() {
+ return name;
+ }
+
+ @Override
+ public boolean isDark() {
+ return dark;
+ }
+
+ @Override
+ protected ArrayList> getLafClassesForDefaultsLoading() {
+ ArrayList> lafClasses = new ArrayList<>();
+ lafClasses.add( FlatLaf.class );
+ switch( baseTheme.toLowerCase() ) {
+ default:
+ case "light":
+ lafClasses.add( FlatLightLaf.class );
+ break;
+
+ case "dark":
+ lafClasses.add( FlatDarkLaf.class );
+ break;
+
+ case "intellij":
+ lafClasses.add( FlatLightLaf.class );
+ lafClasses.add( FlatIntelliJLaf.class );
+ break;
+
+ case "darcula":
+ lafClasses.add( FlatDarkLaf.class );
+ lafClasses.add( FlatDarculaLaf.class );
+ break;
+ }
+ lafClasses.add( PropertiesLaf.class );
+ return lafClasses;
+ }
+
+ @Override
+ protected Properties getAdditionalDefaults() {
+ return properties;
+ }
+ }
}
From 60c6c5b37a16f2fde4d99e22c7bbe4949c92bf50 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 29 Mar 2020 23:30:04 +0200
Subject: [PATCH 021/500] FlatLineBorder: support specifying painted line
thickness
---
.../java/com/formdev/flatlaf/UIDefaultsLoader.java | 7 ++++---
.../com/formdev/flatlaf/ui/FlatLineBorder.java | 14 ++++++++++----
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
index 26a5a6b7..da3557d5 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java
@@ -332,16 +332,17 @@ class UIDefaultsLoader
private static Object parseBorder( String value, Function resolver, List addonClassLoaders ) {
if( value.indexOf( ',' ) >= 0 ) {
- // top,left,bottom,right[,lineColor]
+ // top,left,bottom,right[,lineColor[,lineThickness]]
List parts = split( value, ',' );
Insets insets = parseInsets( value );
- ColorUIResource lineColor = (parts.size() == 5)
+ ColorUIResource lineColor = (parts.size() >= 5)
? (ColorUIResource) parseColorOrFunction( resolver.apply( parts.get( 4 ) ), resolver, true )
: null;
+ float lineThickness = (parts.size() >= 6) ? parseFloat( parts.get( 5 ), true ) : 1f;
return (LazyValue) t -> {
return (lineColor != null)
- ? new FlatLineBorder( insets, lineColor )
+ ? new FlatLineBorder( insets, lineColor, lineThickness )
: new FlatEmptyBorder( insets );
};
} else
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLineBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLineBorder.java
index 355bf01d..5af4c531 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLineBorder.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLineBorder.java
@@ -26,9 +26,9 @@ import java.awt.Insets;
/**
* Line border for various components.
*
- * Paints a scaled 1px thick line around the component.
- * The line thickness is not included in the border insets.
- * The insets should be at least 1,1,1,1.
+ * Paints a scaled (usually 1px thick) line around the component.
+ * The line thickness is not added to the border insets.
+ * The insets should be at least have line thickness (usually 1,1,1,1).
*
* @author Karl Tauber
*/
@@ -36,10 +36,16 @@ public class FlatLineBorder
extends FlatEmptyBorder
{
private final Color lineColor;
+ private final float lineThickness;
public FlatLineBorder( Insets insets, Color lineColor ) {
+ this( insets, lineColor, 1f );
+ }
+
+ public FlatLineBorder( Insets insets, Color lineColor, float lineThickness ) {
super( insets );
this.lineColor = lineColor;
+ this.lineThickness = lineThickness;
}
@Override
@@ -48,7 +54,7 @@ public class FlatLineBorder
try {
FlatUIUtils.setRenderingHints( g2 );
g2.setColor( lineColor );
- FlatUIUtils.paintComponentBorder( g2, x, y, width, height, 0f, scale( 1f ), 0f );
+ FlatUIUtils.paintComponentBorder( g2, x, y, width, height, 0f, scale( lineThickness ), 0f );
} finally {
g2.dispose();
}
From af89dd13c12f5a0ec8c33dedeff4797b8e42a7ad Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Tue, 31 Mar 2020 12:15:51 +0200
Subject: [PATCH 022/500] support changing default font used for all components
with automatic scaling UI if using larger font
---
CHANGELOG.md | 2 +
.../java/com/formdev/flatlaf/FlatLaf.java | 52 ++++++++++-
.../com/formdev/flatlaf/util/UIScale.java | 79 ++++++++++------
.../com/formdev/flatlaf/demo/ControlBar.java | 5 +
.../com/formdev/flatlaf/demo/DemoFrame.java | 93 ++++++++++++++++++-
.../com/formdev/flatlaf/demo/DemoFrame.jfd | 27 +++++-
.../flatlaf/testing/FlatTestFrame.java | 7 +-
.../testing/uidefaults/UIDefaultsDump.java | 11 ++-
.../uidefaults/FlatDarkLaf_1.8.0_202-mac.txt | 79 ++++++++--------
.../uidefaults/FlatDarkLaf_1.8.0_202.txt | 79 ++++++++--------
.../uidefaults/FlatLightLaf_1.8.0_202-mac.txt | 79 ++++++++--------
.../uidefaults/FlatLightLaf_1.8.0_202.txt | 79 ++++++++--------
12 files changed, 400 insertions(+), 192 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b00180af..6c2c165a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@ FlatLaf Change Log
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
on JetBrains Runtime. (issue #69)
- Tree: Fixed repainting wide selection on focus gained/lost.
+- Support changing default font used for all components with automatic scaling
+ UI if using larger font. Use `UIManager.put( "defaultFont", myFont );`
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
- Demo: Support using own FlatLaf themes (`.properties` files) that are located
in working directory of Demo application. Shown in the "Themes" list under
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
index 632d2db1..c8865a15 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
@@ -49,8 +49,10 @@ import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.UIDefaults.ActiveValue;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
+import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicLookAndFeel;
import javax.swing.text.html.HTMLEditorKit;
import com.formdev.flatlaf.util.SystemInfo;
@@ -345,14 +347,22 @@ public abstract class FlatLaf
uiFont = UIScale.applyCustomScaleFactor( uiFont );
+ // use active value for all fonts to allow changing fonts in all components
+ // (similar as in Nimbus L&F) with:
+ // UIManager.put( "defaultFont", myFont );
+ Object activeFont = new ActiveFont( 1 );
+
// override fonts
for( Object key : defaults.keySet() ) {
if( key instanceof String && (((String)key).endsWith( ".font" ) || ((String)key).endsWith( "Font" )) )
- defaults.put( key, uiFont );
+ defaults.put( key, activeFont );
}
// use smaller font for progress bar
- defaults.put( "ProgressBar.font", UIScale.scaleFont( uiFont, 0.85f ) );
+ defaults.put( "ProgressBar.font", new ActiveFont( 0.85f ) );
+
+ // set default font
+ defaults.put( "defaultFont", uiFont );
}
/**
@@ -562,4 +572,42 @@ public abstract class FlatLaf
return false;
}
+
+ //---- class ActiveFont ---------------------------------------------------
+
+ private static class ActiveFont
+ implements ActiveValue
+ {
+ private final float scaleFactor;
+
+ // cache (scaled) font
+ private Font font;
+ private Font lastDefaultFont;
+
+ ActiveFont( float scaleFactor ) {
+ this.scaleFactor = scaleFactor;
+ }
+
+ @Override
+ public Object createValue( UIDefaults table ) {
+ Font defaultFont = UIManager.getFont( "defaultFont" );
+
+ if( lastDefaultFont != defaultFont ) {
+ lastDefaultFont = defaultFont;
+
+ if( scaleFactor != 1 ) {
+ // scale font
+ int newFontSize = Math.round( defaultFont.getSize() * scaleFactor );
+ font = new FontUIResource( defaultFont.deriveFont( (float) newFontSize ) );
+ } else {
+ // make sure that font is a UIResource for LaF switching
+ font = (defaultFont instanceof UIResource)
+ ? defaultFont
+ : new FontUIResource( defaultFont );
+ }
+ }
+
+ return font;
+ }
+ }
}
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
index 8f89cad4..8ae5250d 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
@@ -24,6 +24,7 @@ import java.awt.GraphicsEnvironment;
import java.awt.Insets;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
import java.lang.reflect.Method;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
@@ -48,12 +49,15 @@ import javax.swing.plaf.UIResource;
*
* 2) user scaling mode
*
- * This mode is mainly for Java 8 compatibility, but is also used on Linux.
+ * This mode is mainly for Java 8 compatibility, but is also used on Linux
+ * or if the default font is changed.
* The user scale factor is computed based on the used font.
* The JRE does not scale anything.
* So we have to invoke {@link #scale(float)} where necessary.
* There is only one user scale factor for all displays.
- * The user scale factor may change if the active LaF or "Label.font" has changed.
+ * The user scale factor may change if the active LaF, "defaultFont" or "Label.font" has changed.
+ * If system scaling mode is available the user scale factor is usually 1,
+ * but may be larger on Linux or if the default font is changed.
*
* @author Karl Tauber
*/
@@ -61,6 +65,20 @@ public class UIScale
{
private static final boolean DEBUG = false;
+ private static PropertyChangeSupport changeSupport;
+
+ public static void addPropertyChangeListener( PropertyChangeListener listener ) {
+ if( changeSupport == null )
+ changeSupport = new PropertyChangeSupport( UIScale.class );
+ changeSupport.addPropertyChangeListener( listener );
+ }
+
+ public static void removePropertyChangeListener( PropertyChangeListener listener ) {
+ if( changeSupport == null )
+ return;
+ changeSupport.removePropertyChangeListener( listener );
+ }
+
//---- system scaling (Java 9) --------------------------------------------
private static Boolean jreHiDPI;
@@ -110,27 +128,33 @@ public class UIScale
return;
initialized = true;
- if( isUserScalingEnabled() ) {
- // listener to update scale factor if LaF changed or if Label.font changed
- // (e.g. option "Override default fonts" in IntelliJ IDEA)
- PropertyChangeListener listener = new PropertyChangeListener() {
- @Override
- public void propertyChange( PropertyChangeEvent e ) {
- String propName = e.getPropertyName();
- if( "lookAndFeel".equals( propName ) ) {
+ if( !isUserScalingEnabled() )
+ return;
+
+ // listener to update scale factor if LaF changed, "defaultFont" or "Label.font" changed
+ PropertyChangeListener listener = new PropertyChangeListener() {
+ @Override
+ public void propertyChange( PropertyChangeEvent e ) {
+ switch( e.getPropertyName() ) {
+ case "lookAndFeel":
// it is not necessary (and possible) to remove listener of old LaF defaults
if( e.getNewValue() instanceof LookAndFeel )
UIManager.getLookAndFeelDefaults().addPropertyChangeListener( this );
updateScaleFactor();
- } else if( "Label.font".equals( propName ) )
- updateScaleFactor();
- }
- };
- UIManager.addPropertyChangeListener( listener );
- UIManager.getLookAndFeelDefaults().addPropertyChangeListener( listener );
+ break;
- updateScaleFactor();
- }
+ case "defaultFont":
+ case "Label.font":
+ updateScaleFactor();
+ break;
+ }
+ }
+ };
+ UIManager.addPropertyChangeListener( listener );
+ UIManager.getDefaults().addPropertyChangeListener( listener );
+ UIManager.getLookAndFeelDefaults().addPropertyChangeListener( listener );
+
+ updateScaleFactor();
}
private static void updateScaleFactor() {
@@ -141,7 +165,9 @@ public class UIScale
// because even if we are on a HiDPI display it is not sure
// that a larger font size is set by the current LaF
// (e.g. can avoid large icons with small text)
- Font font = UIManager.getFont( "Label.font" );
+ Font font = UIManager.getFont( "defaultFont" );
+ if( font == null )
+ font = UIManager.getFont( "Label.font" );
setUserScaleFactor( computeScaleFactor( font ) );
}
@@ -168,9 +194,6 @@ public class UIScale
}
private static boolean isUserScalingEnabled() {
- if( isSystemScalingEnabled() && !SystemInfo.IS_LINUX )
- return false; // disable user scaling if JRE scales
-
// same as in IntelliJ IDEA
String hidpi = System.getProperty( "hidpi" );
return (hidpi != null) ? Boolean.parseBoolean( hidpi ) : true;
@@ -197,14 +220,6 @@ public class UIScale
return new FontUIResource( font.deriveFont( (float) newFontSize ) );
}
- /**
- * Scales the given font.
- */
- public static FontUIResource scaleFont( FontUIResource font, float scaleFactor ) {
- int newFontSize = Math.round( font.getSize() * scaleFactor );
- return new FontUIResource( font.deriveFont( (float) newFontSize ) );
- }
-
/**
* Similar to sun.java2d.SunGraphicsEnvironment.getScaleFactor(String)
*/
@@ -242,10 +257,14 @@ public class UIScale
else // round scale factor to 1/4
scaleFactor = Math.round( scaleFactor * 4f ) / 4f;
+ float oldScaleFactor = UIScale.scaleFactor;
UIScale.scaleFactor = scaleFactor;
if( DEBUG )
System.out.println( "HiDPI scale factor " + scaleFactor );
+
+ if( changeSupport != null )
+ changeSupport.firePropertyChange( "userScaleFactor", oldScaleFactor, scaleFactor );
}
public static float scale( float value ) {
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/ControlBar.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/ControlBar.java
index f899266e..a698bccc 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/ControlBar.java
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/ControlBar.java
@@ -83,6 +83,11 @@ class ControlBar
} );
}
} );
+
+ UIScale.addPropertyChangeListener( e -> {
+ // update info label because user scale factor may change
+ updateInfoLabel();
+ } );
}
void initialize( JFrame frame, JTabbedPane tabbedPane ) {
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java
index 3b365b21..e204a15f 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java
@@ -20,6 +20,7 @@ import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.DefaultEditorKit;
+import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.demo.intellijthemes.*;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import net.miginfocom.swing.*;
@@ -52,12 +53,53 @@ class DemoFrame
DemoPrefs.getState().putInt( FlatLafDemo.KEY_TAB, tabbedPane.getSelectedIndex() );
}
- private void menuItemActionPerformed(ActionEvent e) {
+ private void menuItemActionPerformed( ActionEvent e ) {
SwingUtilities.invokeLater( () -> {
JOptionPane.showMessageDialog( this, e.getActionCommand(), "Menu Item", JOptionPane.PLAIN_MESSAGE );
} );
}
+ private void fontFamilyChanged( ActionEvent e ) {
+ String fontFamily = e.getActionCommand();
+
+ Font font = UIManager.getFont( "defaultFont" );
+ Font newFont = new Font( fontFamily, font.getStyle(), font.getSize() );
+ UIManager.put( "defaultFont", newFont );
+
+ FlatLaf.updateUI();
+ }
+
+ private void fontSizeChanged( ActionEvent e ) {
+ String fontSizeStr = e.getActionCommand();
+
+ Font font = UIManager.getFont( "defaultFont" );
+ Font newFont = font.deriveFont( (float) Integer.parseInt( fontSizeStr ) );
+ UIManager.put( "defaultFont", newFont );
+
+ FlatLaf.updateUI();
+ }
+
+ private void restoreFont() {
+ UIManager.put( "defaultFont", null );
+ FlatLaf.updateUI();
+ }
+
+ private void incrFont() {
+ Font font = UIManager.getFont( "defaultFont" );
+ Font newFont = font.deriveFont( (float) (font.getSize() + 1) );
+ UIManager.put( "defaultFont", newFont );
+
+ FlatLaf.updateUI();
+ }
+
+ private void decrFont() {
+ Font font = UIManager.getFont( "defaultFont" );
+ Font newFont = font.deriveFont( (float) Math.max( font.getSize() - 1, 8 ) );
+ UIManager.put( "defaultFont", newFont );
+
+ FlatLaf.updateUI();
+ }
+
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
JMenuBar menuBar1 = new JMenuBar();
@@ -86,6 +128,10 @@ class DemoFrame
JRadioButtonMenuItem radioButtonMenuItem1 = new JRadioButtonMenuItem();
JRadioButtonMenuItem radioButtonMenuItem2 = new JRadioButtonMenuItem();
JRadioButtonMenuItem radioButtonMenuItem3 = new JRadioButtonMenuItem();
+ fontMenu = new JMenu();
+ JMenuItem restoreFontMenuItem = new JMenuItem();
+ JMenuItem incrFontMenuItem = new JMenuItem();
+ JMenuItem decrFontMenuItem = new JMenuItem();
JMenu helpMenu = new JMenu();
JMenuItem aboutMenuItem = new JMenuItem();
JToolBar toolBar1 = new JToolBar();
@@ -285,6 +331,30 @@ class DemoFrame
}
menuBar1.add(viewMenu);
+ //======== fontMenu ========
+ {
+ fontMenu.setText("Font");
+
+ //---- restoreFontMenuItem ----
+ restoreFontMenuItem.setText("Restore Font");
+ restoreFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_0, KeyEvent.CTRL_MASK));
+ restoreFontMenuItem.addActionListener(e -> restoreFont());
+ fontMenu.add(restoreFontMenuItem);
+
+ //---- incrFontMenuItem ----
+ incrFontMenuItem.setText("Increase Font Size");
+ incrFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, KeyEvent.CTRL_MASK));
+ incrFontMenuItem.addActionListener(e -> incrFont());
+ fontMenu.add(incrFontMenuItem);
+
+ //---- decrFontMenuItem ----
+ decrFontMenuItem.setText("Decrease Font Size");
+ decrFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, KeyEvent.CTRL_MASK));
+ decrFontMenuItem.addActionListener(e -> decrFont());
+ fontMenu.add(decrFontMenuItem);
+ }
+ menuBar1.add(fontMenu);
+
//======== helpMenu ========
{
helpMenu.setText("Help");
@@ -387,9 +457,30 @@ class DemoFrame
cutMenuItem.addActionListener( new DefaultEditorKit.CutAction() );
copyMenuItem.addActionListener( new DefaultEditorKit.CopyAction() );
pasteMenuItem.addActionListener( new DefaultEditorKit.PasteAction() );
+
+ // add font families
+ fontMenu.addSeparator();
+ String[] fontFamilies = { "Arial", "Comic Sans MS", "Courier New", "Dialog",
+ "Monospaced", "SansSerif", "Serif", "Tahoma", "Verdana" };
+ for( String fontFamily : fontFamilies ) {
+ JMenuItem fontItem = new JMenuItem( fontFamily );
+ fontItem.addActionListener( this::fontFamilyChanged );
+ fontMenu.add( fontItem );
+ }
+
+ // add font sizes
+ fontMenu.addSeparator();
+ int[] fontSizes = { 8, 10, 12, 14, 16, 18, 20, 24, 28 };
+ for( int fontSize : fontSizes ) {
+ String fontSizeStr = Integer.toString( fontSize );
+ JMenuItem fontItem = new JMenuItem( fontSizeStr );
+ fontItem.addActionListener( this::fontSizeChanged );
+ fontMenu.add( fontItem );
+ }
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
+ private JMenu fontMenu;
private JTabbedPane tabbedPane;
private ControlBar controlBar;
// JFormDesigner - End of variables declaration //GEN-END:variables
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.jfd b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.jfd
index 179c618a..12717383 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.jfd
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.jfd
@@ -1,4 +1,4 @@
-JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8"
+JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -285,6 +285,31 @@ new FormModel {
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemActionPerformed", true ) )
} )
} )
+ add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
+ name: "fontMenu"
+ "text": "Font"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ add( new FormComponent( "javax.swing.JMenuItem" ) {
+ name: "restoreFontMenuItem"
+ "text": "Restore Font"
+ "accelerator": static javax.swing.KeyStroke getKeyStroke( 48, 130, false )
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "restoreFont", false ) )
+ } )
+ add( new FormComponent( "javax.swing.JMenuItem" ) {
+ name: "incrFontMenuItem"
+ "text": "Increase Font Size"
+ "accelerator": static javax.swing.KeyStroke getKeyStroke( 521, 130, false )
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "incrFont", false ) )
+ } )
+ add( new FormComponent( "javax.swing.JMenuItem" ) {
+ name: "decrFontMenuItem"
+ "text": "Decrease Font Size"
+ "accelerator": static javax.swing.KeyStroke getKeyStroke( 45, 130, false )
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "decrFont", false ) )
+ } )
+ } )
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
name: "helpMenu"
"text": "Help"
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
index af6722bf..ab9f1051 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java
@@ -208,6 +208,11 @@ public class FlatTestFrame
} );
}
} );
+
+ UIScale.addPropertyChangeListener( e -> {
+ // update title because user scale factor may change
+ updateTitle();
+ } );
}
private void updateTitle() {
@@ -403,7 +408,7 @@ public class FlatTestFrame
}
private void updateScaleFactorComboBox() {
- scaleFactorComboBox.setEnabled( !UIScale.isSystemScalingEnabled() && UIManager.getLookAndFeel() instanceof FlatLaf );
+ scaleFactorComboBox.setEnabled( UIManager.getLookAndFeel() instanceof FlatLaf );
}
private void sizeVariantChanged() {
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java
index 30c96d2a..a21faf64 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java
@@ -368,7 +368,16 @@ public class UIDefaultsDump
private void dumpActiveValue( PrintWriter out, ActiveValue value ) {
out.print( "[active] " );
- dumpValue( out, value.createValue( defaults ) );
+ Object realValue = value.createValue( defaults );
+
+ if( realValue instanceof Font && realValue == UIManager.getFont( "defaultFont" ) ) {
+ // dump "$defaultFont" for the default font to make it easier to
+ // compare Windows/Linux dumps with macOS dumps
+ out.print( "$defaultFont" );
+ if( realValue instanceof UIResource )
+ out.print( " [UI]" );
+ } else
+ dumpValue( out, realValue );
}
private String dumpClass( Object value ) {
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
index 76bfc81c..3264077f 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202-mac.txt
@@ -80,7 +80,7 @@ Button.defaultButtonFollowsFocus false
Button.disabledBorderColor #5e6060 javax.swing.plaf.ColorUIResource [UI]
Button.disabledText #777777 javax.swing.plaf.ColorUIResource [UI]
Button.focusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
-Button.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Button.font [active] $defaultFont [UI]
Button.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Button.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
Button.hoverBackground #ff0000 com.formdev.flatlaf.util.DerivedColor [UI]
@@ -112,7 +112,7 @@ CheckBox.arc 4
CheckBox.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
CheckBox.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
CheckBox.disabledText #777777 javax.swing.plaf.ColorUIResource [UI]
-CheckBox.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+CheckBox.font [active] $defaultFont [UI]
CheckBox.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.background #43494a javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.borderColor #6b6b6b javax.swing.plaf.ColorUIResource [UI]
@@ -137,7 +137,7 @@ CheckBox.textShiftOffset 0
#---- CheckBoxMenuItem ----
-CheckBoxMenuItem.acceleratorFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+CheckBoxMenuItem.acceleratorFont [active] $defaultFont [UI]
CheckBoxMenuItem.acceleratorForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.acceleratorSelectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -146,7 +146,7 @@ CheckBoxMenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
CheckBoxMenuItem.borderPainted true
CheckBoxMenuItem.checkIcon [lazy] 15,15 com.formdev.flatlaf.icons.FlatCheckBoxMenuItemIcon [UI]
CheckBoxMenuItem.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-CheckBoxMenuItem.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+CheckBoxMenuItem.font [active] $defaultFont [UI]
CheckBoxMenuItem.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
CheckBoxMenuItem.opaque false
@@ -163,7 +163,7 @@ CheckBoxUI com.formdev.flatlaf.ui.FlatCheckBoxUI
#---- ColorChooser ----
ColorChooser.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-ColorChooser.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ColorChooser.font [active] $defaultFont [UI]
ColorChooser.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesDefaultRecentColor #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesRecentSwatchSize [active] 16,16 javax.swing.plaf.DimensionUIResource [UI]
@@ -185,7 +185,7 @@ ComboBox.buttonHoverArrowColor #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonShadow #646464 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-ComboBox.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ComboBox.font [active] $defaultFont [UI]
ComboBox.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ComboBox.isEnterSelectablePopup false
ComboBox.noActionOnKeyNavigation false
@@ -246,7 +246,7 @@ EditorPane.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
EditorPane.caretBlinkRate 500
EditorPane.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
EditorPane.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-EditorPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+EditorPane.font [active] $defaultFont [UI]
EditorPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -285,7 +285,7 @@ FormattedTextField.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
FormattedTextField.caretBlinkRate 500
FormattedTextField.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-FormattedTextField.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+FormattedTextField.font [active] $defaultFont [UI]
FormattedTextField.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -352,7 +352,7 @@ InternalFrame.inactiveTitleBackground #303234 javax.swing.plaf.ColorUIResourc
InternalFrame.inactiveTitleForeground #777777 javax.swing.plaf.ColorUIResource [UI]
InternalFrame.maximizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon [UI]
InternalFrame.minimizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMinimizeIcon [UI]
-InternalFrame.titleFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+InternalFrame.titleFont [active] $defaultFont [UI]
#---- InternalFrameTitlePane ----
@@ -429,7 +429,7 @@ JideTabbedPaneUI com.formdev.flatlaf.jideoss.ui.FlatJideTabbedPane
Label.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
Label.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
Label.disabledShadow #646464 javax.swing.plaf.ColorUIResource [UI]
-Label.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Label.font [active] $defaultFont [UI]
Label.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
LabelUI com.formdev.flatlaf.ui.FlatLabelUI
@@ -447,7 +447,7 @@ List.dropCellForeground [lazy] #bbbbbb javax.swing.plaf.ColorUIResourc
List.dropLineColor [lazy] #6d8ac0 javax.swing.plaf.ColorUIResource [UI]
List.focusCellHighlightBorder [lazy] 1,6,1,6 false com.formdev.flatlaf.ui.FlatListCellBorder$Focused [UI]
List.focusSelectedCellHighlightBorder [lazy] 1,6,1,6 false com.formdev.flatlaf.ui.FlatListCellBorder$Selected [UI]
-List.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+List.font [active] $defaultFont [UI]
List.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
List.noFocusBorder 1,1,1,1 false javax.swing.plaf.BorderUIResource$EmptyBorderUIResource [UI]
List.selectionBackground #4b6eaf javax.swing.plaf.ColorUIResource [UI]
@@ -460,7 +460,7 @@ ListUI com.formdev.flatlaf.ui.FlatListUI
#---- Menu ----
-Menu.acceleratorFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Menu.acceleratorFont [active] $defaultFont [UI]
Menu.acceleratorForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Menu.acceleratorSelectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Menu.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuArrowIcon [UI]
@@ -470,7 +470,7 @@ Menu.borderPainted true
Menu.cancelMode hideLastSubmenu
Menu.crossMenuMnemonic true
Menu.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-Menu.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Menu.font [active] $defaultFont [UI]
Menu.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Menu.icon.arrowColor #a7a7a7 javax.swing.plaf.ColorUIResource [UI]
Menu.icon.disabledArrowColor #606060 javax.swing.plaf.ColorUIResource [UI]
@@ -492,7 +492,7 @@ Menu.submenuPopupOffsetY [active] -4
MenuBar.background #303234 javax.swing.plaf.ColorUIResource [UI]
MenuBar.border [lazy] 0,0,1,0 false com.formdev.flatlaf.ui.FlatMenuBarBorder [UI]
MenuBar.borderColor #515151 javax.swing.plaf.ColorUIResource [UI]
-MenuBar.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+MenuBar.font [active] $defaultFont [UI]
MenuBar.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
MenuBar.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
MenuBar.hoverBackground #484c4f javax.swing.plaf.ColorUIResource [UI]
@@ -507,7 +507,7 @@ MenuBarUI com.formdev.flatlaf.ui.FlatMenuBarUI
#---- MenuItem ----
MenuItem.acceleratorDelimiter
-MenuItem.acceleratorFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+MenuItem.acceleratorFont [active] $defaultFont [UI]
MenuItem.acceleratorForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
MenuItem.acceleratorSelectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
MenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -515,7 +515,7 @@ MenuItem.background #303234 javax.swing.plaf.ColorUIResource [UI]
MenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMenuItemBorder [UI]
MenuItem.borderPainted true
MenuItem.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-MenuItem.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+MenuItem.font [active] $defaultFont [UI]
MenuItem.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
MenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
MenuItem.opaque false
@@ -569,7 +569,7 @@ OptionPane.buttonMinimumWidth [active] 72
OptionPane.buttonOrientation 4
OptionPane.buttonPadding 8
OptionPane.errorIcon [lazy] 32,32 com.formdev.flatlaf.icons.FlatOptionPaneErrorIcon [UI]
-OptionPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+OptionPane.font [active] $defaultFont [UI]
OptionPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
OptionPane.iconMessageGap 16
OptionPane.informationIcon [lazy] 32,32 com.formdev.flatlaf.icons.FlatOptionPaneInformationIcon [UI]
@@ -591,7 +591,7 @@ OptionPaneUI com.formdev.flatlaf.ui.FlatOptionPaneUI
#---- Panel ----
Panel.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-Panel.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Panel.font [active] $defaultFont [UI]
Panel.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
PanelUI com.formdev.flatlaf.ui.FlatPanelUI
@@ -606,7 +606,7 @@ PasswordField.caretBlinkRate 500
PasswordField.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
PasswordField.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
PasswordField.echoChar '\u2022'
-PasswordField.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+PasswordField.font [active] $defaultFont [UI]
PasswordField.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -624,7 +624,7 @@ PopupMenu.border [lazy] 4,1,4,1 false com.formdev.flatlaf.ui.F
PopupMenu.borderColor #5e5e5e javax.swing.plaf.ColorUIResource [UI]
PopupMenu.borderInsets 4,1,4,1 javax.swing.plaf.InsetsUIResource [UI]
PopupMenu.consumeEventOnClose false
-PopupMenu.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+PopupMenu.font [active] $defaultFont [UI]
PopupMenu.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -649,7 +649,7 @@ ProgressBar.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
ProgressBar.cellLength 1
ProgressBar.cellSpacing 0
ProgressBar.cycleTime 4000
-ProgressBar.font .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI]
+ProgressBar.font [active] .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI]
ProgressBar.foreground #4a88c7 javax.swing.plaf.ColorUIResource [UI]
ProgressBar.horizontalSize 146,4 javax.swing.plaf.DimensionUIResource [UI]
ProgressBar.repaintInterval 15
@@ -665,7 +665,7 @@ RadioButton.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
RadioButton.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
RadioButton.darkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI]
RadioButton.disabledText #777777 javax.swing.plaf.ColorUIResource [UI]
-RadioButton.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+RadioButton.font [active] $defaultFont [UI]
RadioButton.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
RadioButton.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
RadioButton.icon.centerDiameter 8
@@ -681,7 +681,7 @@ RadioButton.textShiftOffset 0
#---- RadioButtonMenuItem ----
-RadioButtonMenuItem.acceleratorFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+RadioButtonMenuItem.acceleratorFont [active] $defaultFont [UI]
RadioButtonMenuItem.acceleratorForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.acceleratorSelectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -690,7 +690,7 @@ RadioButtonMenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
RadioButtonMenuItem.borderPainted true
RadioButtonMenuItem.checkIcon [lazy] 15,15 com.formdev.flatlaf.icons.FlatRadioButtonMenuItemIcon [UI]
RadioButtonMenuItem.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-RadioButtonMenuItem.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+RadioButtonMenuItem.font [active] $defaultFont [UI]
RadioButtonMenuItem.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
RadioButtonMenuItem.opaque false
@@ -751,7 +751,7 @@ ScrollBarUI com.formdev.flatlaf.ui.FlatScrollBarUI
ScrollPane.background #3f4244 javax.swing.plaf.ColorUIResource [UI]
ScrollPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI]
ScrollPane.fillUpperCorner true
-ScrollPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ScrollPane.font [active] $defaultFont [UI]
ScrollPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ScrollPane.smoothScrolling true
ScrollPaneUI com.formdev.flatlaf.ui.FlatScrollPaneUI
@@ -775,7 +775,7 @@ Slider.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
Slider.disabledForeground #4c5052 javax.swing.plaf.ColorUIResource [UI]
Slider.focus #7e7e7e javax.swing.plaf.ColorUIResource [UI]
Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
-Slider.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Slider.font [active] $defaultFont [UI]
Slider.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Slider.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
Slider.horizontalSize 200,21 java.awt.Dimension
@@ -806,7 +806,7 @@ Spinner.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
Spinner.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
Spinner.editorAlignment 11
Spinner.editorBorderPainted false
-Spinner.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Spinner.font [active] $defaultFont [UI]
Spinner.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Spinner.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
SpinnerUI com.formdev.flatlaf.ui.FlatSpinnerUI
@@ -848,7 +848,7 @@ TabbedPane.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.disabledUnderlineColor #7a7a7a javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focus #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focusColor #3d4b5c javax.swing.plaf.ColorUIResource [UI]
-TabbedPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TabbedPane.font [active] $defaultFont [UI]
TabbedPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TabbedPane.hasFullBorder false
TabbedPane.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
@@ -887,7 +887,7 @@ Table.focusCellBackground #45494a javax.swing.plaf.ColorUIResource [UI]
Table.focusCellForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Table.focusCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Focused [UI]
Table.focusSelectedCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Selected [UI]
-Table.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Table.font [active] $defaultFont [UI]
Table.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Table.gridColor #4c5152 javax.swing.plaf.ColorUIResource [UI]
Table.intercellSpacing 0,0 javax.swing.plaf.DimensionUIResource [UI]
@@ -908,7 +908,7 @@ TableHeader.background #45494a javax.swing.plaf.ColorUIResource [UI]
TableHeader.bottomSeparatorColor #5e6364 javax.swing.plaf.ColorUIResource [UI]
TableHeader.cellBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatEmptyBorder [UI]
TableHeader.focusCellBackground #45494a javax.swing.plaf.ColorUIResource [UI]
-TableHeader.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TableHeader.font [active] $defaultFont [UI]
TableHeader.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TableHeader.height 25
TableHeader.separatorColor #5e6364 javax.swing.plaf.ColorUIResource [UI]
@@ -946,7 +946,7 @@ TextArea.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
TextArea.caretBlinkRate 500
TextArea.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextArea.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-TextArea.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TextArea.font [active] $defaultFont [UI]
TextArea.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -970,7 +970,7 @@ TextField.caretBlinkRate 500
TextField.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextField.darkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI]
TextField.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-TextField.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TextField.font [active] $defaultFont [UI]
TextField.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextField.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
TextField.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
@@ -991,7 +991,7 @@ TextPane.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
TextPane.caretBlinkRate 500
TextPane.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextPane.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-TextPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TextPane.font [active] $defaultFont [UI]
TextPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -1004,7 +1004,7 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
#---- TitledBorder ----
TitledBorder.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI]
-TitledBorder.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TitledBorder.font [active] $defaultFont [UI]
TitledBorder.titleColor #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -1020,7 +1020,7 @@ ToggleButton.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
ToggleButton.darkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI]
ToggleButton.disabledSelectedBackground #525658 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.disabledText #777777 javax.swing.plaf.ColorUIResource [UI]
-ToggleButton.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ToggleButton.font [active] $defaultFont [UI]
ToggleButton.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ToggleButton.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.iconTextGap 4
@@ -1054,7 +1054,7 @@ ToolBar.dockingBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ToolBar.dockingForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-ToolBar.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ToolBar.font [active] $defaultFont [UI]
ToolBar.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ToolBar.gripColor #adadad javax.swing.plaf.ColorUIResource [UI]
ToolBar.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
@@ -1081,7 +1081,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
ToolTip.background #1e2123 javax.swing.plaf.ColorUIResource [UI]
ToolTip.backgroundInactive #1e2123 javax.swing.plaf.ColorUIResource [UI]
ToolTip.border [lazy] 4,6,4,6 false com.formdev.flatlaf.ui.FlatEmptyBorder [UI]
-ToolTip.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ToolTip.font [active] $defaultFont [UI]
ToolTip.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ToolTip.foregroundInactive #777777 javax.swing.plaf.ColorUIResource [UI]
@@ -1109,7 +1109,7 @@ Tree.dropCellForeground [lazy] #bbbbbb javax.swing.plaf.ColorUIResourc
Tree.dropLineColor [lazy] #6d8ac0 javax.swing.plaf.ColorUIResource [UI]
Tree.editorBorder [lazy] line: #000000 java.awt.Color 1 false 1,1,1,1 true javax.swing.plaf.BorderUIResource$LineBorderUIResource [UI]
Tree.expandedIcon [lazy] 11,11 com.formdev.flatlaf.icons.FlatTreeExpandedIcon [UI]
-Tree.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Tree.font [active] $defaultFont [UI]
Tree.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Tree.hash #505355 javax.swing.plaf.ColorUIResource [UI]
Tree.icon.closedColor #adadad javax.swing.plaf.ColorUIResource [UI]
@@ -1143,7 +1143,7 @@ TreeUI com.formdev.flatlaf.ui.FlatTreeUI
#---- Viewport ----
Viewport.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-Viewport.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Viewport.font [active] $defaultFont [UI]
Viewport.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
@@ -1159,6 +1159,7 @@ controlHighlight #313131 javax.swing.plaf.ColorUIResource [UI]
controlLtHighlight #242424 javax.swing.plaf.ColorUIResource [UI]
controlShadow #646464 javax.swing.plaf.ColorUIResource [UI]
controlText #bbbbbb javax.swing.plaf.ColorUIResource [UI]
+defaultFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
desktop #45494a javax.swing.plaf.ColorUIResource [UI]
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt
index 8ee08900..48c4e209 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatDarkLaf_1.8.0_202.txt
@@ -80,7 +80,7 @@ Button.defaultButtonFollowsFocus true
Button.disabledBorderColor #5e6060 javax.swing.plaf.ColorUIResource [UI]
Button.disabledText #777777 javax.swing.plaf.ColorUIResource [UI]
Button.focusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
-Button.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Button.font [active] $defaultFont [UI]
Button.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Button.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
Button.hoverBackground #ff0000 com.formdev.flatlaf.util.DerivedColor [UI]
@@ -112,7 +112,7 @@ CheckBox.arc 4
CheckBox.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
CheckBox.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
CheckBox.disabledText #777777 javax.swing.plaf.ColorUIResource [UI]
-CheckBox.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+CheckBox.font [active] $defaultFont [UI]
CheckBox.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.background #43494a javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.borderColor #6b6b6b javax.swing.plaf.ColorUIResource [UI]
@@ -137,7 +137,7 @@ CheckBox.textShiftOffset 0
#---- CheckBoxMenuItem ----
-CheckBoxMenuItem.acceleratorFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+CheckBoxMenuItem.acceleratorFont [active] $defaultFont [UI]
CheckBoxMenuItem.acceleratorForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.acceleratorSelectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -146,7 +146,7 @@ CheckBoxMenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
CheckBoxMenuItem.borderPainted true
CheckBoxMenuItem.checkIcon [lazy] 15,15 com.formdev.flatlaf.icons.FlatCheckBoxMenuItemIcon [UI]
CheckBoxMenuItem.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-CheckBoxMenuItem.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+CheckBoxMenuItem.font [active] $defaultFont [UI]
CheckBoxMenuItem.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
CheckBoxMenuItem.opaque false
@@ -163,7 +163,7 @@ CheckBoxUI com.formdev.flatlaf.ui.FlatCheckBoxUI
#---- ColorChooser ----
ColorChooser.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-ColorChooser.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ColorChooser.font [active] $defaultFont [UI]
ColorChooser.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesDefaultRecentColor #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesRecentSwatchSize [active] 16,16 javax.swing.plaf.DimensionUIResource [UI]
@@ -185,7 +185,7 @@ ComboBox.buttonHoverArrowColor #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonShadow #646464 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-ComboBox.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ComboBox.font [active] $defaultFont [UI]
ComboBox.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ComboBox.isEnterSelectablePopup false
ComboBox.noActionOnKeyNavigation false
@@ -245,7 +245,7 @@ EditorPane.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
EditorPane.caretBlinkRate 500
EditorPane.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
EditorPane.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-EditorPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+EditorPane.font [active] $defaultFont [UI]
EditorPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -284,7 +284,7 @@ FormattedTextField.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
FormattedTextField.caretBlinkRate 500
FormattedTextField.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-FormattedTextField.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+FormattedTextField.font [active] $defaultFont [UI]
FormattedTextField.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -351,7 +351,7 @@ InternalFrame.inactiveTitleBackground #303234 javax.swing.plaf.ColorUIResourc
InternalFrame.inactiveTitleForeground #777777 javax.swing.plaf.ColorUIResource [UI]
InternalFrame.maximizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon [UI]
InternalFrame.minimizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMinimizeIcon [UI]
-InternalFrame.titleFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+InternalFrame.titleFont [active] $defaultFont [UI]
#---- InternalFrameTitlePane ----
@@ -428,7 +428,7 @@ JideTabbedPaneUI com.formdev.flatlaf.jideoss.ui.FlatJideTabbedPane
Label.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
Label.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
Label.disabledShadow #646464 javax.swing.plaf.ColorUIResource [UI]
-Label.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Label.font [active] $defaultFont [UI]
Label.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
LabelUI com.formdev.flatlaf.ui.FlatLabelUI
@@ -446,7 +446,7 @@ List.dropCellForeground [lazy] #bbbbbb javax.swing.plaf.ColorUIResourc
List.dropLineColor [lazy] #6d8ac0 javax.swing.plaf.ColorUIResource [UI]
List.focusCellHighlightBorder [lazy] 1,6,1,6 false com.formdev.flatlaf.ui.FlatListCellBorder$Focused [UI]
List.focusSelectedCellHighlightBorder [lazy] 1,6,1,6 false com.formdev.flatlaf.ui.FlatListCellBorder$Selected [UI]
-List.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+List.font [active] $defaultFont [UI]
List.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
List.noFocusBorder 1,1,1,1 false javax.swing.plaf.BorderUIResource$EmptyBorderUIResource [UI]
List.selectionBackground #4b6eaf javax.swing.plaf.ColorUIResource [UI]
@@ -459,7 +459,7 @@ ListUI com.formdev.flatlaf.ui.FlatListUI
#---- Menu ----
-Menu.acceleratorFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Menu.acceleratorFont [active] $defaultFont [UI]
Menu.acceleratorForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Menu.acceleratorSelectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Menu.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuArrowIcon [UI]
@@ -469,7 +469,7 @@ Menu.borderPainted true
Menu.cancelMode hideLastSubmenu
Menu.crossMenuMnemonic true
Menu.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-Menu.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Menu.font [active] $defaultFont [UI]
Menu.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Menu.icon.arrowColor #a7a7a7 javax.swing.plaf.ColorUIResource [UI]
Menu.icon.disabledArrowColor #606060 javax.swing.plaf.ColorUIResource [UI]
@@ -491,7 +491,7 @@ Menu.submenuPopupOffsetY [active] -4
MenuBar.background #303234 javax.swing.plaf.ColorUIResource [UI]
MenuBar.border [lazy] 0,0,1,0 false com.formdev.flatlaf.ui.FlatMenuBarBorder [UI]
MenuBar.borderColor #515151 javax.swing.plaf.ColorUIResource [UI]
-MenuBar.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+MenuBar.font [active] $defaultFont [UI]
MenuBar.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
MenuBar.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
MenuBar.hoverBackground #484c4f javax.swing.plaf.ColorUIResource [UI]
@@ -506,7 +506,7 @@ MenuBarUI com.formdev.flatlaf.ui.FlatMenuBarUI
#---- MenuItem ----
MenuItem.acceleratorDelimiter -
-MenuItem.acceleratorFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+MenuItem.acceleratorFont [active] $defaultFont [UI]
MenuItem.acceleratorForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
MenuItem.acceleratorSelectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
MenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -514,7 +514,7 @@ MenuItem.background #303234 javax.swing.plaf.ColorUIResource [UI]
MenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMenuItemBorder [UI]
MenuItem.borderPainted true
MenuItem.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-MenuItem.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+MenuItem.font [active] $defaultFont [UI]
MenuItem.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
MenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
MenuItem.opaque false
@@ -568,7 +568,7 @@ OptionPane.buttonMinimumWidth [active] 72
OptionPane.buttonOrientation 4
OptionPane.buttonPadding 8
OptionPane.errorIcon [lazy] 32,32 com.formdev.flatlaf.icons.FlatOptionPaneErrorIcon [UI]
-OptionPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+OptionPane.font [active] $defaultFont [UI]
OptionPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
OptionPane.iconMessageGap 16
OptionPane.informationIcon [lazy] 32,32 com.formdev.flatlaf.icons.FlatOptionPaneInformationIcon [UI]
@@ -589,7 +589,7 @@ OptionPaneUI com.formdev.flatlaf.ui.FlatOptionPaneUI
#---- Panel ----
Panel.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-Panel.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Panel.font [active] $defaultFont [UI]
Panel.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
PanelUI com.formdev.flatlaf.ui.FlatPanelUI
@@ -604,7 +604,7 @@ PasswordField.caretBlinkRate 500
PasswordField.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
PasswordField.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
PasswordField.echoChar '\u2022'
-PasswordField.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+PasswordField.font [active] $defaultFont [UI]
PasswordField.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -622,7 +622,7 @@ PopupMenu.border [lazy] 4,1,4,1 false com.formdev.flatlaf.ui.F
PopupMenu.borderColor #5e5e5e javax.swing.plaf.ColorUIResource [UI]
PopupMenu.borderInsets 4,1,4,1 javax.swing.plaf.InsetsUIResource [UI]
PopupMenu.consumeEventOnClose false
-PopupMenu.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+PopupMenu.font [active] $defaultFont [UI]
PopupMenu.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -647,7 +647,7 @@ ProgressBar.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
ProgressBar.cellLength 1
ProgressBar.cellSpacing 0
ProgressBar.cycleTime 4000
-ProgressBar.font Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
ProgressBar.foreground #4a88c7 javax.swing.plaf.ColorUIResource [UI]
ProgressBar.horizontalSize 146,4 javax.swing.plaf.DimensionUIResource [UI]
ProgressBar.repaintInterval 15
@@ -663,7 +663,7 @@ RadioButton.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
RadioButton.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
RadioButton.darkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI]
RadioButton.disabledText #777777 javax.swing.plaf.ColorUIResource [UI]
-RadioButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+RadioButton.font [active] $defaultFont [UI]
RadioButton.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
RadioButton.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
RadioButton.icon.centerDiameter 8
@@ -679,7 +679,7 @@ RadioButton.textShiftOffset 0
#---- RadioButtonMenuItem ----
-RadioButtonMenuItem.acceleratorFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+RadioButtonMenuItem.acceleratorFont [active] $defaultFont [UI]
RadioButtonMenuItem.acceleratorForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.acceleratorSelectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -688,7 +688,7 @@ RadioButtonMenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
RadioButtonMenuItem.borderPainted true
RadioButtonMenuItem.checkIcon [lazy] 15,15 com.formdev.flatlaf.icons.FlatRadioButtonMenuItemIcon [UI]
RadioButtonMenuItem.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-RadioButtonMenuItem.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+RadioButtonMenuItem.font [active] $defaultFont [UI]
RadioButtonMenuItem.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
RadioButtonMenuItem.opaque false
@@ -749,7 +749,7 @@ ScrollBarUI com.formdev.flatlaf.ui.FlatScrollBarUI
ScrollPane.background #3f4244 javax.swing.plaf.ColorUIResource [UI]
ScrollPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI]
ScrollPane.fillUpperCorner true
-ScrollPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ScrollPane.font [active] $defaultFont [UI]
ScrollPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ScrollPane.smoothScrolling true
ScrollPaneUI com.formdev.flatlaf.ui.FlatScrollPaneUI
@@ -773,7 +773,7 @@ Slider.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
Slider.disabledForeground #4c5052 javax.swing.plaf.ColorUIResource [UI]
Slider.focus #7e7e7e javax.swing.plaf.ColorUIResource [UI]
Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
-Slider.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Slider.font [active] $defaultFont [UI]
Slider.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Slider.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
Slider.horizontalSize 200,21 java.awt.Dimension
@@ -804,7 +804,7 @@ Spinner.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
Spinner.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
Spinner.editorAlignment 11
Spinner.editorBorderPainted false
-Spinner.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Spinner.font [active] $defaultFont [UI]
Spinner.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Spinner.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
SpinnerUI com.formdev.flatlaf.ui.FlatSpinnerUI
@@ -846,7 +846,7 @@ TabbedPane.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.disabledUnderlineColor #7a7a7a javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focus #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focusColor #3d4b5c javax.swing.plaf.ColorUIResource [UI]
-TabbedPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TabbedPane.font [active] $defaultFont [UI]
TabbedPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TabbedPane.hasFullBorder false
TabbedPane.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
@@ -885,7 +885,7 @@ Table.focusCellBackground #45494a javax.swing.plaf.ColorUIResource [UI]
Table.focusCellForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Table.focusCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Focused [UI]
Table.focusSelectedCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Selected [UI]
-Table.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Table.font [active] $defaultFont [UI]
Table.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Table.gridColor #4c5152 javax.swing.plaf.ColorUIResource [UI]
Table.intercellSpacing 0,0 javax.swing.plaf.DimensionUIResource [UI]
@@ -906,7 +906,7 @@ TableHeader.background #45494a javax.swing.plaf.ColorUIResource [UI]
TableHeader.bottomSeparatorColor #5e6364 javax.swing.plaf.ColorUIResource [UI]
TableHeader.cellBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatEmptyBorder [UI]
TableHeader.focusCellBackground #45494a javax.swing.plaf.ColorUIResource [UI]
-TableHeader.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TableHeader.font [active] $defaultFont [UI]
TableHeader.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TableHeader.height 25
TableHeader.separatorColor #5e6364 javax.swing.plaf.ColorUIResource [UI]
@@ -944,7 +944,7 @@ TextArea.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
TextArea.caretBlinkRate 500
TextArea.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextArea.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-TextArea.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TextArea.font [active] $defaultFont [UI]
TextArea.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -968,7 +968,7 @@ TextField.caretBlinkRate 500
TextField.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextField.darkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI]
TextField.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-TextField.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TextField.font [active] $defaultFont [UI]
TextField.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextField.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
TextField.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
@@ -989,7 +989,7 @@ TextPane.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
TextPane.caretBlinkRate 500
TextPane.caretForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextPane.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-TextPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TextPane.font [active] $defaultFont [UI]
TextPane.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -1002,7 +1002,7 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
#---- TitledBorder ----
TitledBorder.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI]
-TitledBorder.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TitledBorder.font [active] $defaultFont [UI]
TitledBorder.titleColor #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -1018,7 +1018,7 @@ ToggleButton.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
ToggleButton.darkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI]
ToggleButton.disabledSelectedBackground #525658 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.disabledText #777777 javax.swing.plaf.ColorUIResource [UI]
-ToggleButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ToggleButton.font [active] $defaultFont [UI]
ToggleButton.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ToggleButton.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.iconTextGap 4
@@ -1052,7 +1052,7 @@ ToolBar.dockingBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ToolBar.dockingForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingForeground #777777 javax.swing.plaf.ColorUIResource [UI]
-ToolBar.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ToolBar.font [active] $defaultFont [UI]
ToolBar.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ToolBar.gripColor #adadad javax.swing.plaf.ColorUIResource [UI]
ToolBar.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
@@ -1079,7 +1079,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
ToolTip.background #1e2123 javax.swing.plaf.ColorUIResource [UI]
ToolTip.backgroundInactive #1e2123 javax.swing.plaf.ColorUIResource [UI]
ToolTip.border [lazy] 4,6,4,6 false com.formdev.flatlaf.ui.FlatEmptyBorder [UI]
-ToolTip.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ToolTip.font [active] $defaultFont [UI]
ToolTip.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ToolTip.foregroundInactive #777777 javax.swing.plaf.ColorUIResource [UI]
@@ -1107,7 +1107,7 @@ Tree.dropCellForeground [lazy] #bbbbbb javax.swing.plaf.ColorUIResourc
Tree.dropLineColor [lazy] #6d8ac0 javax.swing.plaf.ColorUIResource [UI]
Tree.editorBorder [lazy] line: #000000 java.awt.Color 1 false 1,1,1,1 true javax.swing.plaf.BorderUIResource$LineBorderUIResource [UI]
Tree.expandedIcon [lazy] 11,11 com.formdev.flatlaf.icons.FlatTreeExpandedIcon [UI]
-Tree.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Tree.font [active] $defaultFont [UI]
Tree.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Tree.hash #505355 javax.swing.plaf.ColorUIResource [UI]
Tree.icon.closedColor #adadad javax.swing.plaf.ColorUIResource [UI]
@@ -1141,7 +1141,7 @@ TreeUI com.formdev.flatlaf.ui.FlatTreeUI
#---- Viewport ----
Viewport.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
-Viewport.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Viewport.font [active] $defaultFont [UI]
Viewport.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
@@ -1157,6 +1157,7 @@ controlHighlight #313131 javax.swing.plaf.ColorUIResource [UI]
controlLtHighlight #242424 javax.swing.plaf.ColorUIResource [UI]
controlShadow #646464 javax.swing.plaf.ColorUIResource [UI]
controlText #bbbbbb javax.swing.plaf.ColorUIResource [UI]
+defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
desktop #45494a javax.swing.plaf.ColorUIResource [UI]
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
index cf2c102b..06f41702 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202-mac.txt
@@ -81,7 +81,7 @@ Button.disabledBorderColor #cfcfcf javax.swing.plaf.ColorUIResource [UI]
Button.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
Button.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI]
Button.focusedBorderColor #87afda javax.swing.plaf.ColorUIResource [UI]
-Button.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Button.font [active] $defaultFont [UI]
Button.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Button.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Button.hoverBackground #ff0000 com.formdev.flatlaf.util.DerivedColor [UI]
@@ -113,7 +113,7 @@ CheckBox.arc 4
CheckBox.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
CheckBox.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
CheckBox.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-CheckBox.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+CheckBox.font [active] $defaultFont [UI]
CheckBox.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.background #ffffff javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.borderColor #b0b0b0 javax.swing.plaf.ColorUIResource [UI]
@@ -138,7 +138,7 @@ CheckBox.textShiftOffset 0
#---- CheckBoxMenuItem ----
-CheckBoxMenuItem.acceleratorFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+CheckBoxMenuItem.acceleratorFont [active] $defaultFont [UI]
CheckBoxMenuItem.acceleratorForeground #505050 javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -147,7 +147,7 @@ CheckBoxMenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
CheckBoxMenuItem.borderPainted true
CheckBoxMenuItem.checkIcon [lazy] 15,15 com.formdev.flatlaf.icons.FlatCheckBoxMenuItemIcon [UI]
CheckBoxMenuItem.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-CheckBoxMenuItem.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+CheckBoxMenuItem.font [active] $defaultFont [UI]
CheckBoxMenuItem.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
CheckBoxMenuItem.opaque false
@@ -164,7 +164,7 @@ CheckBoxUI com.formdev.flatlaf.ui.FlatCheckBoxUI
#---- ColorChooser ----
ColorChooser.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-ColorChooser.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ColorChooser.font [active] $defaultFont [UI]
ColorChooser.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesDefaultRecentColor #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesRecentSwatchSize [active] 16,16 javax.swing.plaf.DimensionUIResource [UI]
@@ -186,7 +186,7 @@ ComboBox.buttonHoverArrowColor #999999 javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-ComboBox.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ComboBox.font [active] $defaultFont [UI]
ComboBox.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ComboBox.isEnterSelectablePopup false
ComboBox.noActionOnKeyNavigation false
@@ -247,7 +247,7 @@ EditorPane.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
EditorPane.caretBlinkRate 500
EditorPane.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
EditorPane.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-EditorPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+EditorPane.font [active] $defaultFont [UI]
EditorPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -286,7 +286,7 @@ FormattedTextField.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
FormattedTextField.caretBlinkRate 500
FormattedTextField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-FormattedTextField.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+FormattedTextField.font [active] $defaultFont [UI]
FormattedTextField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -354,7 +354,7 @@ InternalFrame.inactiveTitleBackground #fafafa javax.swing.plaf.ColorUIResourc
InternalFrame.inactiveTitleForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
InternalFrame.maximizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon [UI]
InternalFrame.minimizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMinimizeIcon [UI]
-InternalFrame.titleFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+InternalFrame.titleFont [active] $defaultFont [UI]
#---- InternalFrameTitlePane ----
@@ -431,7 +431,7 @@ JideTabbedPaneUI com.formdev.flatlaf.jideoss.ui.FlatJideTabbedPane
Label.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
Label.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
Label.disabledShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
-Label.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Label.font [active] $defaultFont [UI]
Label.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
LabelUI com.formdev.flatlaf.ui.FlatLabelUI
@@ -449,7 +449,7 @@ List.dropCellForeground [lazy] #ffffff javax.swing.plaf.ColorUIResourc
List.dropLineColor [lazy] #6aa7e1 javax.swing.plaf.ColorUIResource [UI]
List.focusCellHighlightBorder [lazy] 1,6,1,6 false com.formdev.flatlaf.ui.FlatListCellBorder$Focused [UI]
List.focusSelectedCellHighlightBorder [lazy] 1,6,1,6 false com.formdev.flatlaf.ui.FlatListCellBorder$Selected [UI]
-List.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+List.font [active] $defaultFont [UI]
List.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
List.noFocusBorder 1,1,1,1 false javax.swing.plaf.BorderUIResource$EmptyBorderUIResource [UI]
List.selectionBackground #2675bf javax.swing.plaf.ColorUIResource [UI]
@@ -462,7 +462,7 @@ ListUI com.formdev.flatlaf.ui.FlatListUI
#---- Menu ----
-Menu.acceleratorFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Menu.acceleratorFont [active] $defaultFont [UI]
Menu.acceleratorForeground #505050 javax.swing.plaf.ColorUIResource [UI]
Menu.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
Menu.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuArrowIcon [UI]
@@ -472,7 +472,7 @@ Menu.borderPainted true
Menu.cancelMode hideLastSubmenu
Menu.crossMenuMnemonic true
Menu.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-Menu.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Menu.font [active] $defaultFont [UI]
Menu.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Menu.icon.arrowColor #666666 javax.swing.plaf.ColorUIResource [UI]
Menu.icon.disabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI]
@@ -494,7 +494,7 @@ Menu.submenuPopupOffsetY [active] -4
MenuBar.background #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuBar.border [lazy] 0,0,1,0 false com.formdev.flatlaf.ui.FlatMenuBarBorder [UI]
MenuBar.borderColor #cdcdcd javax.swing.plaf.ColorUIResource [UI]
-MenuBar.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+MenuBar.font [active] $defaultFont [UI]
MenuBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
MenuBar.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuBar.hoverBackground #e6e6e6 javax.swing.plaf.ColorUIResource [UI]
@@ -509,7 +509,7 @@ MenuBarUI com.formdev.flatlaf.ui.FlatMenuBarUI
#---- MenuItem ----
MenuItem.acceleratorDelimiter
-MenuItem.acceleratorFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+MenuItem.acceleratorFont [active] $defaultFont [UI]
MenuItem.acceleratorForeground #505050 javax.swing.plaf.ColorUIResource [UI]
MenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -517,7 +517,7 @@ MenuItem.background #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMenuItemBorder [UI]
MenuItem.borderPainted true
MenuItem.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-MenuItem.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+MenuItem.font [active] $defaultFont [UI]
MenuItem.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
MenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
MenuItem.opaque false
@@ -571,7 +571,7 @@ OptionPane.buttonMinimumWidth [active] 72
OptionPane.buttonOrientation 4
OptionPane.buttonPadding 8
OptionPane.errorIcon [lazy] 32,32 com.formdev.flatlaf.icons.FlatOptionPaneErrorIcon [UI]
-OptionPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+OptionPane.font [active] $defaultFont [UI]
OptionPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
OptionPane.iconMessageGap 16
OptionPane.informationIcon [lazy] 32,32 com.formdev.flatlaf.icons.FlatOptionPaneInformationIcon [UI]
@@ -593,7 +593,7 @@ OptionPaneUI com.formdev.flatlaf.ui.FlatOptionPaneUI
#---- Panel ----
Panel.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-Panel.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Panel.font [active] $defaultFont [UI]
Panel.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
PanelUI com.formdev.flatlaf.ui.FlatPanelUI
@@ -608,7 +608,7 @@ PasswordField.caretBlinkRate 500
PasswordField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
PasswordField.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
PasswordField.echoChar '\u2022'
-PasswordField.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+PasswordField.font [active] $defaultFont [UI]
PasswordField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -626,7 +626,7 @@ PopupMenu.border [lazy] 4,1,4,1 false com.formdev.flatlaf.ui.F
PopupMenu.borderColor #adadad javax.swing.plaf.ColorUIResource [UI]
PopupMenu.borderInsets 4,1,4,1 javax.swing.plaf.InsetsUIResource [UI]
PopupMenu.consumeEventOnClose false
-PopupMenu.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+PopupMenu.font [active] $defaultFont [UI]
PopupMenu.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
@@ -651,7 +651,7 @@ ProgressBar.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
ProgressBar.cellLength 1
ProgressBar.cellSpacing 0
ProgressBar.cycleTime 4000
-ProgressBar.font .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI]
+ProgressBar.font [active] .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI]
ProgressBar.foreground #1e82e6 javax.swing.plaf.ColorUIResource [UI]
ProgressBar.horizontalSize 146,4 javax.swing.plaf.DimensionUIResource [UI]
ProgressBar.repaintInterval 15
@@ -667,7 +667,7 @@ RadioButton.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
RadioButton.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
RadioButton.darkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI]
RadioButton.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-RadioButton.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+RadioButton.font [active] $defaultFont [UI]
RadioButton.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
RadioButton.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
RadioButton.icon.centerDiameter 8
@@ -683,7 +683,7 @@ RadioButton.textShiftOffset 0
#---- RadioButtonMenuItem ----
-RadioButtonMenuItem.acceleratorFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+RadioButtonMenuItem.acceleratorFont [active] $defaultFont [UI]
RadioButtonMenuItem.acceleratorForeground #505050 javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -692,7 +692,7 @@ RadioButtonMenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
RadioButtonMenuItem.borderPainted true
RadioButtonMenuItem.checkIcon [lazy] 15,15 com.formdev.flatlaf.icons.FlatRadioButtonMenuItemIcon [UI]
RadioButtonMenuItem.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-RadioButtonMenuItem.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+RadioButtonMenuItem.font [active] $defaultFont [UI]
RadioButtonMenuItem.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
RadioButtonMenuItem.opaque false
@@ -753,7 +753,7 @@ ScrollBarUI com.formdev.flatlaf.ui.FlatScrollBarUI
ScrollPane.background #f5f5f5 javax.swing.plaf.ColorUIResource [UI]
ScrollPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI]
ScrollPane.fillUpperCorner true
-ScrollPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ScrollPane.font [active] $defaultFont [UI]
ScrollPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ScrollPane.smoothScrolling true
ScrollPaneUI com.formdev.flatlaf.ui.FlatScrollPaneUI
@@ -777,7 +777,7 @@ Slider.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
Slider.disabledForeground #c0c0c0 javax.swing.plaf.ColorUIResource [UI]
Slider.focus #9e9e9e javax.swing.plaf.ColorUIResource [UI]
Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
-Slider.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Slider.font [active] $defaultFont [UI]
Slider.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Slider.horizontalSize 200,21 java.awt.Dimension
@@ -808,7 +808,7 @@ Spinner.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
Spinner.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
Spinner.editorAlignment 11
Spinner.editorBorderPainted false
-Spinner.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Spinner.font [active] $defaultFont [UI]
Spinner.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Spinner.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
SpinnerUI com.formdev.flatlaf.ui.FlatSpinnerUI
@@ -850,7 +850,7 @@ TabbedPane.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
TabbedPane.disabledUnderlineColor #ababab javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focus #000000 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focusColor #dae4ed javax.swing.plaf.ColorUIResource [UI]
-TabbedPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TabbedPane.font [active] $defaultFont [UI]
TabbedPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.hasFullBorder false
TabbedPane.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
@@ -889,7 +889,7 @@ Table.focusCellBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
Table.focusCellForeground #000000 javax.swing.plaf.ColorUIResource [UI]
Table.focusCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Focused [UI]
Table.focusSelectedCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Selected [UI]
-Table.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Table.font [active] $defaultFont [UI]
Table.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Table.gridColor #f7f7f7 javax.swing.plaf.ColorUIResource [UI]
Table.intercellSpacing 0,0 javax.swing.plaf.DimensionUIResource [UI]
@@ -910,7 +910,7 @@ TableHeader.background #ffffff javax.swing.plaf.ColorUIResource [UI]
TableHeader.bottomSeparatorColor #e6e6e6 javax.swing.plaf.ColorUIResource [UI]
TableHeader.cellBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatEmptyBorder [UI]
TableHeader.focusCellBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
-TableHeader.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TableHeader.font [active] $defaultFont [UI]
TableHeader.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TableHeader.height 25
TableHeader.separatorColor #e6e6e6 javax.swing.plaf.ColorUIResource [UI]
@@ -948,7 +948,7 @@ TextArea.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
TextArea.caretBlinkRate 500
TextArea.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextArea.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-TextArea.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TextArea.font [active] $defaultFont [UI]
TextArea.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -972,7 +972,7 @@ TextField.caretBlinkRate 500
TextField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextField.darkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI]
TextField.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-TextField.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TextField.font [active] $defaultFont [UI]
TextField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextField.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
TextField.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
@@ -993,7 +993,7 @@ TextPane.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
TextPane.caretBlinkRate 500
TextPane.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextPane.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-TextPane.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TextPane.font [active] $defaultFont [UI]
TextPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -1006,7 +1006,7 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
#---- TitledBorder ----
TitledBorder.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI]
-TitledBorder.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+TitledBorder.font [active] $defaultFont [UI]
TitledBorder.titleColor #000000 javax.swing.plaf.ColorUIResource [UI]
@@ -1022,7 +1022,7 @@ ToggleButton.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
ToggleButton.darkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI]
ToggleButton.disabledSelectedBackground #dfdfdf javax.swing.plaf.ColorUIResource [UI]
ToggleButton.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-ToggleButton.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ToggleButton.font [active] $defaultFont [UI]
ToggleButton.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
ToggleButton.iconTextGap 4
@@ -1056,7 +1056,7 @@ ToolBar.dockingBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ToolBar.dockingForeground #000000 javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-ToolBar.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ToolBar.font [active] $defaultFont [UI]
ToolBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ToolBar.gripColor #afafaf javax.swing.plaf.ColorUIResource [UI]
ToolBar.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
@@ -1083,7 +1083,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
ToolTip.background #fafafa javax.swing.plaf.ColorUIResource [UI]
ToolTip.backgroundInactive #fafafa javax.swing.plaf.ColorUIResource [UI]
ToolTip.border [lazy] 4,6,4,6 false com.formdev.flatlaf.ui.FlatLineBorder [UI]
-ToolTip.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ToolTip.font [active] $defaultFont [UI]
ToolTip.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ToolTip.foregroundInactive #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -1111,7 +1111,7 @@ Tree.dropCellForeground [lazy] #ffffff javax.swing.plaf.ColorUIResourc
Tree.dropLineColor [lazy] #6aa7e1 javax.swing.plaf.ColorUIResource [UI]
Tree.editorBorder [lazy] line: #000000 java.awt.Color 1 false 1,1,1,1 true javax.swing.plaf.BorderUIResource$LineBorderUIResource [UI]
Tree.expandedIcon [lazy] 11,11 com.formdev.flatlaf.icons.FlatTreeExpandedIcon [UI]
-Tree.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Tree.font [active] $defaultFont [UI]
Tree.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Tree.hash #e6e6e6 javax.swing.plaf.ColorUIResource [UI]
Tree.icon.closedColor #afafaf javax.swing.plaf.ColorUIResource [UI]
@@ -1145,7 +1145,7 @@ TreeUI com.formdev.flatlaf.ui.FlatTreeUI
#---- Viewport ----
Viewport.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-Viewport.font .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+Viewport.font [active] $defaultFont [UI]
Viewport.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
@@ -1161,6 +1161,7 @@ controlHighlight #e3e3e3 javax.swing.plaf.ColorUIResource [UI]
controlLtHighlight #ffffff javax.swing.plaf.ColorUIResource [UI]
controlShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
controlText #000000 javax.swing.plaf.ColorUIResource [UI]
+defaultFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
desktop #ffffff javax.swing.plaf.ColorUIResource [UI]
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt
index d4ec7bc1..163d5c60 100644
--- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/uidefaults/FlatLightLaf_1.8.0_202.txt
@@ -81,7 +81,7 @@ Button.disabledBorderColor #cfcfcf javax.swing.plaf.ColorUIResource [UI]
Button.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
Button.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI]
Button.focusedBorderColor #87afda javax.swing.plaf.ColorUIResource [UI]
-Button.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Button.font [active] $defaultFont [UI]
Button.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Button.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Button.hoverBackground #ff0000 com.formdev.flatlaf.util.DerivedColor [UI]
@@ -113,7 +113,7 @@ CheckBox.arc 4
CheckBox.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
CheckBox.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
CheckBox.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-CheckBox.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+CheckBox.font [active] $defaultFont [UI]
CheckBox.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.background #ffffff javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.borderColor #b0b0b0 javax.swing.plaf.ColorUIResource [UI]
@@ -138,7 +138,7 @@ CheckBox.textShiftOffset 0
#---- CheckBoxMenuItem ----
-CheckBoxMenuItem.acceleratorFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+CheckBoxMenuItem.acceleratorFont [active] $defaultFont [UI]
CheckBoxMenuItem.acceleratorForeground #505050 javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -147,7 +147,7 @@ CheckBoxMenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
CheckBoxMenuItem.borderPainted true
CheckBoxMenuItem.checkIcon [lazy] 15,15 com.formdev.flatlaf.icons.FlatCheckBoxMenuItemIcon [UI]
CheckBoxMenuItem.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-CheckBoxMenuItem.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+CheckBoxMenuItem.font [active] $defaultFont [UI]
CheckBoxMenuItem.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
CheckBoxMenuItem.opaque false
@@ -164,7 +164,7 @@ CheckBoxUI com.formdev.flatlaf.ui.FlatCheckBoxUI
#---- ColorChooser ----
ColorChooser.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-ColorChooser.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ColorChooser.font [active] $defaultFont [UI]
ColorChooser.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesDefaultRecentColor #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesRecentSwatchSize [active] 16,16 javax.swing.plaf.DimensionUIResource [UI]
@@ -186,7 +186,7 @@ ComboBox.buttonHoverArrowColor #999999 javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-ComboBox.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ComboBox.font [active] $defaultFont [UI]
ComboBox.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ComboBox.isEnterSelectablePopup false
ComboBox.noActionOnKeyNavigation false
@@ -246,7 +246,7 @@ EditorPane.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
EditorPane.caretBlinkRate 500
EditorPane.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
EditorPane.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-EditorPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+EditorPane.font [active] $defaultFont [UI]
EditorPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -285,7 +285,7 @@ FormattedTextField.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
FormattedTextField.caretBlinkRate 500
FormattedTextField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-FormattedTextField.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+FormattedTextField.font [active] $defaultFont [UI]
FormattedTextField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -353,7 +353,7 @@ InternalFrame.inactiveTitleBackground #fafafa javax.swing.plaf.ColorUIResourc
InternalFrame.inactiveTitleForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
InternalFrame.maximizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon [UI]
InternalFrame.minimizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMinimizeIcon [UI]
-InternalFrame.titleFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+InternalFrame.titleFont [active] $defaultFont [UI]
#---- InternalFrameTitlePane ----
@@ -430,7 +430,7 @@ JideTabbedPaneUI com.formdev.flatlaf.jideoss.ui.FlatJideTabbedPane
Label.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
Label.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
Label.disabledShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
-Label.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Label.font [active] $defaultFont [UI]
Label.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
LabelUI com.formdev.flatlaf.ui.FlatLabelUI
@@ -448,7 +448,7 @@ List.dropCellForeground [lazy] #ffffff javax.swing.plaf.ColorUIResourc
List.dropLineColor [lazy] #6aa7e1 javax.swing.plaf.ColorUIResource [UI]
List.focusCellHighlightBorder [lazy] 1,6,1,6 false com.formdev.flatlaf.ui.FlatListCellBorder$Focused [UI]
List.focusSelectedCellHighlightBorder [lazy] 1,6,1,6 false com.formdev.flatlaf.ui.FlatListCellBorder$Selected [UI]
-List.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+List.font [active] $defaultFont [UI]
List.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
List.noFocusBorder 1,1,1,1 false javax.swing.plaf.BorderUIResource$EmptyBorderUIResource [UI]
List.selectionBackground #2675bf javax.swing.plaf.ColorUIResource [UI]
@@ -461,7 +461,7 @@ ListUI com.formdev.flatlaf.ui.FlatListUI
#---- Menu ----
-Menu.acceleratorFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Menu.acceleratorFont [active] $defaultFont [UI]
Menu.acceleratorForeground #505050 javax.swing.plaf.ColorUIResource [UI]
Menu.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
Menu.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuArrowIcon [UI]
@@ -471,7 +471,7 @@ Menu.borderPainted true
Menu.cancelMode hideLastSubmenu
Menu.crossMenuMnemonic true
Menu.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-Menu.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Menu.font [active] $defaultFont [UI]
Menu.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Menu.icon.arrowColor #666666 javax.swing.plaf.ColorUIResource [UI]
Menu.icon.disabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI]
@@ -493,7 +493,7 @@ Menu.submenuPopupOffsetY [active] -4
MenuBar.background #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuBar.border [lazy] 0,0,1,0 false com.formdev.flatlaf.ui.FlatMenuBarBorder [UI]
MenuBar.borderColor #cdcdcd javax.swing.plaf.ColorUIResource [UI]
-MenuBar.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+MenuBar.font [active] $defaultFont [UI]
MenuBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
MenuBar.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuBar.hoverBackground #e6e6e6 javax.swing.plaf.ColorUIResource [UI]
@@ -508,7 +508,7 @@ MenuBarUI com.formdev.flatlaf.ui.FlatMenuBarUI
#---- MenuItem ----
MenuItem.acceleratorDelimiter -
-MenuItem.acceleratorFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+MenuItem.acceleratorFont [active] $defaultFont [UI]
MenuItem.acceleratorForeground #505050 javax.swing.plaf.ColorUIResource [UI]
MenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -516,7 +516,7 @@ MenuItem.background #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMenuItemBorder [UI]
MenuItem.borderPainted true
MenuItem.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-MenuItem.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+MenuItem.font [active] $defaultFont [UI]
MenuItem.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
MenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
MenuItem.opaque false
@@ -570,7 +570,7 @@ OptionPane.buttonMinimumWidth [active] 72
OptionPane.buttonOrientation 4
OptionPane.buttonPadding 8
OptionPane.errorIcon [lazy] 32,32 com.formdev.flatlaf.icons.FlatOptionPaneErrorIcon [UI]
-OptionPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+OptionPane.font [active] $defaultFont [UI]
OptionPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
OptionPane.iconMessageGap 16
OptionPane.informationIcon [lazy] 32,32 com.formdev.flatlaf.icons.FlatOptionPaneInformationIcon [UI]
@@ -591,7 +591,7 @@ OptionPaneUI com.formdev.flatlaf.ui.FlatOptionPaneUI
#---- Panel ----
Panel.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-Panel.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Panel.font [active] $defaultFont [UI]
Panel.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
PanelUI com.formdev.flatlaf.ui.FlatPanelUI
@@ -606,7 +606,7 @@ PasswordField.caretBlinkRate 500
PasswordField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
PasswordField.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
PasswordField.echoChar '\u2022'
-PasswordField.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+PasswordField.font [active] $defaultFont [UI]
PasswordField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -624,7 +624,7 @@ PopupMenu.border [lazy] 4,1,4,1 false com.formdev.flatlaf.ui.F
PopupMenu.borderColor #adadad javax.swing.plaf.ColorUIResource [UI]
PopupMenu.borderInsets 4,1,4,1 javax.swing.plaf.InsetsUIResource [UI]
PopupMenu.consumeEventOnClose false
-PopupMenu.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+PopupMenu.font [active] $defaultFont [UI]
PopupMenu.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
@@ -649,7 +649,7 @@ ProgressBar.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
ProgressBar.cellLength 1
ProgressBar.cellSpacing 0
ProgressBar.cycleTime 4000
-ProgressBar.font Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
ProgressBar.foreground #1e82e6 javax.swing.plaf.ColorUIResource [UI]
ProgressBar.horizontalSize 146,4 javax.swing.plaf.DimensionUIResource [UI]
ProgressBar.repaintInterval 15
@@ -665,7 +665,7 @@ RadioButton.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
RadioButton.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
RadioButton.darkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI]
RadioButton.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-RadioButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+RadioButton.font [active] $defaultFont [UI]
RadioButton.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
RadioButton.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
RadioButton.icon.centerDiameter 8
@@ -681,7 +681,7 @@ RadioButton.textShiftOffset 0
#---- RadioButtonMenuItem ----
-RadioButtonMenuItem.acceleratorFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+RadioButtonMenuItem.acceleratorFont [active] $defaultFont [UI]
RadioButtonMenuItem.acceleratorForeground #505050 javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.arrowIcon [lazy] 6,10 com.formdev.flatlaf.icons.FlatMenuItemArrowIcon [UI]
@@ -690,7 +690,7 @@ RadioButtonMenuItem.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
RadioButtonMenuItem.borderPainted true
RadioButtonMenuItem.checkIcon [lazy] 15,15 com.formdev.flatlaf.icons.FlatRadioButtonMenuItemIcon [UI]
RadioButtonMenuItem.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-RadioButtonMenuItem.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+RadioButtonMenuItem.font [active] $defaultFont [UI]
RadioButtonMenuItem.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.margin 2,8,2,8 javax.swing.plaf.InsetsUIResource [UI]
RadioButtonMenuItem.opaque false
@@ -751,7 +751,7 @@ ScrollBarUI com.formdev.flatlaf.ui.FlatScrollBarUI
ScrollPane.background #f5f5f5 javax.swing.plaf.ColorUIResource [UI]
ScrollPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI]
ScrollPane.fillUpperCorner true
-ScrollPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ScrollPane.font [active] $defaultFont [UI]
ScrollPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ScrollPane.smoothScrolling true
ScrollPaneUI com.formdev.flatlaf.ui.FlatScrollPaneUI
@@ -775,7 +775,7 @@ Slider.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
Slider.disabledForeground #c0c0c0 javax.swing.plaf.ColorUIResource [UI]
Slider.focus #9e9e9e javax.swing.plaf.ColorUIResource [UI]
Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
-Slider.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Slider.font [active] $defaultFont [UI]
Slider.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Slider.horizontalSize 200,21 java.awt.Dimension
@@ -806,7 +806,7 @@ Spinner.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
Spinner.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
Spinner.editorAlignment 11
Spinner.editorBorderPainted false
-Spinner.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Spinner.font [active] $defaultFont [UI]
Spinner.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Spinner.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
SpinnerUI com.formdev.flatlaf.ui.FlatSpinnerUI
@@ -848,7 +848,7 @@ TabbedPane.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
TabbedPane.disabledUnderlineColor #ababab javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focus #000000 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focusColor #dae4ed javax.swing.plaf.ColorUIResource [UI]
-TabbedPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TabbedPane.font [active] $defaultFont [UI]
TabbedPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.hasFullBorder false
TabbedPane.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
@@ -887,7 +887,7 @@ Table.focusCellBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
Table.focusCellForeground #000000 javax.swing.plaf.ColorUIResource [UI]
Table.focusCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Focused [UI]
Table.focusSelectedCellHighlightBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Selected [UI]
-Table.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Table.font [active] $defaultFont [UI]
Table.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Table.gridColor #f7f7f7 javax.swing.plaf.ColorUIResource [UI]
Table.intercellSpacing 0,0 javax.swing.plaf.DimensionUIResource [UI]
@@ -908,7 +908,7 @@ TableHeader.background #ffffff javax.swing.plaf.ColorUIResource [UI]
TableHeader.bottomSeparatorColor #e6e6e6 javax.swing.plaf.ColorUIResource [UI]
TableHeader.cellBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatEmptyBorder [UI]
TableHeader.focusCellBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
-TableHeader.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TableHeader.font [active] $defaultFont [UI]
TableHeader.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TableHeader.height 25
TableHeader.separatorColor #e6e6e6 javax.swing.plaf.ColorUIResource [UI]
@@ -946,7 +946,7 @@ TextArea.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
TextArea.caretBlinkRate 500
TextArea.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextArea.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-TextArea.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TextArea.font [active] $defaultFont [UI]
TextArea.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -970,7 +970,7 @@ TextField.caretBlinkRate 500
TextField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextField.darkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI]
TextField.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-TextField.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TextField.font [active] $defaultFont [UI]
TextField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextField.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
TextField.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
@@ -991,7 +991,7 @@ TextPane.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.F
TextPane.caretBlinkRate 500
TextPane.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextPane.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-TextPane.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TextPane.font [active] $defaultFont [UI]
TextPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -1004,7 +1004,7 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
#---- TitledBorder ----
TitledBorder.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI]
-TitledBorder.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+TitledBorder.font [active] $defaultFont [UI]
TitledBorder.titleColor #000000 javax.swing.plaf.ColorUIResource [UI]
@@ -1020,7 +1020,7 @@ ToggleButton.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
ToggleButton.darkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI]
ToggleButton.disabledSelectedBackground #dfdfdf javax.swing.plaf.ColorUIResource [UI]
ToggleButton.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-ToggleButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ToggleButton.font [active] $defaultFont [UI]
ToggleButton.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
ToggleButton.iconTextGap 4
@@ -1054,7 +1054,7 @@ ToolBar.dockingBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ToolBar.dockingForeground #000000 javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
-ToolBar.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ToolBar.font [active] $defaultFont [UI]
ToolBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ToolBar.gripColor #afafaf javax.swing.plaf.ColorUIResource [UI]
ToolBar.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
@@ -1081,7 +1081,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
ToolTip.background #fafafa javax.swing.plaf.ColorUIResource [UI]
ToolTip.backgroundInactive #fafafa javax.swing.plaf.ColorUIResource [UI]
ToolTip.border [lazy] 4,6,4,6 false com.formdev.flatlaf.ui.FlatLineBorder [UI]
-ToolTip.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ToolTip.font [active] $defaultFont [UI]
ToolTip.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ToolTip.foregroundInactive #8c8c8c javax.swing.plaf.ColorUIResource [UI]
@@ -1109,7 +1109,7 @@ Tree.dropCellForeground [lazy] #ffffff javax.swing.plaf.ColorUIResourc
Tree.dropLineColor [lazy] #6aa7e1 javax.swing.plaf.ColorUIResource [UI]
Tree.editorBorder [lazy] line: #000000 java.awt.Color 1 false 1,1,1,1 true javax.swing.plaf.BorderUIResource$LineBorderUIResource [UI]
Tree.expandedIcon [lazy] 11,11 com.formdev.flatlaf.icons.FlatTreeExpandedIcon [UI]
-Tree.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Tree.font [active] $defaultFont [UI]
Tree.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Tree.hash #e6e6e6 javax.swing.plaf.ColorUIResource [UI]
Tree.icon.closedColor #afafaf javax.swing.plaf.ColorUIResource [UI]
@@ -1143,7 +1143,7 @@ TreeUI com.formdev.flatlaf.ui.FlatTreeUI
#---- Viewport ----
Viewport.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
-Viewport.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+Viewport.font [active] $defaultFont [UI]
Viewport.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
@@ -1159,6 +1159,7 @@ controlHighlight #e3e3e3 javax.swing.plaf.ColorUIResource [UI]
controlLtHighlight #ffffff javax.swing.plaf.ColorUIResource [UI]
controlShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
controlText #000000 javax.swing.plaf.ColorUIResource [UI]
+defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
desktop #ffffff javax.swing.plaf.ColorUIResource [UI]
From 9429ba7d489d64d4547259ac85fb416dcf12ba67 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Tue, 31 Mar 2020 12:17:05 +0200
Subject: [PATCH 023/500] support specifying custom scale factor in system
property `flatlaf.uiScale` also for Java 9 and later
---
CHANGELOG.md | 2 ++
.../src/main/java/com/formdev/flatlaf/util/UIScale.java | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6c2c165a..ffa4d9e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ FlatLaf Change Log
- Support changing default font used for all components with automatic scaling
UI if using larger font. Use `UIManager.put( "defaultFont", myFont );`
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
+- Support specifying custom scale factor in system property `flatlaf.uiScale`
+ also for Java 9 and later.
- Demo: Support using own FlatLaf themes (`.properties` files) that are located
in working directory of Demo application. Shown in the "Themes" list under
category "Current Directory".
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
index 8ae5250d..2338f25e 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java
@@ -204,9 +204,6 @@ public class UIScale
* to the given font.
*/
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
- if( UIScale.isSystemScalingEnabled() )
- return font;
-
String uiScale = System.getProperty( "flatlaf.uiScale" );
float scaleFactor = parseScaleFactor( uiScale );
if( scaleFactor <= 0 )
From 97d5792341b91397d3fb647b8eaefacf7ecdbf0a Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Tue, 31 Mar 2020 17:29:12 +0200
Subject: [PATCH 024/500] ComboBox: made class FlatComboPopup protected to
allow subclassing (issue #80)
---
.../src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
index 5d95d0a5..49143807 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
@@ -460,12 +460,12 @@ public class FlatComboBoxUI
//---- class FlatComboPopup -----------------------------------------------
@SuppressWarnings( { "rawtypes", "unchecked" } )
- private class FlatComboPopup
+ protected class FlatComboPopup
extends BasicComboPopup
{
private CellPaddingBorder paddingBorder;
- FlatComboPopup( JComboBox combo ) {
+ protected FlatComboPopup( JComboBox combo ) {
super( combo );
// BasicComboPopup listens to JComboBox.componentOrientation and updates
From d094709dc86094bb55d0f3ee9358cf71be03b4d4 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Tue, 31 Mar 2020 18:53:55 +0200
Subject: [PATCH 025/500] ComboBox: no longer ignore
`JComboBox.prototypeDisplayValue` when computing popup width (issue #80)
---
CHANGELOG.md | 2 ++
.../main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java | 7 +------
.../com/formdev/flatlaf/demo/BasicComponentsPanel.java | 3 +--
.../java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd | 3 +--
.../com/formdev/flatlaf/testing/FlatComponentsTest.java | 3 +--
.../com/formdev/flatlaf/testing/FlatComponentsTest.jfd | 3 +--
6 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ffa4d9e9..20df43d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@ FlatLaf Change Log
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
on JetBrains Runtime. (issue #69)
- Tree: Fixed repainting wide selection on focus gained/lost.
+- ComboBox: No longer ignore `JComboBox.prototypeDisplayValue` when computing
+ popup width. (issue #80)
- Support changing default font used for all components with automatic scaling
UI if using larger font. Use `UIManager.put( "defaultFont", myFont );`
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
index 49143807..c7730e34 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java
@@ -480,13 +480,8 @@ public class FlatComboBoxUI
@Override
protected Rectangle computePopupBounds( int px, int py, int pw, int ph ) {
- // get maximum display size of all items, ignoring prototype value
- Object prototype = comboBox.getPrototypeDisplayValue();
- if( prototype != null )
- comboBox.setPrototypeDisplayValue( null );
+ // get maximum display size of all items
Dimension displaySize = getDisplaySize();
- if( prototype != null )
- comboBox.setPrototypeDisplayValue( prototype );
// make popup wider if necessary
if( displaySize.width > pw ) {
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.java
index 2e73567c..5fea98b5 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.java
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.java
@@ -310,14 +310,13 @@ class BasicComponentsPanel
add(comboBox4, "cell 4 4,growx");
//---- comboBox5 ----
- comboBox5.setPrototypeDisplayValue("12345");
comboBox5.setModel(new DefaultComboBoxModel<>(new String[] {
"wide popup if text is longer",
"aa",
"bbb",
"cccc"
}));
- add(comboBox5, "cell 5 4,growx");
+ add(comboBox5, "cell 5 4,growx,wmax 100");
//---- spinnerLabel ----
spinnerLabel.setText("JSpinner:");
diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd
index 81c6bb83..cf19d4ca 100644
--- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd
+++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/BasicComponentsPanel.jfd
@@ -242,7 +242,6 @@ new FormModel {
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox5"
- "prototypeDisplayValue": "12345"
"model": new javax.swing.DefaultComboBoxModel {
selectedItem: "wide popup if text is longer"
addElement( "wide popup if text is longer" )
@@ -251,7 +250,7 @@ new FormModel {
addElement( "cccc" )
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 5 4,growx"
+ "value": "cell 5 4,growx,wmax 100"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "spinnerLabel"
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java
index 69847c07..c7767e1d 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.java
@@ -513,14 +513,13 @@ public class FlatComponentsTest
add(comboBox4, "cell 4 5,growx");
//---- comboBox5 ----
- comboBox5.setPrototypeDisplayValue("12345");
comboBox5.setModel(new DefaultComboBoxModel<>(new String[] {
"wide popup if text is longer",
"aa",
"bbb",
"cccc"
}));
- add(comboBox5, "cell 5 5,growx");
+ add(comboBox5, "cell 5 5,growx,wmax 100");
//---- spinnerLabel ----
spinnerLabel.setText("JSpinner:");
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd
index 28154222..1daebf5f 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponentsTest.jfd
@@ -373,7 +373,6 @@ new FormModel {
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox5"
- "prototypeDisplayValue": "12345"
"model": new javax.swing.DefaultComboBoxModel {
selectedItem: "wide popup if text is longer"
addElement( "wide popup if text is longer" )
@@ -382,7 +381,7 @@ new FormModel {
addElement( "cccc" )
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
- "value": "cell 5 5,growx"
+ "value": "cell 5 5,growx,wmax 100"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "spinnerLabel"
From 152f235ca189b6346a1f973501d6dcd1e52c96f2 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Wed, 1 Apr 2020 23:26:47 +0200
Subject: [PATCH 026/500] release 0.29
---
CHANGELOG.md | 2 +-
build.gradle.kts | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 20df43d0..47e6c334 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,7 @@
FlatLaf Change Log
==================
-## Unreleased
+## 0.29
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
on JetBrains Runtime. (issue #69)
diff --git a/build.gradle.kts b/build.gradle.kts
index 9d44f41b..41a504df 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-val releaseVersion = "0.28"
-val developmentVersion = "0.29-SNAPSHOT"
+val releaseVersion = "0.29"
+val developmentVersion = "0.30-SNAPSHOT"
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
From 204da2175b42bcaf8665a70a1d8b46bb1ad150f0 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sat, 4 Apr 2020 14:13:20 +0200
Subject: [PATCH 027/500] Theme Editor: initial commit
---
flatlaf-theme-editor/build.gradle.kts | 25 ++++++
.../themeeditor/FlatSyntaxTextArea.java | 31 +++++++
.../themeeditor/FlatThemeEditorPane.java | 66 ++++++++++++++
.../themeeditor/FlatThemeFileEditor.java | 87 +++++++++++++++++++
.../themeeditor/FlatThemeFileEditor.jfd | 27 ++++++
settings.gradle.kts | 1 +
6 files changed, 237 insertions(+)
create mode 100644 flatlaf-theme-editor/build.gradle.kts
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd
diff --git a/flatlaf-theme-editor/build.gradle.kts b/flatlaf-theme-editor/build.gradle.kts
new file mode 100644
index 00000000..e40fb7bc
--- /dev/null
+++ b/flatlaf-theme-editor/build.gradle.kts
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+plugins {
+ `java-library`
+}
+
+dependencies {
+ implementation( project( ":flatlaf-core" ) )
+
+ implementation( "com.fifesoft:rsyntaxtextarea:3.1.0" )
+}
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java
new file mode 100644
index 00000000..755edbd5
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java
@@ -0,0 +1,31 @@
+/*
+ * 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.themeeditor;
+
+import org.fife.ui.rsyntaxtextarea.TextEditorPane;
+
+/**
+ * A text area that supports editing FlatLaf themes.
+ *
+ * @author Karl Tauber
+ */
+class FlatSyntaxTextArea
+ extends TextEditorPane
+{
+ FlatSyntaxTextArea() {
+ }
+}
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
new file mode 100644
index 00000000..8aa40543
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
@@ -0,0 +1,66 @@
+/*
+ * 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.themeeditor;
+
+import java.awt.BorderLayout;
+import java.awt.Font;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import javax.swing.JPanel;
+import org.fife.ui.rsyntaxtextarea.FileLocation;
+import org.fife.ui.rtextarea.RTextScrollPane;
+import com.formdev.flatlaf.util.UIScale;
+
+/**
+ * A pane that supports editing FlatLaf themes.
+ *
+ * @author Karl Tauber
+ */
+class FlatThemeEditorPane
+ extends JPanel
+{
+ private final RTextScrollPane scrollPane;
+ private final FlatSyntaxTextArea textArea;
+
+ FlatThemeEditorPane() {
+ super( new BorderLayout() );
+
+ // create text area
+ textArea = new FlatSyntaxTextArea();
+
+ // create scroll pane
+ scrollPane = new RTextScrollPane( textArea );
+ scrollPane.setLineNumbersEnabled( true );
+
+ // scale fonts
+ if( UIScale.getUserScaleFactor() != 1 ) {
+ textArea.setFont( scaleFont( textArea.getFont() ) );
+ scrollPane.getGutter().setLineNumberFont( scaleFont( scrollPane.getGutter().getLineNumberFont() ) );
+ }
+
+ add( scrollPane, BorderLayout.CENTER );
+ }
+
+ private static Font scaleFont( Font font ) {
+ int newFontSize = UIScale.scale( font.getSize() );
+ return font.deriveFont( (float) newFontSize );
+ }
+
+ public void load( FileLocation loc ) throws IOException {
+ textArea.load( loc, StandardCharsets.ISO_8859_1 );
+ }
+}
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java
new file mode 100644
index 00000000..71f1e2b7
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java
@@ -0,0 +1,87 @@
+/*
+ * 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.themeeditor;
+
+import java.awt.*;
+import java.io.File;
+import java.io.IOException;
+import javax.swing.*;
+import org.fife.ui.rsyntaxtextarea.FileLocation;
+import com.formdev.flatlaf.FlatLightLaf;
+import com.formdev.flatlaf.util.UIScale;
+
+/**
+ * TODO
+ *
+ * @author Karl Tauber
+ */
+public class FlatThemeFileEditor
+ extends JFrame
+{
+ public static void main( String[] args ) {
+ File file = new File( args.length > 0
+ ? args[0]
+ : "../flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties" ); // TODO
+
+ SwingUtilities.invokeLater( () -> {
+ FlatLightLaf.install();
+
+ FlatThemeFileEditor frame = new FlatThemeFileEditor();
+
+ try {
+ frame.themeEditorArea.load( FileLocation.create( file ) );
+ } catch( IOException ex ) {
+ ex.printStackTrace();
+ }
+
+ Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+ frame.setSize( Math.min( UIScale.scale( 800 ), screenSize.width ),
+ screenSize.height - UIScale.scale( 100 ) );
+ frame.setLocationRelativeTo( null );
+ frame.setVisible( true );
+ } );
+ }
+
+ public FlatThemeFileEditor() {
+ initComponents();
+ }
+
+ private void initComponents() {
+ // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
+ dialogPane = new JPanel();
+ themeEditorArea = new FlatThemeEditorPane();
+
+ //======== this ========
+ setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("FlatLaf Theme Editor");
+ Container contentPane = getContentPane();
+ contentPane.setLayout(new BorderLayout());
+
+ //======== dialogPane ========
+ {
+ dialogPane.setLayout(new BorderLayout());
+ dialogPane.add(themeEditorArea, BorderLayout.CENTER);
+ }
+ contentPane.add(dialogPane, BorderLayout.CENTER);
+ // JFormDesigner - End of component initialization //GEN-END:initComponents
+ }
+
+ // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
+ private JPanel dialogPane;
+ private FlatThemeEditorPane themeEditorArea;
+ // JFormDesigner - End of variables declaration //GEN-END:variables
+}
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd
new file mode 100644
index 00000000..be2a9cdd
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.jfd
@@ -0,0 +1,27 @@
+JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.1" encoding: "UTF-8"
+
+new FormModel {
+ contentType: "form/swing"
+ root: new FormRoot {
+ add( new FormWindow( "javax.swing.JFrame", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "this"
+ "$locationPolicy": 2
+ "$sizePolicy": 2
+ "defaultCloseOperation": 2
+ "title": "FlatLaf Theme Editor"
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
+ name: "dialogPane"
+ add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemeEditorPane" ) {
+ name: "themeEditorArea"
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( class java.lang.String ) {
+ "value": "Center"
+ } )
+ }, new FormLayoutConstraints( null ) {
+ "location": new java.awt.Point( 0, 0 )
+ "size": new java.awt.Dimension( 535, 300 )
+ } )
+ }
+}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 1dfc5794..c325a9d7 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -22,6 +22,7 @@ include( "flatlaf-swingx" )
include( "flatlaf-jide-oss" )
include( "flatlaf-demo" )
include( "flatlaf-testing" )
+include( "flatlaf-theme-editor" )
pluginManagement {
plugins {
From d59d353c2e38d4195c6b33bb83ab66728e27f123 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sat, 4 Apr 2020 23:32:48 +0200
Subject: [PATCH 028/500] Theme Editor: added token maker (based on .properties
token maker)
---
.../themeeditor/FlatThemeEditorPane.java | 9 +
.../themeeditor/FlatThemeFileEditor.java | 2 +-
.../themeeditor/FlatThemeTokenMaker.java | 191 ++++++++++++++++++
.../theme-editor-test.properties | 40 ++++
4 files changed, 241 insertions(+), 1 deletion(-)
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
create mode 100644 flatlaf-theme-editor/theme-editor-test.properties
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
index 8aa40543..99387bb2 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
@@ -21,7 +21,9 @@ import java.awt.Font;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import javax.swing.JPanel;
+import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory;
import org.fife.ui.rsyntaxtextarea.FileLocation;
+import org.fife.ui.rsyntaxtextarea.TokenMakerFactory;
import org.fife.ui.rtextarea.RTextScrollPane;
import com.formdev.flatlaf.util.UIScale;
@@ -33,14 +35,21 @@ import com.formdev.flatlaf.util.UIScale;
class FlatThemeEditorPane
extends JPanel
{
+ private static final String FLATLAF_STYLE = "text/flatlaf";
+
private final RTextScrollPane scrollPane;
private final FlatSyntaxTextArea textArea;
FlatThemeEditorPane() {
super( new BorderLayout() );
+ // register FlatLaf token maker
+ AbstractTokenMakerFactory tmf = (AbstractTokenMakerFactory) TokenMakerFactory.getDefaultInstance();
+ tmf.putMapping( FLATLAF_STYLE, FlatThemeTokenMaker.class.getName() );
+
// create text area
textArea = new FlatSyntaxTextArea();
+ textArea.setSyntaxEditingStyle( FLATLAF_STYLE );
// create scroll pane
scrollPane = new RTextScrollPane( textArea );
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java
index 71f1e2b7..18e453aa 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeFileEditor.java
@@ -35,7 +35,7 @@ public class FlatThemeFileEditor
public static void main( String[] args ) {
File file = new File( args.length > 0
? args[0]
- : "../flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties" ); // TODO
+ : "theme-editor-test.properties" ); // TODO
SwingUtilities.invokeLater( () -> {
FlatLightLaf.install();
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
new file mode 100644
index 00000000..47a51831
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
@@ -0,0 +1,191 @@
+/*
+ * 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.themeeditor;
+
+import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities;
+import org.fife.ui.rsyntaxtextarea.Token;
+import org.fife.ui.rsyntaxtextarea.TokenMap;
+import org.fife.ui.rsyntaxtextarea.TokenTypes;
+import org.fife.ui.rsyntaxtextarea.modes.PropertiesFileTokenMaker;
+
+/**
+ * Token maker for FlatLaf properties files.
+ *
+ * Lets the super class parse the properties file and modify the added tokens.
+ * The super class uses {@link TokenTypes#RESERVED_WORD} for property keys and
+ * {@link TokenTypes#LITERAL_STRING_DOUBLE_QUOTE} for property values.
+ *
+ * @author Karl Tauber
+ */
+public class FlatThemeTokenMaker
+ extends PropertiesFileTokenMaker
+{
+ private static final int TOKEN_PROPERTY = Token.IDENTIFIER;
+ private static final int TOKEN_VARIABLE = Token.VARIABLE;
+ private static final int TOKEN_NUMBER = Token.LITERAL_NUMBER_DECIMAL_INT;
+ private static final int TOKEN_COLOR = Token.LITERAL_NUMBER_HEXADECIMAL;
+ private static final int TOKEN_STRING = Token.LITERAL_STRING_DOUBLE_QUOTE;
+ private static final int TOKEN_FUNCTION = Token.FUNCTION;
+ private static final int TOKEN_TYPE = Token.DATA_TYPE;
+
+ private final TokenMap tokenMap = new TokenMap();
+
+ public FlatThemeTokenMaker() {
+ // null, false, true
+ tokenMap.put( "null", Token.RESERVED_WORD );
+ tokenMap.put( "false", Token.LITERAL_BOOLEAN );
+ tokenMap.put( "true", Token.LITERAL_BOOLEAN );
+
+ // functions
+ tokenMap.put( "rgb", TOKEN_FUNCTION );
+ tokenMap.put( "rgba", TOKEN_FUNCTION );
+ tokenMap.put( "hsl", TOKEN_FUNCTION );
+ tokenMap.put( "hsla", TOKEN_FUNCTION );
+ tokenMap.put( "lighten", TOKEN_FUNCTION );
+ tokenMap.put( "darken", TOKEN_FUNCTION );
+ tokenMap.put( "lazy", TOKEN_FUNCTION );
+
+ // function options
+ tokenMap.put( "relative", Token.RESERVED_WORD );
+ tokenMap.put( "autoInverse", Token.RESERVED_WORD );
+ }
+
+ /**
+ * This method is only invoked from the super class.
+ */
+ @Override
+ public void addToken( char[] array, int start, int end, int tokenType, int startOffset, boolean hyperlink ) {
+// debugInputToken( array, start, end, tokenType, startOffset, hyperlink );
+
+ // ignore invalid token
+ if( end < start )
+ return;
+
+ if( tokenType == Token.RESERVED_WORD ) {
+ // key
+ int newTokenType = (array[start] == '@') ? TOKEN_VARIABLE : TOKEN_PROPERTY;
+ super.addToken( array, start, end, newTokenType, startOffset, hyperlink );
+ } else if( tokenType == Token.LITERAL_STRING_DOUBLE_QUOTE ) {
+ // value
+ tokenizeValue( array, start, end, startOffset );
+ } else if( tokenType == Token.VARIABLE ) {
+ // '{variable}'
+ super.addToken( array, start, end, TOKEN_TYPE, startOffset, hyperlink );
+ } else {
+ // comments or operators
+ super.addToken( array, start, end, tokenType, startOffset, hyperlink );
+ }
+ }
+
+ private void tokenizeValue( char[] array, int start, int end, int startOffset ) {
+ int newStartOffset = startOffset - start;
+
+ int currentTokenStart = start;
+ int currentTokenType = Token.NULL;
+
+ for( int i = start; i <= end; i++ ) {
+ int newTokenType;
+ char ch = array[i];
+ if( ch <= ' ' )
+ newTokenType = Token.WHITESPACE;
+ else if( ch == '#' || (currentTokenType == TOKEN_COLOR && RSyntaxUtilities.isHexCharacter( ch )) )
+ newTokenType = TOKEN_COLOR;
+ else if( ch == '$' || (currentTokenType == TOKEN_PROPERTY && isPropertyChar( ch )) )
+ newTokenType = TOKEN_PROPERTY;
+ else if( ch == '@' || (currentTokenType == TOKEN_VARIABLE && isPropertyChar( ch )) )
+ newTokenType = TOKEN_VARIABLE;
+ else if( currentTokenType != TOKEN_STRING && (RSyntaxUtilities.isDigit( ch ) || (currentTokenType == TOKEN_NUMBER && ch == '.')) )
+ newTokenType = TOKEN_NUMBER;
+ else if( ch == ',' || ch == '(' || ch == ')' || ch == '"' || ch == '%' )
+ newTokenType = TokenTypes.OPERATOR;
+ else
+ newTokenType = TOKEN_STRING;
+
+ if( currentTokenType == Token.NULL )
+ currentTokenType = newTokenType;
+ else if( newTokenType != currentTokenType ) {
+ addTokenImpl( array, currentTokenStart, i - 1, currentTokenType, newStartOffset + currentTokenStart );
+ currentTokenType = newTokenType;
+ currentTokenStart = i;
+ }
+ }
+
+ if( currentTokenType != Token.NULL )
+ addTokenImpl( array, currentTokenStart, end, currentTokenType, newStartOffset + currentTokenStart );
+ }
+
+ private void addTokenImpl( char[] array, int start, int end, int tokenType, int startOffset ) {
+ if( tokenType == TOKEN_STRING ) {
+ int type = tokenMap.get( array, start, end );
+ if( type != -1 )
+ tokenType = type;
+ }
+
+// debugOutputToken( array, start, end, tokenType );
+ super.addToken( array, start, end, tokenType, startOffset, false );
+ }
+
+ private boolean isPropertyChar( char ch ) {
+ return RSyntaxUtilities.isLetterOrDigit( ch ) || ch == '.' || ch == '_' || ch == '-';
+ }
+
+/*debug
+ private java.util.HashMap tokenTypeStrMap;
+
+ private void debugInputToken( char[] array, int start, int end, int tokenType, int startOffset, boolean hyperlink ) {
+ if( tokenTypeStrMap == null ) {
+ tokenTypeStrMap = new java.util.HashMap<>();
+ for( java.lang.reflect.Field f : TokenTypes.class.getFields() ) {
+ try {
+ tokenTypeStrMap.put( (Integer) f.get( null ), f.getName() );
+ } catch( IllegalArgumentException | IllegalAccessException ex ) {
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ String tokenTypeStr = tokenTypeStrMap.computeIfAbsent( tokenType, t -> {
+ return "(unknown " + t + ")";
+ } );
+
+ System.out.printf( "%d-%d (%d) %-30s '%s'\n",
+ start, end, end - start, tokenTypeStr, new String( array, start, end - start + 1 ) );
+ }
+
+ private void debugOutputToken( char[] array, int start, int end, int tokenType ) {
+ String tokenTypeStr = null;
+ switch( tokenType ) {
+ case TOKEN_PROPERTY: tokenTypeStr = "PROPERTY"; break;
+ case TOKEN_VARIABLE: tokenTypeStr = "VARIABLE"; break;
+ case TOKEN_NUMBER: tokenTypeStr = "NUMBER"; break;
+ case TOKEN_COLOR: tokenTypeStr = "COLOR"; break;
+ case TOKEN_STRING: tokenTypeStr = "STRING"; break;
+ case TOKEN_FUNCTION: tokenTypeStr = "FUNCTION"; break;
+ case TOKEN_TYPE: tokenTypeStr = "TYPE"; break;
+ case TokenTypes.OPERATOR: tokenTypeStr = "OPERATOR"; break;
+ case TokenTypes.WHITESPACE: tokenTypeStr = "WHITESPACE"; break;
+ case TokenTypes.LITERAL_BOOLEAN: tokenTypeStr = "BOOLEAN"; break;
+ case TokenTypes.RESERVED_WORD: tokenTypeStr = "RESERVED_WORD"; break;
+ default:
+ throw new IllegalArgumentException( String.valueOf( tokenType ) );
+ }
+
+ System.out.printf( " %d-%d (%d) %-15s '%s'\n",
+ start, end, end - start, tokenTypeStr, new String( array, start, end - start + 1 ) );
+ }
+debug*/
+}
diff --git a/flatlaf-theme-editor/theme-editor-test.properties b/flatlaf-theme-editor/theme-editor-test.properties
new file mode 100644
index 00000000..18bf541b
--- /dev/null
+++ b/flatlaf-theme-editor/theme-editor-test.properties
@@ -0,0 +1,40 @@
+#
+# some comment
+#
+
+ButtonUI=com.formdev.flatlaf.ui.FlatButtonUI
+ CheckBoxUI = com.formdev.flatlaf.ui.FlatCheckBoxUI
+
+Prop.string=some string
+Prop.string2="some string 123 #f80"
+Prop.char1=x
+Prop.char2=\u2022
+Prop.integer=123
+Prop.float=456.123
+Prop.color1=#f80
+Prop.color2=#ff8800
+Prop.color3=#f804
+Prop.color4=#ff880044
+Prop.border=1,2,3,4
+
+Prop.scaledInteger={scaledInteger}123
+
+Prop.null=null
+Prop.false=false
+Prop.true=true
+
+@var1=123
+Prop.var=@var1
+Prop.ref=$Prop.string
+
+Prop.lazy=lazy(Prop.string)
+
+Prop.colorFunc1=rgb(12,34,56)
+Prop.colorFunc2=rgba(12,34,56,78)
+Prop.colorFunc3=hsl(12,34,56)
+Prop.colorFunc4=hsla(12,34,56,78)
+
+Prop.colorFunc5=lighten(#fe1289,20%)
+Prop.colorFunc6=darken(#fe1289,20%)
+Prop.colorFunc7=lighten($Prop.colorFunc4,20%,relative autoInverse)
+Prop.colorFunc8=lighten(Prop.colorFunc4,20%,lazy)
From 54c14d0dc803ca0f4b19b548e4f5c8bcca7bc2b8 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 5 Apr 2020 11:52:31 +0200
Subject: [PATCH 029/500] Theme Editor: added editor theme
---
.../themeeditor/FlatThemeEditorPane.java | 9 +++
.../com/formdev/flatlaf/themeeditor/light.xml | 78 +++++++++++++++++++
2 files changed, 87 insertions(+)
create mode 100644 flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
index 99387bb2..b201452f 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
@@ -23,6 +23,7 @@ import java.nio.charset.StandardCharsets;
import javax.swing.JPanel;
import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory;
import org.fife.ui.rsyntaxtextarea.FileLocation;
+import org.fife.ui.rsyntaxtextarea.Theme;
import org.fife.ui.rsyntaxtextarea.TokenMakerFactory;
import org.fife.ui.rtextarea.RTextScrollPane;
import com.formdev.flatlaf.util.UIScale;
@@ -51,6 +52,14 @@ class FlatThemeEditorPane
textArea = new FlatSyntaxTextArea();
textArea.setSyntaxEditingStyle( FLATLAF_STYLE );
+ // theme
+ try {
+ Theme theme = Theme.load( getClass().getResourceAsStream( "light.xml" ) );
+ theme.apply( textArea );
+ } catch( IOException ex ) {
+ ex.printStackTrace();
+ }
+
// create scroll pane
scrollPane = new RTextScrollPane( textArea );
scrollPane.setLineNumbersEnabled( true );
diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml
new file mode 100644
index 00000000..9b566345
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 266e9d92d5d65f20b9a8dce27b14d101d5bac6f6 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 5 Apr 2020 14:37:25 +0200
Subject: [PATCH 030/500] Theme Editor: enabled mark occurrences
---
.../themeeditor/FlatThemeEditorPane.java | 9 ++++++
.../themeeditor/FlatThemeTokenMaker.java | 29 ++++++++++++++-----
.../com/formdev/flatlaf/themeeditor/light.xml | 4 +--
3 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
index b201452f..4500c18e 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
@@ -17,12 +17,14 @@
package com.formdev.flatlaf.themeeditor;
import java.awt.BorderLayout;
+import java.awt.Color;
import java.awt.Font;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import javax.swing.JPanel;
import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory;
import org.fife.ui.rsyntaxtextarea.FileLocation;
+import org.fife.ui.rsyntaxtextarea.SyntaxScheme;
import org.fife.ui.rsyntaxtextarea.Theme;
import org.fife.ui.rsyntaxtextarea.TokenMakerFactory;
import org.fife.ui.rtextarea.RTextScrollPane;
@@ -51,6 +53,7 @@ class FlatThemeEditorPane
// create text area
textArea = new FlatSyntaxTextArea();
textArea.setSyntaxEditingStyle( FLATLAF_STYLE );
+ textArea.setMarkOccurrences( true );
// theme
try {
@@ -60,6 +63,12 @@ class FlatThemeEditorPane
ex.printStackTrace();
}
+ // use semitransparent token background because token background
+ // is painted over mark occurrences background
+ SyntaxScheme scheme = textArea.getSyntaxScheme();
+ scheme.getStyle( FlatThemeTokenMaker.TOKEN_COLOR ).background = new Color( 0x0a000000, true );
+ scheme.getStyle( FlatThemeTokenMaker.TOKEN_VARIABLE ).background = new Color( 0x1800cc00, true );
+
// create scroll pane
scrollPane = new RTextScrollPane( textArea );
scrollPane.setLineNumbersEnabled( true );
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
index 47a51831..1d5081dc 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
@@ -34,13 +34,13 @@ import org.fife.ui.rsyntaxtextarea.modes.PropertiesFileTokenMaker;
public class FlatThemeTokenMaker
extends PropertiesFileTokenMaker
{
- private static final int TOKEN_PROPERTY = Token.IDENTIFIER;
- private static final int TOKEN_VARIABLE = Token.VARIABLE;
- private static final int TOKEN_NUMBER = Token.LITERAL_NUMBER_DECIMAL_INT;
- private static final int TOKEN_COLOR = Token.LITERAL_NUMBER_HEXADECIMAL;
- private static final int TOKEN_STRING = Token.LITERAL_STRING_DOUBLE_QUOTE;
- private static final int TOKEN_FUNCTION = Token.FUNCTION;
- private static final int TOKEN_TYPE = Token.DATA_TYPE;
+ static final int TOKEN_PROPERTY = Token.IDENTIFIER;
+ static final int TOKEN_VARIABLE = Token.VARIABLE;
+ static final int TOKEN_NUMBER = Token.LITERAL_NUMBER_DECIMAL_INT;
+ static final int TOKEN_COLOR = Token.LITERAL_NUMBER_HEXADECIMAL;
+ static final int TOKEN_STRING = Token.LITERAL_STRING_DOUBLE_QUOTE;
+ static final int TOKEN_FUNCTION = Token.FUNCTION;
+ static final int TOKEN_TYPE = Token.DATA_TYPE;
private final TokenMap tokenMap = new TokenMap();
@@ -143,6 +143,21 @@ public class FlatThemeTokenMaker
return RSyntaxUtilities.isLetterOrDigit( ch ) || ch == '.' || ch == '_' || ch == '-';
}
+ @Override
+ public boolean getMarkOccurrencesOfTokenType( int type ) {
+ switch( type ) {
+ case TOKEN_PROPERTY:
+ case TOKEN_VARIABLE:
+ case TOKEN_COLOR:
+ case TOKEN_FUNCTION:
+ case TOKEN_TYPE:
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
/*debug
private java.util.HashMap tokenTypeStrMap;
diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml
index 9b566345..22d780ec 100644
--- a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml
+++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/light.xml
@@ -48,7 +48,7 @@
-
+
@@ -66,7 +66,7 @@
-
+
From 4777bdd25003eddc7109389d87e3a15ca066f7e8 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 5 Apr 2020 15:23:40 +0200
Subject: [PATCH 031/500] Theme Editor: do not mark token at caret if it does
not occur elsewhere
---
.../themeeditor/FlatOccurrenceMarker.java | 77 +++++++++++++++++++
.../themeeditor/FlatThemeTokenMaker.java | 6 ++
2 files changed, 83 insertions(+)
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatOccurrenceMarker.java
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatOccurrenceMarker.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatOccurrenceMarker.java
new file mode 100644
index 00000000..872b553a
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatOccurrenceMarker.java
@@ -0,0 +1,77 @@
+/*
+ * 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.themeeditor;
+
+import org.fife.ui.rsyntaxtextarea.OccurrenceMarker;
+import org.fife.ui.rsyntaxtextarea.RSyntaxDocument;
+import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
+import org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaHighlighter;
+import org.fife.ui.rsyntaxtextarea.Token;
+import org.fife.ui.rsyntaxtextarea.TokenImpl;
+import org.fife.ui.rtextarea.SmartHighlightPainter;
+
+/**
+ * Delegating occurrence marker that does not mark token at caret if it does
+ * not occur elsewhere.
+ *
+ * @author Karl Tauber
+ */
+class FlatOccurrenceMarker
+ implements OccurrenceMarker
+{
+ private final OccurrenceMarker delegate;
+
+ FlatOccurrenceMarker( OccurrenceMarker delegate ) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public Token getTokenToMark( RSyntaxTextArea textArea ) {
+ return delegate.getTokenToMark( textArea );
+ }
+
+ @Override
+ public boolean isValidType( RSyntaxTextArea textArea, Token t ) {
+ return delegate.isValidType( textArea, t );
+ }
+
+ @Override
+ public void markOccurrences( RSyntaxDocument doc, Token t, RSyntaxTextAreaHighlighter h, SmartHighlightPainter p ) {
+ char[] lexeme = t.getLexeme().toCharArray();
+ int type = t.getType();
+ int lineCount = doc.getDefaultRootElement().getElementCount();
+
+ // make a copy of the token because it is overwritten in getTokenListForLine()
+ Token t2 = new TokenImpl( t );
+
+ // check whether token occurres more than once
+ boolean mark = false;
+ for( int i = 0; i < lineCount && !mark; i++ ) {
+ Token temp = doc.getTokenListForLine( i );
+ while( temp != null && temp.isPaintable() ) {
+ if( temp.is( type, lexeme ) && temp.getOffset() != t2.getOffset() ) {
+ mark = true;
+ break;
+ }
+ temp = temp.getNextToken();
+ }
+ }
+
+ if( mark )
+ delegate.markOccurrences( doc, t2, h, p );
+ }
+}
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
index 1d5081dc..e0ee4636 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
@@ -16,6 +16,7 @@
package com.formdev.flatlaf.themeeditor;
+import org.fife.ui.rsyntaxtextarea.OccurrenceMarker;
import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities;
import org.fife.ui.rsyntaxtextarea.Token;
import org.fife.ui.rsyntaxtextarea.TokenMap;
@@ -143,6 +144,11 @@ public class FlatThemeTokenMaker
return RSyntaxUtilities.isLetterOrDigit( ch ) || ch == '.' || ch == '_' || ch == '-';
}
+ @Override
+ protected OccurrenceMarker createOccurrenceMarker() {
+ return new FlatOccurrenceMarker( super.createOccurrenceMarker() );
+ }
+
@Override
public boolean getMarkOccurrencesOfTokenType( int type ) {
switch( type ) {
From 78d06d82d6fd5d5a4e6a8ebb98ecb5a156c6f16e Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 5 Apr 2020 17:16:09 +0200
Subject: [PATCH 032/500] Theme Editor: fixed mark occurrences for property
references (starting with '$') and property references in function parameters
---
.../themeeditor/FlatThemeTokenMaker.java | 24 +++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
index e0ee4636..4e322833 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeTokenMaker.java
@@ -97,6 +97,7 @@ public class FlatThemeTokenMaker
int currentTokenStart = start;
int currentTokenType = Token.NULL;
+ int parenthesisLevel = 0;
for( int i = start; i <= end; i++ ) {
int newTokenType;
@@ -119,21 +120,36 @@ public class FlatThemeTokenMaker
if( currentTokenType == Token.NULL )
currentTokenType = newTokenType;
else if( newTokenType != currentTokenType ) {
- addTokenImpl( array, currentTokenStart, i - 1, currentTokenType, newStartOffset + currentTokenStart );
+ addTokenImpl( array, currentTokenStart, i - 1, currentTokenType, newStartOffset + currentTokenStart, parenthesisLevel );
currentTokenType = newTokenType;
currentTokenStart = i;
}
+
+ if( ch == '(' )
+ parenthesisLevel++;
+ else if( ch == ')' )
+ parenthesisLevel--;
}
if( currentTokenType != Token.NULL )
- addTokenImpl( array, currentTokenStart, end, currentTokenType, newStartOffset + currentTokenStart );
+ addTokenImpl( array, currentTokenStart, end, currentTokenType, newStartOffset + currentTokenStart, parenthesisLevel );
}
- private void addTokenImpl( char[] array, int start, int end, int tokenType, int startOffset ) {
- if( tokenType == TOKEN_STRING ) {
+ private void addTokenImpl( char[] array, int start, int end, int tokenType, int startOffset, int parenthesisLevel ) {
+ if( tokenType == TOKEN_PROPERTY && array[start] == '$' ) {
+ // separate '$' from property token for mark occurrences to work
+ super.addToken( array, start, start, TokenTypes.OPERATOR, startOffset, false );
+ start++;
+ startOffset++;
+ } else if( tokenType == TOKEN_STRING ) {
+ // check for reserved words, functions, etc
int type = tokenMap.get( array, start, end );
if( type != -1 )
tokenType = type;
+ else if( parenthesisLevel > 0 ) {
+ // assume property reference if in function parameters
+ tokenType = TOKEN_PROPERTY;
+ }
}
// debugOutputToken( array, start, end, tokenType );
From acb62e347af8294a99e25f85b54dc96b7f9749fb Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 5 Apr 2020 18:04:28 +0200
Subject: [PATCH 033/500] Theme Editor: mark invalid color values with a curly
underline
---
.../flatlaf/UIDefaultsLoaderAccessor.java | 29 +++++++++
.../themeeditor/FlatThemeEditorPane.java | 1 +
.../flatlaf/themeeditor/FlatThemeParser.java | 64 +++++++++++++++++++
.../theme-editor-test.properties | 2 +
4 files changed, 96 insertions(+)
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/UIDefaultsLoaderAccessor.java
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeParser.java
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/UIDefaultsLoaderAccessor.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/UIDefaultsLoaderAccessor.java
new file mode 100644
index 00000000..3c5c8b5b
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/UIDefaultsLoaderAccessor.java
@@ -0,0 +1,29 @@
+/*
+ * 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;
+
+/**
+ * Enable accessing package private methods of {@link UIDefaultsLoader}.
+ *
+ * @author Karl Tauber
+ */
+public class UIDefaultsLoaderAccessor
+{
+ public static int parseColorRGBA( String value ) {
+ return UIDefaultsLoader.parseColorRGBA( value );
+ }
+}
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
index 4500c18e..27de8f8d 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
@@ -54,6 +54,7 @@ class FlatThemeEditorPane
textArea = new FlatSyntaxTextArea();
textArea.setSyntaxEditingStyle( FLATLAF_STYLE );
textArea.setMarkOccurrences( true );
+ textArea.addParser( new FlatThemeParser() );
// theme
try {
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeParser.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeParser.java
new file mode 100644
index 00000000..96f80d95
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeParser.java
@@ -0,0 +1,64 @@
+/*
+ * 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.themeeditor;
+
+import javax.swing.text.Element;
+import org.fife.ui.rsyntaxtextarea.RSyntaxDocument;
+import org.fife.ui.rsyntaxtextarea.Token;
+import org.fife.ui.rsyntaxtextarea.parser.AbstractParser;
+import org.fife.ui.rsyntaxtextarea.parser.DefaultParseResult;
+import org.fife.ui.rsyntaxtextarea.parser.DefaultParserNotice;
+import org.fife.ui.rsyntaxtextarea.parser.ParseResult;
+import com.formdev.flatlaf.UIDefaultsLoaderAccessor;
+
+/**
+ * Parser for FlatLaf properties files that checks for invalid values.
+ *
+ * @author Karl Tauber
+ */
+class FlatThemeParser
+ extends AbstractParser
+{
+ private final DefaultParseResult result;
+
+ FlatThemeParser() {
+ result = new DefaultParseResult( this );
+ }
+
+ @Override
+ public ParseResult parse( RSyntaxDocument doc, String style ) {
+ Element root = doc.getDefaultRootElement();
+
+ result.clearNotices();
+ result.setParsedLines( 0, root.getElementCount() - 1 );
+
+ for( Token token : doc ) {
+ if( token.getType() == FlatThemeTokenMaker.TOKEN_COLOR ) {
+ try {
+ UIDefaultsLoaderAccessor.parseColorRGBA( token.getLexeme() );
+ } catch( IllegalArgumentException ex ) {
+ result.addNotice( new DefaultParserNotice( this,
+ "Invalid color.\n\nUse #RRGGBB, #RRGGBBAA, #RGB or #RGBA",
+ root.getElementIndex( token.getOffset() ),
+ token.getOffset(), token.length() ) );
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/flatlaf-theme-editor/theme-editor-test.properties b/flatlaf-theme-editor/theme-editor-test.properties
index 18bf541b..4fe494bb 100644
--- a/flatlaf-theme-editor/theme-editor-test.properties
+++ b/flatlaf-theme-editor/theme-editor-test.properties
@@ -15,6 +15,8 @@ Prop.color1=#f80
Prop.color2=#ff8800
Prop.color3=#f804
Prop.color4=#ff880044
+Prop.color5=#12
+Prop.color6=#12345
Prop.border=1,2,3,4
Prop.scaledInteger={scaledInteger}123
From 70fed22737e04bbf1fd7f1a77028331e7f76c2dd Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Sun, 5 Apr 2020 23:18:39 +0200
Subject: [PATCH 034/500] Theme Editor: use real colors as background of color
strings
---
.../themeeditor/FlatSyntaxTextArea.java | 76 +++++++++++++++++++
.../themeeditor/FlatThemeEditorPane.java | 1 +
2 files changed, 77 insertions(+)
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java
index 755edbd5..34760888 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatSyntaxTextArea.java
@@ -16,7 +16,13 @@
package com.formdev.flatlaf.themeeditor;
+import java.awt.Color;
+import java.util.HashMap;
+import java.util.Map;
+import javax.swing.text.BadLocationException;
import org.fife.ui.rsyntaxtextarea.TextEditorPane;
+import org.fife.ui.rsyntaxtextarea.Token;
+import com.formdev.flatlaf.UIDefaultsLoaderAccessor;
/**
* A text area that supports editing FlatLaf themes.
@@ -26,6 +32,76 @@ import org.fife.ui.rsyntaxtextarea.TextEditorPane;
class FlatSyntaxTextArea
extends TextEditorPane
{
+ private boolean useColorOfColorTokens;
+
+ private final Map parsedColorsMap = new HashMap<>();
+
FlatSyntaxTextArea() {
}
+
+ boolean isUseColorOfColorTokens() {
+ return useColorOfColorTokens;
+ }
+
+ void setUseColorOfColorTokens( boolean useColorOfColorTokens ) {
+ this.useColorOfColorTokens = useColorOfColorTokens;
+ setHighlightCurrentLine( !useColorOfColorTokens );
+ }
+
+ @Override
+ public Color getBackgroundForToken( Token t ) {
+ if( useColorOfColorTokens && t.getType() == FlatThemeTokenMaker.TOKEN_COLOR ) {
+ Color color = parseColor( t );
+ if( color != null )
+ return color;
+ }
+
+ return super.getBackgroundForToken( t );
+ }
+
+ @Override
+ public Color getForegroundForToken( Token t ) {
+ if( useColorOfColorTokens && t.getType() == FlatThemeTokenMaker.TOKEN_COLOR && !isCurrentLineHighlighted( t.getOffset() )) {
+ Color color = parseColor( t );
+ if( color != null ) {
+ return (colorLuminance( color ) > 164 || color.getAlpha() < 96)
+ ? Color.black
+ : Color.white;
+ }
+ }
+
+ return super.getForegroundForToken( t );
+ }
+
+ private Color parseColor( Token token ) {
+ return parsedColorsMap.computeIfAbsent( token.getLexeme(), s -> {
+ try {
+ return new Color( UIDefaultsLoaderAccessor.parseColorRGBA( s ), true );
+ } catch( IllegalArgumentException ex ) {
+ return null;
+ }
+ } );
+
+ }
+
+ private int colorLuminance( Color c ) {
+ int red = c.getRed();
+ int green = c.getGreen();
+ int blue = c.getBlue();
+
+ int min = Math.min( red, Math.min( green, blue ) );
+ int max = Math.max( red, Math.max( green, blue ) );
+
+ return (max + min) / 2;
+ }
+
+ private boolean isCurrentLineHighlighted( int offset ) {
+ try {
+ return getHighlightCurrentLine() &&
+ getSelectionStart() == getSelectionEnd() &&
+ getLineOfOffset( offset ) == getLineOfOffset( getSelectionStart() );
+ } catch( BadLocationException ex ) {
+ return false;
+ }
+ }
}
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
index 27de8f8d..6f346a50 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
@@ -55,6 +55,7 @@ class FlatThemeEditorPane
textArea.setSyntaxEditingStyle( FLATLAF_STYLE );
textArea.setMarkOccurrences( true );
textArea.addParser( new FlatThemeParser() );
+ textArea.setUseColorOfColorTokens( true );
// theme
try {
From 4da0c342f8141214a53434576eebdbd29b0a4e77 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Mon, 6 Apr 2020 15:42:58 +0200
Subject: [PATCH 035/500] Theme Editor: paint real colors and HSL values in
overlay on right side of editor (instead of behind editor text; previous
commit)
---
.../themeeditor/FlatThemeEditorOverlay.java | 136 ++++++++++++++++++
.../themeeditor/FlatThemeEditorPane.java | 15 +-
2 files changed, 146 insertions(+), 5 deletions(-)
create mode 100644 flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorOverlay.java
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorOverlay.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorOverlay.java
new file mode 100644
index 00000000..9ec3f0eb
--- /dev/null
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorOverlay.java
@@ -0,0 +1,136 @@
+/*
+ * 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.themeeditor;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.Rectangle;
+import javax.swing.JComponent;
+import javax.swing.JLayer;
+import javax.swing.plaf.LayerUI;
+import javax.swing.text.BadLocationException;
+import org.fife.ui.rsyntaxtextarea.Token;
+import com.formdev.flatlaf.UIDefaultsLoaderAccessor;
+import com.formdev.flatlaf.ui.FlatUIUtils;
+import com.formdev.flatlaf.util.HSLColor;
+import com.formdev.flatlaf.util.UIScale;
+
+/**
+ * An overlay layer that paints additional information about line content on the right side.
+ *
+ * @author Karl Tauber
+ */
+class FlatThemeEditorOverlay
+ extends LayerUI
+{
+ private static final int COLOR_PREVIEW_WIDTH = 100;
+
+ private Font font;
+ private Font baseFont;
+
+ @Override
+ public void paint( Graphics g, JComponent c ) {
+ // paint the syntax text area
+ super.paint( g, c );
+
+ @SuppressWarnings( "unchecked" )
+ FlatSyntaxTextArea textArea = ((JLayer)c).getView();
+ Rectangle clipBounds = g.getClipBounds();
+
+ // determine first and last visible lines
+ int firstVisibleLine;
+ int lastVisibleLine;
+ try {
+ int startOffset = textArea.viewToModel( new Point( 0, clipBounds.y ) );
+ int endOffset = textArea.viewToModel( new Point( 0, clipBounds.y + clipBounds.height ) );
+ firstVisibleLine = textArea.getLineOfOffset( startOffset );
+ lastVisibleLine = textArea.getLineOfOffset( endOffset );
+ } catch( BadLocationException ex ) {
+ // ignore
+ return;
+ }
+
+ // compute font (and cache it)
+ if( baseFont != textArea.getFont() ) {
+ baseFont = textArea.getFont();
+ int fontSize = Math.max( (int) Math.round( baseFont.getSize() * 0.8 ), 8 );
+ font = baseFont.deriveFont( (float) fontSize );
+ }
+
+ FontMetrics fm = c.getFontMetrics( font );
+ int maxTextWidth = fm.stringWidth( "HSL 360 100 100" );
+ int textHeight = fm.getAscent() - fm.getLeading();
+
+ int width = c.getWidth();
+ int previewWidth = UIScale.scale( COLOR_PREVIEW_WIDTH );
+ int gap = UIScale.scale( 4 );
+
+ // check whether preview is outside of clip bounds
+ if( clipBounds.x + clipBounds.width < width - previewWidth - maxTextWidth - gap )
+ return;
+
+ g.setFont( font );
+
+ // paint additional information
+ for( int line = firstVisibleLine; line <= lastVisibleLine; line++ ) {
+ Color color = getColorInLine( textArea, line );
+ if( color == null )
+ continue;
+
+ try {
+ // paint color preview
+ int lineEndOffset = textArea.getLineEndOffset( line );
+ Rectangle r = textArea.modelToView( lineEndOffset - 1 );
+ int pw = Math.min( width - r.x - gap, previewWidth );
+ int px = width - pw;
+ g.setColor( color );
+ g.fillRect( px, r.y, pw, r.height );
+
+ // paint text
+ int textX = px - maxTextWidth;
+ if( textX > r.x + gap) {
+ float[] hsl = HSLColor.fromRGB( color );
+ String hslStr = String.format( "HSL %d %d %d",
+ Math.round( hsl[0] ), Math.round( hsl[1] ), Math.round( hsl[2] ) );
+ g.setColor( textArea.getForeground() );
+ FlatUIUtils.drawString( textArea, g, hslStr, textX,
+ r.y + ((r.height - textHeight) / 2) + textHeight );
+ }
+ } catch( BadLocationException ex ) {
+ // ignore
+ }
+ }
+ }
+
+ private Color getColorInLine( FlatSyntaxTextArea textArea, int line ) {
+ Token token = textArea.getTokenListForLine( line );
+ for( Token t = token; t != null && t.isPaintable(); t = t.getNextToken() ) {
+ if( t.getType() == FlatThemeTokenMaker.TOKEN_COLOR ) {
+ try {
+ return new Color( UIDefaultsLoaderAccessor.parseColorRGBA( t.getLexeme() ), true );
+ } catch( IllegalArgumentException ex ) {
+ break;
+ }
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
index 6f346a50..d5e80354 100644
--- a/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
+++ b/flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatThemeEditorPane.java
@@ -21,6 +21,7 @@ import java.awt.Color;
import java.awt.Font;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
+import javax.swing.JLayer;
import javax.swing.JPanel;
import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory;
import org.fife.ui.rsyntaxtextarea.FileLocation;
@@ -55,7 +56,7 @@ class FlatThemeEditorPane
textArea.setSyntaxEditingStyle( FLATLAF_STYLE );
textArea.setMarkOccurrences( true );
textArea.addParser( new FlatThemeParser() );
- textArea.setUseColorOfColorTokens( true );
+// textArea.setUseColorOfColorTokens( true );
// theme
try {
@@ -71,15 +72,19 @@ class FlatThemeEditorPane
scheme.getStyle( FlatThemeTokenMaker.TOKEN_COLOR ).background = new Color( 0x0a000000, true );
scheme.getStyle( FlatThemeTokenMaker.TOKEN_VARIABLE ).background = new Color( 0x1800cc00, true );
+ // create overlay layer
+ JLayer overlay = new JLayer<>( textArea, new FlatThemeEditorOverlay() );
+
// create scroll pane
- scrollPane = new RTextScrollPane( textArea );
+ scrollPane = new RTextScrollPane( overlay );
scrollPane.setLineNumbersEnabled( true );
// scale fonts
- if( UIScale.getUserScaleFactor() != 1 ) {
+ if( UIScale.getUserScaleFactor() != 1 )
textArea.setFont( scaleFont( textArea.getFont() ) );
- scrollPane.getGutter().setLineNumberFont( scaleFont( scrollPane.getGutter().getLineNumberFont() ) );
- }
+
+ // use same font for line numbers as in editor
+ scrollPane.getGutter().setLineNumberFont( textArea.getFont() );
add( scrollPane, BorderLayout.CENTER );
}
From 9eaee8d2c4b7a6823328baccec1315e90384c940 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Thu, 9 Apr 2020 11:53:11 +0200
Subject: [PATCH 036/500] Windows: fixed rendering of Unicode characters (issue
#81)
---
CHANGELOG.md | 6 ++++++
.../main/java/com/formdev/flatlaf/FlatLaf.java | 16 +++++++++++++---
.../com/formdev/flatlaf/LinuxFontPolicy.java | 5 +----
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 47e6c334..c3018a7b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,12 @@
FlatLaf Change Log
==================
+## 0.30
+
+- Windows: Fixed rendering of Unicode characters. Previously not all Unicode
+ characters were rendered on Windows. (issue #81)
+
+
## 0.29
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
index c8865a15..2cab462b 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java
@@ -54,6 +54,7 @@ import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicLookAndFeel;
+import javax.swing.text.StyleContext;
import javax.swing.text.html.HTMLEditorKit;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
@@ -324,7 +325,7 @@ public abstract class FlatLaf
if( SystemInfo.IS_WINDOWS ) {
Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.messagebox.font" );
if( winFont != null )
- uiFont = new FontUIResource( winFont );
+ uiFont = createCompositeFont( winFont.getFamily(), winFont.getStyle(), winFont.getSize() );
} else if( SystemInfo.IS_MAC ) {
String fontName;
@@ -335,7 +336,8 @@ public abstract class FlatLaf
// default font on older systems (see com.apple.laf.AquaFonts)
fontName = "Lucida Grande";
}
- uiFont = new FontUIResource( fontName, Font.PLAIN, 13 );
+
+ uiFont = createCompositeFont( fontName, Font.PLAIN, 13 );
} else if( SystemInfo.IS_LINUX ) {
Font font = LinuxFontPolicy.getFont();
@@ -343,7 +345,7 @@ public abstract class FlatLaf
}
if( uiFont == null )
- return;
+ uiFont = createCompositeFont( Font.SANS_SERIF, Font.PLAIN, 12 );
uiFont = UIScale.applyCustomScaleFactor( uiFont );
@@ -365,6 +367,14 @@ public abstract class FlatLaf
defaults.put( "defaultFont", uiFont );
}
+ static FontUIResource createCompositeFont( String family, int style, int size ) {
+ // using StyleContext.getFont() here because it uses
+ // sun.font.FontUtilities.getCompositeFontUIResource()
+ // and creates a composite font that is able to display all Unicode characters
+ Font font = new StyleContext().getFont( family, style, size );
+ return (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
+ }
+
/**
* Adds the default color palette for action icons and object icons to the given UIDefaults.
*
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
index 1da961d8..743e4ae2 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java
@@ -29,7 +29,6 @@ import java.util.Collections;
import java.util.List;
import java.util.StringTokenizer;
import java.util.logging.Level;
-import javax.swing.text.StyleContext;
import com.formdev.flatlaf.util.StringUtils;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
@@ -90,9 +89,7 @@ class LinuxFontPolicy
}
private static Font createFont( String family, int style, int size, double dsize ) {
- // using StyleContext.getFont() here because it uses
- // sun.font.FontUtilities.getCompositeFontUIResource()
- Font font = new StyleContext().getFont( family, style, size );
+ Font font = FlatLaf.createCompositeFont( family, style, size );
// set font size in floating points
font = font.deriveFont( style, (float) dsize );
From 09d19a13b7a321dcbc9630bf84ffceb1fea57785 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Thu, 9 Apr 2020 13:51:11 +0200
Subject: [PATCH 037/500] release 0.30
---
build.gradle.kts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build.gradle.kts b/build.gradle.kts
index 41a504df..080f1e03 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-val releaseVersion = "0.29"
-val developmentVersion = "0.30-SNAPSHOT"
+val releaseVersion = "0.30"
+val developmentVersion = "0.31-SNAPSHOT"
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
From 93ac6fa88a4b6d4992dcb0f22858a2872bf288fd Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Thu, 9 Apr 2020 14:43:14 +0200
Subject: [PATCH 038/500] README.md: added XMLmind XML Editor, MeteoInfo and
lsfusion platform to list of projects that use FlatLaf
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
index d1dd911f..e1d3a2d7 100644
--- a/README.md
+++ b/README.md
@@ -79,6 +79,7 @@ Projects using FlatLaf
- [jclasslib bytecode viewer](https://github.com/ingokegel/jclasslib) 5.5
- [KeyStore Explorer](https://keystore-explorer.org/) 5.4.3
- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) (in weekly releases)
+- [XMLmind XML Editor](https://www.xmlmind.com/xmleditor/) 9.3 (commercial)
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org)
- [Rest Suite](https://github.com/supanadit/restsuite)
- [ControllerBuddy](https://github.com/bwRavencl/ControllerBuddy)
@@ -89,6 +90,8 @@ Projects using FlatLaf
[mendelson AS2](https://mendelson-e-c.com/as2/),
[AS4](https://mendelson-e-c.com/as4/) and
[OFTP2](https://mendelson-e-c.com/oftp2) (commercial)
+- [MeteoInfo](https://github.com/meteoinfo/MeteoInfo) 2.1.6
+- [lsfusion platform](https://github.com/lsfusion/platform)
- and more...
From 7d3ffbc45aac7c0ae4c5052355e0e091fe52fa27 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Thu, 9 Apr 2020 17:26:08 +0200
Subject: [PATCH 039/500] README.md: added MegaMek and MekHQ to list of
projects that use FlatLaf
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index e1d3a2d7..6ddee1d9 100644
--- a/README.md
+++ b/README.md
@@ -81,6 +81,8 @@ Projects using FlatLaf
- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) (in weekly releases)
- [XMLmind XML Editor](https://www.xmlmind.com/xmleditor/) 9.3 (commercial)
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org)
+- [MegaMek](https://github.com/MegaMek/megamek) v0.47.4 and
+ [MekHQ](https://github.com/MegaMek/mekhq) v0.47.5
- [Rest Suite](https://github.com/supanadit/restsuite)
- [ControllerBuddy](https://github.com/bwRavencl/ControllerBuddy)
- [SpringRemote](https://github.com/HaleyWang/SpringRemote)
From 73cb63c9f93baaa5277660f1af854bc735cfe2b0 Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Mon, 13 Apr 2020 15:48:07 +0200
Subject: [PATCH 040/500] Testing: added FlatDisabledIconsTest to compare
different methods to create disabled icons
---
.../testing/FlatDisabledIconsTest.java | 781 ++++++++++++++++++
.../flatlaf/testing/FlatDisabledIconsTest.jfd | 458 ++++++++++
.../testing/disabled_icons_test/LICENSE.txt | 12 +
.../disabled_icons_test/intellij-menu-cut.png | Bin 0 -> 262 bytes
.../intellij-menu-cut@2x.png | Bin 0 -> 504 bytes
.../intellij-menu-paste.png | Bin 0 -> 98 bytes
.../intellij-menu-paste@2x.png | Bin 0 -> 122 bytes
.../disabled_icons_test/intellij-search.png | Bin 0 -> 309 bytes
.../intellij-search@2x.png | Bin 0 -> 687 bytes
.../disabled_icons_test/intellij-show.png | Bin 0 -> 246 bytes
.../disabled_icons_test/intellij-show@2x.png | Bin 0 -> 422 bytes
.../intellij-showReadAccess.png | Bin 0 -> 305 bytes
.../intellij-showReadAccess@2x.png | Bin 0 -> 498 bytes
.../intellij-showWriteAccess.png | Bin 0 -> 325 bytes
.../intellij-showWriteAccess@2x.png | Bin 0 -> 495 bytes
.../disabled_icons_test/netbeans-copy24.gif | Bin 0 -> 733 bytes
.../disabled_icons_test/netbeans-cut24.gif | Bin 0 -> 1517 bytes
.../disabled_icons_test/netbeans-find24.gif | Bin 0 -> 1154 bytes
.../disabled_icons_test/netbeans-paste24.gif | Bin 0 -> 880 bytes
.../disabled_icons_test/netbeans-redo24.gif | Bin 0 -> 1254 bytes
.../disabled_icons_test/netbeans-undo24.gif | Bin 0 -> 1282 bytes
.../testing/disabled_icons_test/zip128.png | Bin 0 -> 17570 bytes
22 files changed, 1251 insertions(+)
create mode 100644 flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java
create mode 100644 flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.jfd
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/LICENSE.txt
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show@2x.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess@2x.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess@2x.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-copy24.gif
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-cut24.gif
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-find24.gif
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-paste24.gif
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-redo24.gif
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-undo24.gif
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/zip128.png
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java
new file mode 100644
index 00000000..cb6ed331
--- /dev/null
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java
@@ -0,0 +1,781 @@
+/*
+ * 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.testing;
+
+import java.awt.Component;
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.awt.image.FilteredImageSource;
+import java.awt.image.ImageProducer;
+import java.awt.image.RGBImageFilter;
+import java.beans.*;
+import javax.swing.*;
+import net.miginfocom.swing.*;
+
+/**
+ * @author Karl Tauber
+ */
+public class FlatDisabledIconsTest
+ extends FlatTestPanel
+{
+ public static void main( String[] args ) {
+ SwingUtilities.invokeLater( () -> {
+ FlatTestFrame frame = FlatTestFrame.create( args, "FlatDisabledIconsTest" );
+ frame.showFrame( FlatDisabledIconsTest::new );
+ } );
+ }
+
+ FlatDisabledIconsTest() {
+ initComponents();
+
+ RGBImageFilter plasticLafFilter = new PlasticRGBGrayFilter();
+ RGBImageFilter intellijTextFilter = new IntelliJGrayFilter( 20, 0, 100 );
+ RGBImageFilter netbeansFilter = new NetBeansDisabledButtonFilter();
+
+ for( Component c : enabledToolBar.getComponents() ) {
+ AbstractButton b = (AbstractButton) c;
+ Icon icon = b.getIcon();
+
+ JToggleButton cb = new JToggleButton( icon );
+ cb.setEnabled( false );
+ currentLafToolBar.add( cb );
+ basicLafToolBar.add( new FilterButton( null, icon ) );
+ metalLafToolBar.add( new FilterButton( null, icon ) );
+ plasticToolBar.add( new FilterButton( plasticLafFilter, icon ) );
+ intellijTextToolBar.add( new FilterButton( intellijTextFilter, icon ) );
+ intellijLightToolBar.add( new FilterButton( null, icon ) );
+ intellijDarkToolBar.add( new FilterButton( null, icon ) );
+ netbeansToolBar.add( new FilterButton( netbeansFilter, icon ) );
+ }
+
+ Icon zipIcon = zipButton.getIcon();
+ JToggleButton cb = new JToggleButton( zipIcon );
+ cb.setEnabled( false );
+ zipToolBar.add( cb );
+ zipToolBar.add( new FilterButton( null, zipIcon ) );
+ zipToolBar.add( new FilterButton( null, zipIcon ) );
+ zipToolBar.add( new FilterButton( plasticLafFilter, zipIcon ) );
+ zipToolBar.add( new FilterButton( intellijTextFilter, zipIcon ) );
+ zipToolBar.add( new FilterButton( null, zipIcon ) );
+ zipToolBar.add( new FilterButton( null, zipIcon ) );
+ zipToolBar.add( new FilterButton( netbeansFilter, zipIcon ) );
+
+ basicLafReset();
+ metalLafReset();
+
+ intelliJTextFilterController.defaultBrightness = 20;
+ intelliJTextFilterController.defaultContrast = 0;
+ intelliJTextFilterController.reset();
+
+ // values from intellijlaf.properties
+ intelliJLightFilterController.defaultBrightness = 33;
+ intelliJLightFilterController.defaultContrast = -35;
+ intelliJLightFilterController.reset();
+
+ // values from darcula.properties
+ intelliJDarkFilterController.defaultBrightness = -70;
+ intelliJDarkFilterController.defaultContrast = -70;
+ intelliJDarkFilterController.reset();
+ }
+
+ private void selectedChanged() {
+ boolean armed = selectedCheckBox.isSelected();
+ for( Component c : getComponents() ) {
+ if( c instanceof JToolBar ) {
+ for( Component c2 : ((JToolBar)c).getComponents() ) {
+ if( c2 instanceof JToggleButton )
+ ((JToggleButton)c2).getModel().setSelected( armed );
+ }
+ }
+ }
+ }
+
+ private void basicLafChanged() {
+ boolean brighter = basicLafBrighterCheckBox.isSelected();
+ int percent = basicLafPercentSlider.getValue();
+
+ basicLafPercentValue.setText( String.valueOf( percent ) );
+
+ RGBImageFilter filter = new GrayFilter( brighter, percent );
+ updateFilter( basicLafToolBar, 2, filter );
+ }
+
+ private void basicLafReset() {
+ basicLafBrighterCheckBox.setSelected( true );
+ basicLafPercentSlider.setValue( 50 );
+ basicLafChanged();
+ }
+
+ private void metalLafChanged() {
+ int min = metalLafMinSlider.getValue();
+ int max = metalLafMaxSlider.getValue();
+
+ metalLafMinValue.setText( String.valueOf( min ) );
+ metalLafMaxValue.setText( String.valueOf( max ) );
+
+ RGBImageFilter filter = new MetalDisabledButtonImageFilter( min, max );
+ updateFilter( metalLafToolBar, 3, filter );
+ }
+
+ private void metalLafReset() {
+ metalLafMinSlider.setValue( 180 );
+ metalLafMaxSlider.setValue( 215 );
+ metalLafChanged();
+ }
+
+ private void intelliJTextFilterChanged(PropertyChangeEvent e) {
+ updateFilter( intellijTextToolBar, 5, (RGBImageFilter) e.getNewValue() );
+ }
+
+ private void intelliJLightFilterChanged(PropertyChangeEvent e) {
+ updateFilter( intellijLightToolBar, 6, (RGBImageFilter) e.getNewValue() );
+ }
+
+ private void intelliJDarkFilterChanged(PropertyChangeEvent e) {
+ updateFilter( intellijDarkToolBar, 7, (RGBImageFilter) e.getNewValue() );
+ }
+
+ private void updateFilter( JToolBar toolBar, int zipIndex, RGBImageFilter filter ) {
+ for( Component c : toolBar.getComponents() )
+ ((FilterButton)c).setFilter( filter );
+
+ ((FilterButton)zipToolBar.getComponent( zipIndex )).setFilter( filter );
+ }
+
+ private void initComponents() {
+ // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
+ JLabel enabledLabel = new JLabel();
+ enabledToolBar = new JToolBar();
+ JToggleButton button1 = new JToggleButton();
+ JToggleButton button2 = new JToggleButton();
+ JToggleButton button3 = new JToggleButton();
+ JToggleButton button4 = new JToggleButton();
+ JToggleButton button5 = new JToggleButton();
+ JToggleButton button6 = new JToggleButton();
+ JToggleButton button7 = new JToggleButton();
+ JToggleButton button8 = new JToggleButton();
+ JToggleButton button9 = new JToggleButton();
+ JToggleButton button10 = new JToggleButton();
+ JToggleButton button11 = new JToggleButton();
+ JToggleButton button12 = new JToggleButton();
+ JToggleButton button13 = new JToggleButton();
+ JToggleButton button14 = new JToggleButton();
+ JToggleButton button15 = new JToggleButton();
+ JToggleButton button16 = new JToggleButton();
+ JToggleButton button17 = new JToggleButton();
+ JToggleButton button18 = new JToggleButton();
+ JLabel currentLabel = new JLabel();
+ currentLafToolBar = new JToolBar();
+ JLabel basicLafLabel = new JLabel();
+ basicLafToolBar = new JToolBar();
+ JPanel panel2 = new JPanel();
+ basicLafBrighterCheckBox = new JCheckBox();
+ JLabel basicLafPercentLabel = new JLabel();
+ basicLafPercentSlider = new JSlider();
+ basicLafPercentValue = new JLabel();
+ JButton basicLafResetButton = new JButton();
+ JLabel metalLafLabel = new JLabel();
+ metalLafToolBar = new JToolBar();
+ JPanel panel4 = new JPanel();
+ JLabel metalLafMinLabel = new JLabel();
+ metalLafMinSlider = new JSlider();
+ metalLafMinValue = new JLabel();
+ JButton metalLafResetButton = new JButton();
+ JLabel metalLafMaxLabel = new JLabel();
+ metalLafMaxSlider = new JSlider();
+ metalLafMaxValue = new JLabel();
+ JLabel plasticLabel = new JLabel();
+ plasticToolBar = new JToolBar();
+ JLabel intellijTextLabel = new JLabel();
+ intellijTextToolBar = new JToolBar();
+ intelliJTextFilterController = new FlatDisabledIconsTest.IntelliJFilterController();
+ JLabel intellijLightLabel = new JLabel();
+ intellijLightToolBar = new JToolBar();
+ intelliJLightFilterController = new FlatDisabledIconsTest.IntelliJFilterController();
+ JLabel intellijDarkLabel = new JLabel();
+ intellijDarkToolBar = new JToolBar();
+ intelliJDarkFilterController = new FlatDisabledIconsTest.IntelliJFilterController();
+ JLabel netbeansLabel = new JLabel();
+ netbeansToolBar = new JToolBar();
+ zipToolBar = new JToolBar();
+ zipButton = new JToggleButton();
+ selectedCheckBox = new JCheckBox();
+
+ //======== this ========
+ setLayout(new MigLayout(
+ "ltr,insets dialog,hidemode 3",
+ // columns
+ "[fill]" +
+ "[fill]" +
+ "[left]" +
+ "[fill]",
+ // rows
+ "[]" +
+ "[]" +
+ "[center]" +
+ "[center]" +
+ "[center]" +
+ "[center]" +
+ "[center]" +
+ "[center]" +
+ "[center]para" +
+ "[center]" +
+ "[]"));
+
+ //---- enabledLabel ----
+ enabledLabel.setText("enabled");
+ add(enabledLabel, "cell 0 0");
+
+ //======== enabledToolBar ========
+ {
+
+ //---- button1 ----
+ button1.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-cut24.gif")));
+ enabledToolBar.add(button1);
+
+ //---- button2 ----
+ button2.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-copy24.gif")));
+ enabledToolBar.add(button2);
+
+ //---- button3 ----
+ button3.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-paste24.gif")));
+ enabledToolBar.add(button3);
+
+ //---- button4 ----
+ button4.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-undo24.gif")));
+ enabledToolBar.add(button4);
+
+ //---- button5 ----
+ button5.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-redo24.gif")));
+ enabledToolBar.add(button5);
+
+ //---- button6 ----
+ button6.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-find24.gif")));
+ enabledToolBar.add(button6);
+
+ //---- button7 ----
+ button7.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut.png")));
+ enabledToolBar.add(button7);
+
+ //---- button8 ----
+ button8.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste.png")));
+ enabledToolBar.add(button8);
+
+ //---- button9 ----
+ button9.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show.png")));
+ enabledToolBar.add(button9);
+
+ //---- button10 ----
+ button10.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png")));
+ enabledToolBar.add(button10);
+
+ //---- button11 ----
+ button11.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess.png")));
+ enabledToolBar.add(button11);
+
+ //---- button12 ----
+ button12.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search.png")));
+ enabledToolBar.add(button12);
+
+ //---- button13 ----
+ button13.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x.png")));
+ enabledToolBar.add(button13);
+
+ //---- button14 ----
+ button14.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x.png")));
+ enabledToolBar.add(button14);
+
+ //---- button15 ----
+ button15.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show@2x.png")));
+ enabledToolBar.add(button15);
+
+ //---- button16 ----
+ button16.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess@2x.png")));
+ enabledToolBar.add(button16);
+
+ //---- button17 ----
+ button17.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess@2x.png")));
+ enabledToolBar.add(button17);
+
+ //---- button18 ----
+ button18.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x.png")));
+ enabledToolBar.add(button18);
+ }
+ add(enabledToolBar, "cell 1 0");
+
+ //---- currentLabel ----
+ currentLabel.setText("current LaF");
+ add(currentLabel, "cell 0 1");
+ add(currentLafToolBar, "cell 1 1");
+
+ //---- basicLafLabel ----
+ basicLafLabel.setText("Basic LaF");
+ add(basicLafLabel, "cell 0 2");
+ add(basicLafToolBar, "cell 1 2");
+
+ //======== panel2 ========
+ {
+ panel2.setLayout(new MigLayout(
+ "insets 0,hidemode 3,gap 0 0",
+ // columns
+ "[60,fill]" +
+ "[fill]" +
+ "[25,right]rel" +
+ "[fill]",
+ // rows
+ "[center]" +
+ "[center]"));
+
+ //---- basicLafBrighterCheckBox ----
+ basicLafBrighterCheckBox.setText("brighter");
+ basicLafBrighterCheckBox.addActionListener(e -> basicLafChanged());
+ panel2.add(basicLafBrighterCheckBox, "cell 0 0 2 1,alignx left,growx 0");
+
+ //---- basicLafPercentLabel ----
+ basicLafPercentLabel.setText("Percent");
+ panel2.add(basicLafPercentLabel, "cell 0 1");
+
+ //---- basicLafPercentSlider ----
+ basicLafPercentSlider.setToolTipText("Percent");
+ basicLafPercentSlider.setValue(0);
+ basicLafPercentSlider.addChangeListener(e -> basicLafChanged());
+ panel2.add(basicLafPercentSlider, "cell 1 1");
+
+ //---- basicLafPercentValue ----
+ basicLafPercentValue.setText("000");
+ panel2.add(basicLafPercentValue, "cell 2 1");
+
+ //---- basicLafResetButton ----
+ basicLafResetButton.setText("Reset");
+ basicLafResetButton.addActionListener(e -> basicLafReset());
+ panel2.add(basicLafResetButton, "cell 3 0 1 2");
+ }
+ add(panel2, "cell 2 2");
+
+ //---- metalLafLabel ----
+ metalLafLabel.setText("Metal LaF");
+ add(metalLafLabel, "cell 0 3");
+ add(metalLafToolBar, "cell 1 3");
+
+ //======== panel4 ========
+ {
+ panel4.setLayout(new MigLayout(
+ "insets 0,hidemode 3,gap 0 0",
+ // columns
+ "[60,fill]" +
+ "[fill]" +
+ "[25,right]rel" +
+ "[fill]",
+ // rows
+ "[center]" +
+ "[center]"));
+
+ //---- metalLafMinLabel ----
+ metalLafMinLabel.setText("Min");
+ panel4.add(metalLafMinLabel, "cell 0 0");
+
+ //---- metalLafMinSlider ----
+ metalLafMinSlider.setMaximum(255);
+ metalLafMinSlider.addChangeListener(e -> metalLafChanged());
+ panel4.add(metalLafMinSlider, "cell 1 0");
+
+ //---- metalLafMinValue ----
+ metalLafMinValue.setText("000");
+ panel4.add(metalLafMinValue, "cell 2 0");
+
+ //---- metalLafResetButton ----
+ metalLafResetButton.setText("Reset");
+ metalLafResetButton.addActionListener(e -> metalLafReset());
+ panel4.add(metalLafResetButton, "cell 3 0 1 2");
+
+ //---- metalLafMaxLabel ----
+ metalLafMaxLabel.setText("Max");
+ panel4.add(metalLafMaxLabel, "cell 0 1");
+
+ //---- metalLafMaxSlider ----
+ metalLafMaxSlider.setMaximum(255);
+ metalLafMaxSlider.addChangeListener(e -> metalLafChanged());
+ panel4.add(metalLafMaxSlider, "cell 1 1");
+
+ //---- metalLafMaxValue ----
+ metalLafMaxValue.setText("000");
+ panel4.add(metalLafMaxValue, "cell 2 1");
+ }
+ add(panel4, "cell 2 3");
+
+ //---- plasticLabel ----
+ plasticLabel.setText("Plastic LaF");
+ add(plasticLabel, "cell 0 4");
+ add(plasticToolBar, "cell 1 4");
+
+ //---- intellijTextLabel ----
+ intellijTextLabel.setText("IntelliJ text");
+ add(intellijTextLabel, "cell 0 5");
+ add(intellijTextToolBar, "cell 1 5");
+
+ //---- intelliJTextFilterController ----
+ intelliJTextFilterController.addPropertyChangeListener("filter", e -> intelliJTextFilterChanged(e));
+ add(intelliJTextFilterController, "cell 2 5");
+
+ //---- intellijLightLabel ----
+ intellijLightLabel.setText("IntelliJ light");
+ add(intellijLightLabel, "cell 0 6");
+ add(intellijLightToolBar, "cell 1 6");
+
+ //---- intelliJLightFilterController ----
+ intelliJLightFilterController.addPropertyChangeListener("filter", e -> intelliJLightFilterChanged(e));
+ add(intelliJLightFilterController, "cell 2 6");
+
+ //---- intellijDarkLabel ----
+ intellijDarkLabel.setText("IntelliJ dark");
+ add(intellijDarkLabel, "cell 0 7");
+ add(intellijDarkToolBar, "cell 1 7");
+
+ //---- intelliJDarkFilterController ----
+ intelliJDarkFilterController.addPropertyChangeListener("filter", e -> intelliJDarkFilterChanged(e));
+ add(intelliJDarkFilterController, "cell 2 7");
+
+ //---- netbeansLabel ----
+ netbeansLabel.setText("NetBeans");
+ add(netbeansLabel, "cell 0 8");
+ add(netbeansToolBar, "cell 1 8");
+
+ //======== zipToolBar ========
+ {
+
+ //---- zipButton ----
+ zipButton.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/zip128.png")));
+ zipToolBar.add(zipButton);
+ }
+ add(zipToolBar, "cell 1 9 3 1");
+
+ //---- selectedCheckBox ----
+ selectedCheckBox.setText("selected");
+ selectedCheckBox.addActionListener(e -> selectedChanged());
+ add(selectedCheckBox, "cell 0 10");
+ // JFormDesigner - End of component initialization //GEN-END:initComponents
+ }
+
+ // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
+ private JToolBar enabledToolBar;
+ private JToolBar currentLafToolBar;
+ private JToolBar basicLafToolBar;
+ private JCheckBox basicLafBrighterCheckBox;
+ private JSlider basicLafPercentSlider;
+ private JLabel basicLafPercentValue;
+ private JToolBar metalLafToolBar;
+ private JSlider metalLafMinSlider;
+ private JLabel metalLafMinValue;
+ private JSlider metalLafMaxSlider;
+ private JLabel metalLafMaxValue;
+ private JToolBar plasticToolBar;
+ private JToolBar intellijTextToolBar;
+ private FlatDisabledIconsTest.IntelliJFilterController intelliJTextFilterController;
+ private JToolBar intellijLightToolBar;
+ private FlatDisabledIconsTest.IntelliJFilterController intelliJLightFilterController;
+ private JToolBar intellijDarkToolBar;
+ private FlatDisabledIconsTest.IntelliJFilterController intelliJDarkFilterController;
+ private JToolBar netbeansToolBar;
+ private JToolBar zipToolBar;
+ private JToggleButton zipButton;
+ private JCheckBox selectedCheckBox;
+ // JFormDesigner - End of variables declaration //GEN-END:variables
+
+ //---- class IntelliJFilterController ------------------------------------
+
+ private static class IntelliJFilterController
+ extends JPanel
+ {
+ int defaultBrightness;
+ int defaultContrast;
+
+ private IntelliJFilterController() {
+ initComponents();
+ }
+
+ private void changed() {
+ int brightness = intellijBrightnessSlider.getValue();
+ int contrast = intellijContrastSlider.getValue();
+
+ intellijBrightnessValue.setText( String.valueOf( brightness ) );
+ intellijContrastValue.setText( String.valueOf( contrast ) );
+
+ RGBImageFilter filter = new IntelliJGrayFilter( brightness, contrast, 100 );
+ firePropertyChange( "filter", null, filter );
+ }
+
+ private void reset() {
+ intellijBrightnessSlider.setValue( defaultBrightness );
+ intellijContrastSlider.setValue( defaultContrast );
+ changed();
+ }
+
+ private void initComponents() {
+ // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
+ JLabel intellijBrightnessLabel = new JLabel();
+ intellijBrightnessSlider = new JSlider();
+ intellijBrightnessValue = new JLabel();
+ JLabel intellijContrastLabel = new JLabel();
+ intellijContrastSlider = new JSlider();
+ intellijContrastValue = new JLabel();
+ JButton intellijLightResetButton = new JButton();
+
+ //======== this ========
+ setLayout(new MigLayout(
+ "insets 0,hidemode 3,gap 0 0",
+ // columns
+ "[60,fill]" +
+ "[fill]" +
+ "[25,right]rel" +
+ "[fill]",
+ // rows
+ "[center]" +
+ "[center]"));
+
+ //---- intellijBrightnessLabel ----
+ intellijBrightnessLabel.setText("Brightness");
+ add(intellijBrightnessLabel, "cell 0 0");
+
+ //---- intellijBrightnessSlider ----
+ intellijBrightnessSlider.setMinimum(-100);
+ intellijBrightnessSlider.addChangeListener(e -> changed());
+ add(intellijBrightnessSlider, "cell 1 0");
+
+ //---- intellijBrightnessValue ----
+ intellijBrightnessValue.setText("000");
+ add(intellijBrightnessValue, "cell 2 0");
+
+ //---- intellijContrastLabel ----
+ intellijContrastLabel.setText("Contrast");
+ add(intellijContrastLabel, "cell 0 1");
+
+ //---- intellijContrastSlider ----
+ intellijContrastSlider.setMinimum(-100);
+ intellijContrastSlider.addChangeListener(e -> changed());
+ add(intellijContrastSlider, "cell 1 1");
+
+ //---- intellijContrastValue ----
+ intellijContrastValue.setText("-000");
+ add(intellijContrastValue, "cell 2 1");
+
+ //---- intellijLightResetButton ----
+ intellijLightResetButton.setText("Reset");
+ intellijLightResetButton.addActionListener(e -> reset());
+ add(intellijLightResetButton, "cell 3 0 1 2");
+ // JFormDesigner - End of component initialization //GEN-END:initComponents
+ }
+
+ // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
+ private JSlider intellijBrightnessSlider;
+ private JLabel intellijBrightnessValue;
+ private JSlider intellijContrastSlider;
+ private JLabel intellijContrastValue;
+ // JFormDesigner - End of variables declaration //GEN-END:variables
+ }
+
+ //---- class FilterButton -------------------------------------------------
+
+ private static class FilterButton
+ extends JToggleButton
+ {
+ private RGBImageFilter filter;
+
+ FilterButton( RGBImageFilter filter, Icon icon ) {
+ this.filter = filter;
+
+ setEnabled( false );
+ setIcon( icon );
+
+ if( filter != null )
+ updateDisabledIcon();
+ }
+
+ void setFilter( RGBImageFilter filter ) {
+ this.filter = filter;
+ updateDisabledIcon();
+ }
+
+ @Override
+ public void updateUI() {
+ super.updateUI();
+ updateDisabledIcon();
+ }
+
+ private void updateDisabledIcon() {
+ setDisabledIcon( createDisabledIcon( getIcon() ) );
+ }
+
+ protected Icon createDisabledIcon( Icon icon ) {
+ if( !(icon instanceof ImageIcon) )
+ return null;
+
+ Image image = ((ImageIcon) icon).getImage();
+ ImageProducer producer = new FilteredImageSource( image.getSource(), filter );
+ Image disabledImage = Toolkit.getDefaultToolkit().createImage( producer );
+ return new ImageIcon( disabledImage );
+ }
+ }
+
+ //---- class PlasticRGBGrayFilter -----------------------------------------
+
+ // from https://github.com/openjdk/jdk/blob/6bab0f539fba8fb441697846347597b4a0ade428/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalUtils.java#L415-L434
+ // license https://github.com/openjdk/jdk/blob/master/LICENSE
+ private static class MetalDisabledButtonImageFilter
+ extends RGBImageFilter
+ {
+ private final float min;
+ private final float factor;
+
+ MetalDisabledButtonImageFilter(int min, int max) {
+ canFilterIndexColorModel = true;
+ this.min = min;
+ this.factor = (max - min) / 255f;
+ }
+
+ @Override
+ public int filterRGB(int x, int y, int rgb) {
+ // Coefficients are from the sRGB color space:
+ int gray = Math.min(255, (int)(((0.2125f * ((rgb >> 16) & 0xFF)) +
+ (0.7154f * ((rgb >> 8) & 0xFF)) +
+ (0.0721f * (rgb & 0xFF)) + .5f) * factor + min));
+
+ return (rgb & 0xff000000) | (gray << 16) | (gray << 8) |
+ (gray << 0);
+ }
+ }
+
+ //---- class PlasticRGBGrayFilter -----------------------------------------
+
+ // from https://github.com/JFormDesigner/swing-jgoodies-looks/blob/master/src/main/java/com/jgoodies/looks/common/RGBGrayFilter.java
+ // license https://github.com/JFormDesigner/swing-jgoodies-looks/blob/master/LICENSE.txt
+ private static final class PlasticRGBGrayFilter
+ extends RGBImageFilter
+ {
+ private PlasticRGBGrayFilter() {
+ canFilterIndexColorModel = true;
+ }
+
+ @Override
+ public int filterRGB(int x, int y, int rgb) {
+ // Find the average of red, green, and blue.
+ float avg = (((rgb >> 16) & 0xff) / 255f +
+ ((rgb >> 8) & 0xff) / 255f +
+ (rgb & 0xff) / 255f) / 3;
+ // Pull out the alpha channel.
+ float alpha = (((rgb >> 24) & 0xff) / 255f);
+
+ // Calculate the average.
+ // Sun's formula: Math.min(1.0f, (1f - avg) / (100.0f / 35.0f) + avg);
+ // The following formula uses less operations and hence is faster.
+ avg = Math.min(1.0f, 0.35f + 0.65f * avg);
+ // Convert back into RGB.
+ return (int) (alpha * 255f) << 24 |
+ (int) (avg * 255f) << 16 |
+ (int) (avg * 255f) << 8 |
+ (int) (avg * 255f);
+ }
+ }
+
+ //---- class IntelliJGrayFilter -------------------------------------------
+
+ // from https://github.com/JetBrains/intellij-community/blob/3840eab54746f5c4f301bb3ac78f00a980b5fd6e/platform/util/ui/src/com/intellij/util/ui/UIUtil.java#L253-L347
+ // license https://github.com/JetBrains/intellij-community/blob/master/LICENSE.txt
+ private static class IntelliJGrayFilter
+ extends RGBImageFilter
+ {
+ private float brightness;
+ private float contrast;
+ private int alpha;
+
+ private int origContrast;
+ private int origBrightness;
+
+ /**
+ * @param brightness in range [-100..100] where 0 has no effect
+ * @param contrast in range [-100..100] where 0 has no effect
+ * @param alpha in range [0..100] where 0 is transparent, 100 has no effect
+ */
+ public IntelliJGrayFilter(int brightness, int contrast, int alpha) {
+ setBrightness(brightness);
+ setContrast(contrast);
+ setAlpha(alpha);
+ }
+
+ private void setBrightness(int brightness) {
+ origBrightness = Math.max(-100, Math.min(100, brightness));
+ this.brightness = (float)(Math.pow(origBrightness, 3) / (100f * 100f)); // cubic in [0..100]
+ }
+
+ private void setContrast(int contrast) {
+ origContrast = Math.max(-100, Math.min(100, contrast));
+ this.contrast = origContrast / 100f;
+ }
+
+ private void setAlpha(int alpha) {
+ this.alpha = Math.max(0, Math.min(100, alpha));
+ }
+
+ @Override
+ public int filterRGB(int x, int y, int rgb) {
+ // Use NTSC conversion formula.
+ int gray = (int)(0.30 * (rgb >> 16 & 0xff) +
+ 0.59 * (rgb >> 8 & 0xff) +
+ 0.11 * (rgb & 0xff));
+
+ if (brightness >= 0) {
+ gray = (int)((gray + brightness * 255) / (1 + brightness));
+ }
+ else {
+ gray = (int)(gray / (1 - brightness));
+ }
+
+ if (contrast >= 0) {
+ if (gray >= 127) {
+ gray = (int)(gray + (255 - gray) * contrast);
+ }
+ else {
+ gray = (int)(gray - gray * contrast);
+ }
+ }
+ else {
+ gray = (int)(127 + (gray - 127) * (contrast + 1));
+ }
+
+ int a = ((rgb >> 24) & 0xff) * alpha / 100;
+
+ return (a << 24) | (gray << 16) | (gray << 8) | gray;
+ }
+ }
+
+ //---- NetBeansDisabledButtonFilter ---------------------------------------
+
+ // from https://github.com/apache/netbeans/blob/166e2bb491c29f6778223c6e9e16f70664252bce/platform/openide.util.ui/src/org/openide/util/ImageUtilities.java#L1202-L1221
+ // license https://github.com/apache/netbeans/blob/master/LICENSE
+ private static class NetBeansDisabledButtonFilter
+ extends RGBImageFilter
+ {
+ NetBeansDisabledButtonFilter() {
+ canFilterIndexColorModel = true;
+ }
+
+ @Override
+ public int filterRGB(int x, int y, int rgb) {
+ // Reduce the color bandwidth in quarter (>> 2) and Shift 0x88.
+ return (rgb & 0xff000000) + 0x888888 + ((((rgb >> 16) & 0xff) >> 2) << 16) + ((((rgb >> 8) & 0xff) >> 2) << 8) + (((rgb) & 0xff) >> 2);
+ }
+ }
+}
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.jfd
new file mode 100644
index 00000000..b0773567
--- /dev/null
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.jfd
@@ -0,0 +1,458 @@
+JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
+
+new FormModel {
+ contentType: "form/swing"
+ root: new FormRoot {
+ auxiliary() {
+ "JavaCodeGenerator.defaultVariableLocal": true
+ }
+ add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
+ "$layoutConstraints": "ltr,insets dialog,hidemode 3"
+ "$columnConstraints": "[fill][fill][left][fill]"
+ "$rowConstraints": "[][][center][center][center][center][center][center][center]para[center][]"
+ } ) {
+ name: "this"
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "enabledLabel"
+ "text": "enabled"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 0"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "enabledToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button1"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-cut24.gif" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button2"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-copy24.gif" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button3"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-paste24.gif" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button4"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-undo24.gif" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button5"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-redo24.gif" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button6"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-find24.gif" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button7"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button8"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button9"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button10"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button11"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button12"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button13"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button14"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button15"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show@2x.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button16"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess@2x.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button17"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess@2x.png" )
+ } )
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "button18"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x.png" )
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 0"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "currentLabel"
+ "text": "current LaF"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 1"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "currentLafToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 1"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "basicLafLabel"
+ "text": "Basic LaF"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 2"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "basicLafToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 2"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
+ "$layoutConstraints": "insets 0,hidemode 3,gap 0 0"
+ "$columnConstraints": "[60,fill][fill][25,right]rel[fill]"
+ "$rowConstraints": "[center][center]"
+ } ) {
+ name: "panel2"
+ add( new FormComponent( "javax.swing.JCheckBox" ) {
+ name: "basicLafBrighterCheckBox"
+ "text": "brighter"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "basicLafChanged", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 0 2 1,alignx left,growx 0"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "basicLafPercentLabel"
+ "text": "Percent"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 1"
+ } )
+ add( new FormComponent( "javax.swing.JSlider" ) {
+ name: "basicLafPercentSlider"
+ "toolTipText": "Percent"
+ "value": 0
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "basicLafChanged", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 1"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "basicLafPercentValue"
+ "text": "000"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 1"
+ } )
+ add( new FormComponent( "javax.swing.JButton" ) {
+ name: "basicLafResetButton"
+ "text": "Reset"
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "basicLafReset", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 3 0 1 2"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 2"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "metalLafLabel"
+ "text": "Metal LaF"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 3"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "metalLafToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 3"
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
+ "$layoutConstraints": "insets 0,hidemode 3,gap 0 0"
+ "$columnConstraints": "[60,fill][fill][25,right]rel[fill]"
+ "$rowConstraints": "[center][center]"
+ } ) {
+ name: "panel4"
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "metalLafMinLabel"
+ "text": "Min"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 0"
+ } )
+ add( new FormComponent( "javax.swing.JSlider" ) {
+ name: "metalLafMinSlider"
+ "maximum": 255
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "metalLafChanged", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 0"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "metalLafMinValue"
+ "text": "000"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 0"
+ } )
+ add( new FormComponent( "javax.swing.JButton" ) {
+ name: "metalLafResetButton"
+ "text": "Reset"
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "metalLafReset", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 3 0 1 2"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "metalLafMaxLabel"
+ "text": "Max"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 1"
+ } )
+ add( new FormComponent( "javax.swing.JSlider" ) {
+ name: "metalLafMaxSlider"
+ "maximum": 255
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "metalLafChanged", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 1"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "metalLafMaxValue"
+ "text": "000"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 1"
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 3"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "plasticLabel"
+ "text": "Plastic LaF"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 4"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "plasticToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 4"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "intellijTextLabel"
+ "text": "IntelliJ text"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 5"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "intellijTextToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 5"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatDisabledIconsTest$IntelliJFilterController" ) {
+ name: "intelliJTextFilterController"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "java.beans.PropertyChangeListener", "propertyChange", "intelliJTextFilterChanged", true, "filter" ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 5"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "intellijLightLabel"
+ "text": "IntelliJ light"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 6"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "intellijLightToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 6"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatDisabledIconsTest$IntelliJFilterController" ) {
+ name: "intelliJLightFilterController"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "java.beans.PropertyChangeListener", "propertyChange", "intelliJLightFilterChanged", true, "filter" ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 6"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "intellijDarkLabel"
+ "text": "IntelliJ dark"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 7"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "intellijDarkToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 7"
+ } )
+ add( new FormComponent( "com.formdev.flatlaf.testing.FlatDisabledIconsTest$IntelliJFilterController" ) {
+ name: "intelliJDarkFilterController"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "java.beans.PropertyChangeListener", "propertyChange", "intelliJDarkFilterChanged", true, "filter" ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 7"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "netbeansLabel"
+ "text": "NetBeans"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 8"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "netbeansToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 8"
+ } )
+ add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
+ name: "zipToolBar"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ add( new FormComponent( "javax.swing.JToggleButton" ) {
+ name: "zipButton"
+ "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/zip128.png" )
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ } )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 9 3 1"
+ } )
+ add( new FormComponent( "javax.swing.JCheckBox" ) {
+ name: "selectedCheckBox"
+ "text": "selected"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "selectedChanged", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 10"
+ } )
+ }, new FormLayoutConstraints( null ) {
+ "location": new java.awt.Point( 0, 0 )
+ "size": new java.awt.Dimension( 1095, 625 )
+ } )
+ add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
+ "$layoutConstraints": "insets 0,hidemode 3,gap 0 0"
+ "$columnConstraints": "[60,fill][fill][25,right]rel[fill]"
+ "$rowConstraints": "[center][center]"
+ } ) {
+ name: "panel1"
+ auxiliary() {
+ "JavaCodeGenerator.className": "IntelliJFilterController"
+ }
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "intellijBrightnessLabel"
+ "text": "Brightness"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 0"
+ } )
+ add( new FormComponent( "javax.swing.JSlider" ) {
+ name: "intellijBrightnessSlider"
+ "minimum": -100
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "changed", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 0"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "intellijBrightnessValue"
+ "text": "000"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 0"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "intellijContrastLabel"
+ "text": "Contrast"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 1"
+ } )
+ add( new FormComponent( "javax.swing.JSlider" ) {
+ name: "intellijContrastSlider"
+ "minimum": -100
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "changed", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 1"
+ } )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "intellijContrastValue"
+ "text": "-000"
+ auxiliary() {
+ "JavaCodeGenerator.variableLocal": false
+ }
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 1"
+ } )
+ add( new FormComponent( "javax.swing.JButton" ) {
+ name: "intellijLightResetButton"
+ "text": "Reset"
+ addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "reset", false ) )
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 3 0 1 2"
+ } )
+ }, new FormLayoutConstraints( null ) {
+ "location": new java.awt.Point( 0, 660 )
+ "size": new java.awt.Dimension( 286, 39 )
+ } )
+ }
+}
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/LICENSE.txt b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/LICENSE.txt
new file mode 100644
index 00000000..bc63f393
--- /dev/null
+++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/LICENSE.txt
@@ -0,0 +1,12 @@
+The icons in this folder starting with 'intellij-' are from IntelliJ IDEA Community Edition,
+which is licensed under the Apache 2.0 license. Copyright 2000-2020 JetBrains s.r.o.
+See: https://github.com/JetBrains/intellij-community/
+
+The icons in this folder starting with 'netbeans-' are from Apache NetBeans,
+which is licensed under the Apache 2.0 license to the Apache Software Foundation (ASF).
+See: https://github.com/apache/netbeans/
+
+zip128.png is from
+http://www.iconarchive.com/show/plump-icons-by-zerode/Folder-Archive-zip-icon.html
+License: Free for non-commercial use.
+Commercial usage: Not allowed
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut.png b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut.png
new file mode 100644
index 0000000000000000000000000000000000000000..c49ce7224e7e6af55cc5a7b3001688a61615ecb3
GIT binary patch
literal 262
zcmV+h0r~!kP)8yttM*si-
M07*qoM6N<$g2vQk1ONa4
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x.png b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..72ba5d3135eb30fa88f83e9a90d17f36e6da258e
GIT binary patch
literal 504
zcmV$Lqh{gUS6I~K|z5-adEK-T`kYg&u<1={vL?`!*FhH?*78ULKS-WdNs1eX!vtZ
zPL2sFW&%S{0jTdjnmG-)d|rX1=s7ebQh<0nlK6FyLn*NQKTtdXs|F;+@6m%BD7F~M
z00(j{2YCpqhODeC378_F&-<|$Xn-VNL8j#;I5m;t0Gx4%-|`HCaRyZMn3yO4=7C+5_SXcB}~)2MO)0000Ar-fh6BdYS=;{6I@6o*E
vvL*2aS7G8UX@_-xRxmc7YH0NKU}j=aird{-kn6(%)WqQF>gTe~DWM4f#JC)l
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x.png b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..9df8e303d93f8388c6fd92e9c29d98c9263304bf
GIT binary patch
literal 122
zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzM^6{WkcwMxuN~xMFyLTutlsy}
z(@KD^N#ZW+{6{vu3dWx5vn?6EUnq{KZm?$f#~$*Y8K?^g{xbYw{>`vu8F$m&ck=y}
QK6gNZp00i_>zopr0LsxNcmMzZ
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search.png b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search.png
new file mode 100644
index 0000000000000000000000000000000000000000..2b2b1b9c48e380d263f0f9ee35414caf2ff5e91b
GIT binary patch
literal 309
zcmV-50m}Y~P)ko}|0~)tB4r|!KgSGLufHoWVP;X5)M#w#DmeYL<
zkWp_?!@?e%s3$eJvgc#K86y6&Tn`j+k~MpN3J73GfeN^M+k%W)#R3nS?gFmH#b8q2WcHFYkzZ{t6n8D=o|DYXr300000NkvXX
Hu0mjf1PXwv
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x.png b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..fa13a324698dd6da3cfa5e559e73977cf0fdd4e2
GIT binary patch
literal 687
zcmV;g0#N;lP)39ECKT
zh1Z794HO$-lQ#1o(4l6w{nEog!v7L{^pjeML&XGmAqL9BHa0vAFJYQSp`Af$;H#+n
z0xNt1Y}RJd#pYMxo5dA|*r(N|eF9t%15Chj44#IG2(1k9T-4w83GhS=Fv!_IfNX^O
z4A3L$Kl=oDD+V~j0FU8WghvdpM_YzOp#k0*0$hh%5e6Axx2T`>2{0rExW)h{;e3P>
z4A3R&Klv;{zjl<$FmN>+xKuH~u&BS|6QD_3!&7_;8=%Ev9h>jaYLD1%L{|W{X0OB`
z-(e#|tmaG`pq_tMuz4kni@GUT=@UTN0*hiW_4;jB;q&Ke+}1CrH#SSg^oB!Q6bi
zn!f&f3xRs}NB13SBs-)XiYiQ>0|A5RKK4id9ctt|(wTW@^DJ5KeDq%Pm4vH2Q_eJK
z{o)TXvDen_W>>p@;lcqXk@<>l=L;>SSzABx`t@nImI4wQERsin5XIcOFV!q0)Y
zBr7Y6ha$^CJ_Z_ep9G81@ncYkkYzbga|RIq#$xDeprJK6IXNbB7(8KBopvPheX#@r3cO1bkgXB{K
zpxAb3VtWsi+YgEow2*j?#hmZR>aaQBIF2~1L9_fb7InXY>MUUDK=FX*~K`57G5Bsg(yLX4ju;#coYnHA|#Xz
zkqaQGBS0bX8deb@TMo^J_esu%16~jjQxq2$7mMI4ih+9PQ&bcaQyGCA2#N++Tmpkt
z0~+V|sZtpYit2b!G)T}L0t|KsP?HQ=Xgx=3l7X`DY>}1CoEv^h?tk>wC&l6
z)JVCB+D7&6>(2BjMi&3*;*nkO?7G7r`4o>YT|V4<*uHe0cXEEho^cbY-LU1P-0x#sc?zGM#`S~sHun7
zp#kI$E-
ziA1c(yp3cz1h33^9J(q?g7ywrk+~bgayZU9oiIOvgJzaTEzg{e#p2&+A+eewO9~1K
z1aPGI8g$E}mS;6YuE?ms6whoX+w%PU{L`3;E-M7nruVYqasSxxzvgPDD09rmc04@EFmNTv=tjC_NP=cKlj5nJC;~q;+*$qoC6kASA
z2!V0|mYgwtKpgfztJq;kF$it<_PL0!p!>w>j-p5kYhP0rGqLYG|N8&D=!U-
z3LmUPe
zMJ6mKX!Mv5atMz9d@Cx!fG(C_
z4b9>KT6!H}IouJC?}sKx(A4t%4h<|oi#B6g4tK=q`w0mgG>rH7$yhA?jmBS1H4BT2
zi$%~99jfKw3H?A^fi8Y0BEFd_4#>;PJCE#$TM>yha7!ZNcY~q?oE;+)=3_W6GBJi4
z4)~A55!ZonEr6Of682+6O?ZL@H5`E92xQCQV!#}Lnl-_Wczq`{S%n%7z;Fbi!U+jq
z$L3&c77&98I|3N@7>N=oy-?}^q8tIr1(-P_VfuhN;8tY9aymu=bMoU8dNTb5;A}WUnZs?x)q-2L)D`A
zPIzJtB7Wmn!?M=x@c7vnsUE17s+G~*$Rr!|#C0noz8hO*1QMrJb-b8Rbqp$WXx1ix
z#`SSL4U)?^i(P7gn~`ZEK#Oi;Ym$N5igalgg0dDc?%yLh;5#Ud(6wcJD=f(c5&wxH
l1JXBulnDt9qg}Ki2LSf*ka5I|9rFMH002ovPDHLkV1np6(V+kU
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-copy24.gif b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-copy24.gif
new file mode 100644
index 0000000000000000000000000000000000000000..5a50e326efc517cc1ab5e15c7f3c94751d674b92
GIT binary patch
literal 733
zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEa{HEjtmUzPnffIy#(?lOI#yL
zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIM<$Jm~hE&{2`t$$4J+m&O1B0RA
z1qlWg0dAw^$+v{|+*^5~D^cYtQv*X11FImH!dCqKOYem_tAzW-?+{k(}8Gq*G>@nGgq2;u(s
zFZBnniHIa~?70uGujjXYpTFO@=FhLmib^M@FI-u#cX1lf0bQ*1|CxAye-;;I*8ThI
zuk_*P@An`0@%p?y&px|2p0BpXotsz`8UmDlo}X|3;DH0%{<{Ck6(1j|9$s}d+u%{3
z1cQKshS(q0s1LvSSFzSNeth))DHqSOcmaK5L&FWl1qN$k_BLv8Gca)+X0LB}*vBL>
zQ_^Bbg~SaDfkz774r1z0!~TR{zH)GO4vwoc{kbNsXa
z|34#^-_^z~zp4#2PI?-OEO#~9;v3l_mzHG|&DY=wI(_5>M_2BilM)II7bd-oPe}XiFT%ExHS)lbBOT_F%)lt9a{KL`@`-sR
ztK>PJBR?h?IxsAZV(8g1^Rk+7EKdVZdTMIohk{Zjw#)t=i;`249x$jq=9S*w@Dpf#
z(!oEPbJc$E^muAp2tRnv{G6ME%cx)jbFi4P{SFyt|6>Zk@X^V*XVrbasp*y{9q5gQ{gwiTDAu&DZmiKQ*N+Qi_%FfoNuBXiS6BjL4TEDTH?Ch`oye9{~3
zesF&TCK-sNk+C3DlDk1LJRs0NXey6@L(dYEXbDNlUe7h}&oi+|FsRBraM|XpuL(?_
N44$rjF6*2UngD~cBo_bx
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-cut24.gif b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-cut24.gif
new file mode 100644
index 0000000000000000000000000000000000000000..2520d4ec01b80a87b9acc2c17bc47d72001b74ae
GIT binary patch
literal 1517
zcmV1PMC!D9mz>M4iLm^?2b3o?w
zwuYK4fB<3w3I6-{FSEQTpFu!S=p0A^C5D5{0GS0c6C?%@Kwu00{{72v{pKBp%926`
zUOs-ZECJ~O=>?eqG7DrT2mk~S*n%%#KApJ#-~q$!JNFoB%1anHxwuHO1f&+E2c#Ed
z2FNUsnIJiU00LX^^7)HJ=PzDjc=hHj(DvI54b_zlEG(=FMP*YLH089XQEdj}a)PU52^nmn&%mA4M
zG83c*Ab{Y>l#!89F*Ygnu%n}+G#4iqgSeO|gNB+aLuG9p13NoAM(P3?{`2S0bM4Jd
z3^#7wW_bDPHN&^>-x&7q-~V*+yxF!ubMJ%H0R#|AJ^)&x6CIy)Ilw;Ws
zea0XpAi%I{^-6}-%a@n{%{z;19zX!Gpoc3+0nieYU%!5xiHVM7xO@LT!=FFD8Hz2r
z8D1Zm1Ij=QqBb!Mr_P>Zc=-4UgQS=^!;+bw
z3?Fv%F#LaZoWUc}0W7~`{t||dx9>7YI_5LXUoe+p+olaz4F>^$0K!`qfr87`!~0Ac
z$9@K%Bs+$`Pws-nnPrq2w#+-kaQCkmgY^Gb*Ev`iG@)8RmP`*>|8*|R41fSav0!xo
zH@HkfR{ZMQe-9ych7fNz39#V5w|^LzgjpEAb4xIM`tXf`o0o$@K!gV@_u2^Q<-)FM}X2Gnl=0{|APb-~Mj|vBkL<
z{ev9^7(VleFl^g+=Tg@G@A?1%0AT>0{{jF2008#+0BuD{BLKjz)Bx4p_yB&y`Ayf{
z_5j7Y-2nL5-2fm8007j3`z|1JOk00062VE~^00+2cg0sQ;_CIji{0Pyzz0LJD0eQhfRO!@l%
z05~=h0Q>g(0HnL|0Q&p?v8vqrW1`ype&F){s009930Ro5-6b}uCY&U`oS=9ata4;M_`;Fnt*MAHtF(M2mUEu_g?v30SwMt(9|Vaq|G{Agq_hp&XSpdLz$0Z-L_8*g8a-3c6w|KFYbS1
zSbP58t)`2=Gynn!90$p&tj!ACj5YoyEDREg91M&sj0~@@ePvjC@gKw6pZ_;byz!?L
zsO~me5?0GoXXz3KTH>q2$RMT8!SMh0KZfV`ele`R`2W_+AOBa)z4N;kAb`LYfLs(U
z&s;1Gj3jm@24#@`KR~t5fBfIH;Qrq}n9H%`6SYWr<`fxDpgv{>HIUfPzYMot{`|jc
z(fz;Efcl;T1Q2p*Dg~rKmJFqA^c&22iQ8hd`QR
zNXQf>bMx}PrY5IpQ>Th9pEOCRdBqBih<9IKU+4M$?ryS0*_#{R+4<#se*gOVdP?f)
zX|@U}K4b&L
z&lNm9mD;8oy-nx$pP$8FPfgX9f3TTBp&=rHM^A5E&4h`KW;a0D-`93Bu(MR3P4Gc`~MJ_Ha(gqfnQd3eTx5?NY
zPsmF<^B^_*&;lLpa|aF|Wj&@~=E0-F9>g5PeTn%}_jx9urf7zqfcV4E6o)_?zhgJB1+5cA2#D-BngzBGJ!1ajm7u?-tHMsD1^*?7;N
zKeHX(Lnl7uXBIxZ-u}Nt-JgHmO^!(lmJ_5VL`{&J5LY7xihwKZtL*FkB>edFTK@26
z{sSJV&l3}p|DHc^=*W=+XIMNF>;L~v|MB^~{9*kCt_r3KTNP{-_Wsae;857Wy1)K^
zTFvioy3EGL+=rjP-!FNu_Al$Dj!@^mfpDt2|GYazudl5&b?=u;Gzbw%{PFRl>EXle
z{F3`>f3uaCGD|eyP%xYzBAnyRYklecfrrY0mDP|(xk3*#tZINZuDF0n1|?yt8;I)!6y-n_|ke!hKr#P&Sd
z=FU#e!?(6(OKzO%%D{M}>Bzs*-{0O&cBqk`;oNUu{p}2w#Kx)v9ic4GoA=kh{|`*=
zLIy$ojLon9U0E5tz43@+;o`-Mne|>f@VRXVri_5DY?TA-M{OL=FpBDO}>(n#krP31I#Vh)8YH`I(=e|35x1?q7Xv?ce_o9z6K3
zV4NtS&>*oQKs`A^NJNBXI}4CEAy-+vS%>i`;~61kW#t{L42&*Qz2q|lG|Xr3ss7G4
xC%j>$pdPz`L(i3*Z4AQQhO?IPFfg()Ncu|uUvoeA9k38#@O1TaS?83{1ORO7=-dDR
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-paste24.gif b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-paste24.gif
new file mode 100644
index 0000000000000000000000000000000000000000..65c0ec02c2b150ae29df85b38220d95d7196ff68
GIT binary patch
literal 880
zcmV-$1CRWPP)@R3;D`1MyiPp1xz-mbrxV0R#{OD2Rx`PA+a2
zE?&O+|LgZ3|3Nf}PmDf*07CIWd92tbAmxkAA-{j?Fx;{jfUF-3uU@}l`1un-AGo8!;O1z;kQ(ca
zqGw8L4BU|b0fc4&1H;ER_uxUdaP={Uy+^Jy95}EaEcX1>8-}RRAUF*I4i1hC-#))%
zh!3@5U}R*3n*##?0fb_~zkmN3{{8vIaP8J(Fn`0mF^G
z?O^@?kh}m8Ko~yw`{xJ4w=ZA7-i=DiWbg_IBWQtukT6(1NFPW)vJU_P2-AY!KN)`g
z`T^!kNJ=w^OGpv402cNjeIWhF761egMiBi0D){^74+Aq3BTPHdxfY}kq#rqm00IbW
z5dHi2i-DP$^il+*4?Tzg0tm%|zki_?08
zm4FZa{rk&cYG%Q}#l^+I&(F_r=F}mE7m$36;sbyH!tenMu(2}ZFXx$A7z70c83Y8l
z7=$?(7{(s`Hr!ZS0v>P3<^Ti`YH9k90qjL)U=nT0vt#)3
z?H7JuurXs84l@S^00IbW5P`h<^*b*8z7a*$jA@{G;SG?Jsl`_1SAI#Kv*r1Nt^2mq|%)9Qz+c)@Z{
z-+X4c_T&x2xw|hI_Fa0o1}HS^|Gz&e4N(qZE(VGWdoJ8(Xjpb&)zdlY;UM(@0mOoC
zxOB>_91~Tk$-ZW440_7a44;1fW%&B*AH$VbzrgYwEF26vDsl`~+KLQz+HxVAPu&VR
zbNd;CoU|mv@rPf)Gy?-8$md`S00Icb0;!}KIZpaYll`o;8JO6)7|uQYhBwSbghd&m
zowylzIoKHPzxxRm`}E^4!~cK(7#M*77&`v}0tjw_WWp3zBNge%j>Z}cuYR&JeEIy7
zV5ENd{+EG=jgfJ;1j_<-Tusl(g8U)x{*Ao&ZIE-=0Efm<8SrFzH
zW^1SpS9AE@XNJ3PG2`mrAA}D80tjlse}(T%91K5@y!zt#Glst(p6>%04p#I3f7nlM
z35FTRUlELa~)?!G(e5
z!7Ts?AV?hi{{Hy$rwWXf}#VIo;giI=3P3lk>N5sj|V{?eE+lt
z#s&x=um%5qe!KYd<7*TPl#~=0PM*6E#O+qR|Ld;aS3l0K-3}B!1H?i^lzXrLL(3q5
z00Ngq9Hx=k8m4wr6wKV)m!%&{{8#U@Zrn
zQtAkR0D>14f39v{e}|Dpi-m)$OvBunK|oXjlHops@K2zRelm#iNP>J}M2ZCf0mOn7
zZl8cb)qDN_Uxr`bzm};Q*)S;UnxH8D@()sw!AeSEEC2`~7PQED1+wJMw~r6+UpgJE
zX6E1|tE$ByrJ%|n2=vj1H!m6f|NeQC6dwQt5DS(R0J3BWFfZ=B{`qz2^`m?y3@q&0
z42;aOz%2TN;m4QP$#$OX_0YHEO0DhAB)fj_z
Q4FCWD07*qoM6N<$g4@qPaR2}S
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-undo24.gif b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-undo24.gif
new file mode 100644
index 0000000000000000000000000000000000000000..e2c01c01caa53d9f900bb18b5c8b6af671c13e14
GIT binary patch
literal 1282
zcmV+d1^xPoP)H>Q0YCsT!h#5BunmyPWME{BV)*}m8IV0ae%aq6
zP`NN5dL=00yhg48n5S47?(;VD+EhJZ5761eg
z+=98`%>Tp6r!oBf{Dgs-SB7C#XBLB`x*3D2RUm`3k~+h`Z*Lg>{dmvt|MypjMpkYH
zCJsRcCN2?%r}u6$+&;FR;rY!|xydX4PC>Q+Ab`LYFap8M5T<`2X?bvovuCa`=-Bu&
zaI^hn`19!r-f(8&lVSM!i=E-hko^PMtPo5skd^2+`B)9+q2yVe2pauVaeTHk|V0yst2N)zU
z@ZkOrd>hO+R?)>Z!u@NC_)5
zsOa1HPw-<3E7I)00D#&MF0Q%#IQikz=}aXv<=R`
zdG=7mwgr7mz{C*_OdA&sq!_k7dhy*$Q3jz`h=+;c-+u;E5E~$XP<`+h(}G_w&x0`x
z$ckzM^C1H$lIH6K6zV)*`>;W3B}5I|rHK#GA5Dh4t;h$z3_0rBgVK%(51
zNemcwK}yP?qUC9uqRX$dXYM3k*G#PYE%oucJ7#My$
zItX$iB#!RBXIQxP!QMIN{)Yk0eg_ahEToj}zyAEsO)D*DkW*4(_zx@;f4{lG@ax58
z1~xWUu>7lc-xAX}%m2k7!$D#I0Ys7oK+hV{cVLeO_KmZY4WrC6=s6b@=`<{V?ixY^s;P~p@j|}VgKV{f_^ikLP
zn+&}`*MEZP0|+3JeDLEB!_5!xf2;F}@GyLQ{e|JygSQMe7fEbj!KEomu8vqC}0240f1HG6m^#A|>07*qoM6N<$f?8pCZ`2P+Xr{w>~5nkv)IKfM#Y1*c(3C-hKo02Gb~rVnAvy9nJ3ISoaY!C=e|qSs7~!Jg}D
zyJ6Og-+J}A(EZJ*ww#j3$Rj-BNzZkbQKG{*HtL<>k
zA^!#+bOdSZ|692K+!=~$*hVx3FD#?>Cci>=>SP|sp^mi7T_EI{&Wv9oKn~HV&SAa&
zPDotHI%NO4LQ~?3H2*>8bUuj_H1Lt8!@pT=I*Fm}^h17bb^C}y*qrpo9k&9``N%*b
zG~4tnCKbgx$MdOy0S%U(mFFv@h?i?|upv0^ck5+?MvwQ4_J)YsVuoT%$gbppZ8X&c
zE&6;&qiqmtWE^q8(Cl1B%16B2aJm6C6j}ysyufgPF&pGv>OmaIpUTmGl{S!R@1^$a
zu)2eef>;+UNK}7PaQ$o+`nGOz)mUr({Eu4zy6keO-<<2)ee>6L@>YV$PcbqzWp(d!
zctnEG`5NB-!*rl=atlseO2TQf{QTnW&@Vix5G|!uCQ$t#NWvmKX+Xb<)Y`xi;BmbF
zlpf|_b@%l9rvGKp?KuU>@%CHsRvm@(ibodh6QP#&5!v+|
z!FJvvXD(Z~cpT{{`Pnk!GW#F^J>|tDn-BHR!P~QywU))Nq;!@)$4YwsrPr_tzCDv|
zp;F~r(Eke=H?qk(lF1X^-;2`n&Qtc@Qn#DI2(6^a^nuI-&UnhF&6^B&UZglxKc
z%C=C~g?>ZsK`wo^=w!r`!4y0!%=~G66==5Vs3HAJfXjhqqk=fzK`0)f?vMO~KmF5h
zra-TR44IX^ps~J9PHRPvs4@;OVd!GKHCvT0sR`u!8be;=2OQ-^-2SD8y)BLkhA
z?!~{P6jlNd);bSL>)V0}Q(GoT2phw^A8;6JKyxUU`^ia9&NmJ*|Cxk=)D==YP@aD0
zG0Amp-r>bLI-Ec3tfAn<=$mG(luV^$_a=`NAB$?s(2YcC?h_~ly%QU
z170S0smHIcTaIW>4F0z2bCM>(9?hf(Lm_b1i=^%t^c-e=b*&4qC|%^Qtaomin7`gA
zIG+B#PYJr_M?c+g?&@NACI)!JBU^R7n$W2`h5C)Jv)c>}&5E-mcNtoM-aIgM)YfSo?#$6bVd?r%%Uq6l^01TnQ+r3oQyo-h=zrM
z##ZqAvYWLJ7j$9^OChi$o%X0ekg%myzKemuREDuog+uL&+`re1*ke9fNUKZNf{%xr
zM*|~9M*)GzRW|0cOc&lp4TTj}3{tZ)H#t4;+}3Fe5OKvgfpSkR1C`A+t4x&jz6Ahs
zy{~GViJf#+#l5*l_6h#r)(=^Qz}@)4K9)wLeiU1t_#9orGGmi9obLn{q#Q1v|7_ZF
zd-uomGN^Mjdh)3pupaf_ax%(WIxD#)Z_ta##av`6_2iblK8^g?cxraUI}<+;fr
zSHq%7>Y0r~6~ZIPNTZbkVVH#afvd7zuejdT_HPqJ7TGXov6=+^H982so_1usxS|~0
zQwf<C&tTKdwZi*)asV$l`sc4}uQU+UjsdD-+FRSvi<^u4
zYL&gyo@GR4TR9JHU^|a>K&pQUIkaEJ26dIhfWVNk;Tz|Y-x~pEJnC?_h2pcS_p)xw
z^CX!3s1?+ny`iL%{J_H77umo}mrVvIxhk7ixr?j$jD_%8w);M+t?NNoq#qj@|ea;5Bp+AP#_fwqluajTA>C!
zNa81tCF$UM=o}i}tI549gxq;qSg3x~iq0>3lLq9Ul`_j+GY@q~d}s!&)UQE^$ZE4j;WO
zGI=uxOJsOw-s^2izVpbeRk(e!edh0YqZ9a6d;3~zNj_MuqlV@g$&K+4+5K2Y&8^Xf
za(B?}RR?1jr~OAAj;^_N#+Gfmu&6E+_oalLY&RNe55&gM)~XBM^DswA3RJwVmSfkL
zmVCy*uJ8jRft-m6>h*~O;`%7;bhk{7+l5N&jTXaQsF>~u+uoGwo4`9En>&^JjG&mx
zg}J~?&L;Rjn)8TP_`#yxmh>0%;{>waiZ^=ryrf9pNVyQq0VhmH@77&WE4stp{7tra
z1xJ9dSqR9
zTQ`rHYtFoxYt~U%*rwn3ntN0AW#C{-CetXNm31U+ac7HN-Ofuo3B|x?Cf!9+6nK1g
z$3fKFg`F-njT-l<;p?t-`Brf}1bl9@>{R6mwwO1O3b8m^Vf}LUNYdL&Q}gt3U$*Ew
zoQkDC<>
zuqWy{y-dXfooJJ&w!SsVpgWS#Z4js1(s>+MZocTWg!Ok+j#4Jy6irUX?B85x&(k6z
zM|ffcKwG(r+-FPGWTM_gRKgh>M8^?WP|EA03qk<(Y$~mg%PBYrQ|-h9FOkEqYfOrj
zE}uR{8-{1MK;8*nZDV~s2mpqgSp8Vy!^jHB!w%C0x`&2_A?&nT@gx!1;cV-JgeVzC
zR9sf9`uR_2a{;47nU}lN&p%deIK{2L=#tj$o$ED7G73fZE&T8d!<&0ZWNo0G)8Xox
z+*w2YQ6#$7UxSTtuZ@K`JW!RcT=(^6rSh$2A`~nB9W+}48<;?s{u5KWgT7FYJ;qju
zs11(ab4S)NAJdgRdLTFL%g+m?F~WHF_)MayP1ChK^25_{&VkESTf#PSp$bKuPjD%R
zp4YC~g}sHeO@y{EyPrk0xi_2$ri
zpto3XlpgrQ-XMRiKb-r)$tAlObJ6|$k2cD`vEZ$qYDLwAgfg(mckZ@+LK$&fsaHg~
z0(^0hB5OvV#Ia*XWiwL{89)9f=<;}Kf<99NMXiP`4-Ts`8xyo
zkF+)XPx7Zsb)GFGxXWnrXpv=wqPe;v8Y6SXi)`e1!jjIxI`I3g#^&8FB^sStzf7%&
zxV)!tQkvQgu!ERfPlO-m;ZL=9AH(0Od7`CeTPO??hF!c}jCo^i}*^3Da+(
z-Qw+=xcVy7K8TAO!N+;_@P5ULA_xY~^6Mqeu_VPmoBdX$FrGes4Usq7I#o`VC*5Su
zj?IcQsVd1x8T&V~SyearD>!L4i^&qN{@31vSQ1w(7!CeQ8=M8gU84#AsR|9eLh1=Q
z?hkn1kxK558shsO9n=vty7C%zB3yG`sPWHqi;O^quw$V~{mJi@!L-t(v@-CfpDimh
zVk8K|i#lS)9>-cvx#TnqU28|$<@clNc^s;6NxIBDIdU-?zT}J+y?V<@%oHXQ!8et@
zdHG%c7I8QujXhs)NMf$3=En8W!Y
z5dbR*eTNdDpM^9wsRXZ%8#NgU*xg5pAQ@LzqN8HQu8%RD9OPH;mZPOx{VAs&Z1JUY
zQ_r8E%wO~)&ud}=bG}B@RpBGPadO>wNjrh!B8|op9q9*rhgHQhGY{L6vD|JJ-F1ME
zn-BqAomYWWCPbzt}*5G6IoB_-*fjv=_F>C>|h=ztH(GpeK->^y4v_e1>26
zdqFyyN^@~@OM~A;5jbb*k7qji1U9RLZ&NO1X8}!isvFO}*A_mLKfFnV#lipB4+i->
z{M`8~T88@UH8;*|cdl+}T`P-#U_RO`d|b2}X+~PQaWWlW&PAs>-I=}4&~oBMx{me~
z!1EX2*u8bjNI^HWyl`Q}nHDN!J;-(lz1%h8<1lQgb?hoO*^xra8i
z+B$WHJ79#@$1N<{Rc~dQA4qU(fp0)U0LXS(fdYER-lI5(%-8Ell=X=Zpq%;_Z+g!b
zz$NVLEGFZ@djR=K2Dne7Hmlt1yx0XpcHGy5U4D5
zlL?v4a36HjZW-NZj|WT#@#^Ap%@82wKJYZ0A&1tGL>;PqSq#@Ajf1dC;9zH&E)ROj
z|Dg?Nyg-u<^FVaiKaJ$Je|d^6<8Sa^-<;IXM^XI1tRLk0q%8r^UkHh;&vE(OJKx0;
zYas=r1Lq)j{(ra;-tZ`98GEc!m8@*hvBd?no7$Jaw^=xS5nqS!n{Od?xD>X}>Pdoy
zTxyKjCY@i)+IPt(fQpJ-Ks(WdY5)>UPx+cSiGf2q_rBL+CZ?^}s`-qP8Q<=!(9Ynx
zj{l2D0F`*Yh9U)d*cZxc-WTaUBo;KZ8e}%+>q`2Pv}C`MjfuU&jidEkK~Vf*nyiju*^l|)Y+7{Mofa#
zHs3v+qeK!UK(L!UCqWz37av=0UAY}$a!+HGD_>sGUg_;KF-djSI6VJgLsdZoE-?qU
zjSBvb`vTPP2ayv9NAi0oXF7HaM_HLF@e4k&5u01C3db)fIX?}eo)enM_cFl@V5e@mBSBTm3O_#mPqjx+SQxp)lDZ~Hr#*kd}qwAZNKg^lf
zb(GR=b@VfR>r3;8FA-qG+0#ZIIt++IZ>-!xMKmEJ#4BWn~`r-lc$^Ap~JfjoevNdp4Aj1{f_p(ySS$3BrQxGgnbf>ibAgnl>nr*({BhW2sBC?
zwf{TX$GX3%HDDM%=(HS{pU^RS_0J}G6VJp=aCi`wEATSi8iA@HzI|*s|qvE
z8KiOs<~KryugQ5nA1s=d8^~gSlj*pQ^y+!#aQdA8p)Y^xQm2LsOrwi=VmneGWkoQ7
z;*L5KI52+#Qe&lfx8Xpe8&f2v8_?{iqFk=G_y-KNUJLNj^G}woLZ5qDdE9^PQO6>a
zNCa?3xAts1w`+^|1TF;i23K0D?w;~~3mi42`6y}OhRep{R%v=Z{w%YU#|Q9&MjHKJ
zh!L;z$Pdtg=gV;?Frts}iUX2lkNCAXOAc_QC$G0G1JG)pq-)LZ!>Ekfm3|FgOW0vi
z6D6)UkN7)_`p1Gpp*ofn@GG8(5|S!u*cs->4o27U`<9|QLM8fBuBwzR5Fc>;1)RnQ
zDzX{x3!-KL*oY2gm|=J3Wp~f!V8jn5{3&AO|6YkjBYL`voN_kZSqQEig?U#dtbSC|
z>NvPFvRF*d@bLadRSrg+C;4oCTYpXa7U*YqBvhJ9!ANC5jPgT8>$w5tLbS;eUr?a8$N(z^U{mi1
zG(rXvQPm~{lv+MOv>b@rMJyqMyE1B1*%sKS*RN*C*{Hpy?K2J)RtEp>gr-^7w*0)N
z;g27+>yayaOJJCqCS|Z|g=55weR@YI@pcK73tW{7B>&-qzi5mBn@D90Kzk)p923Ss
z9(pq}balqop8(m-8T^bUenQa6n`jv5+Q8eWa
z5Evn{^n)||bQYnP#TYr)igrnI7t340afsmt$cRLzO=N*rxr755Z#V`t-gfY!A@fG3
zjHM%Zz_2Invggj33eegrx4n7oQ*lz|r|W5xGD()~XNSP7JxA=Wa%u)SU%OG71mt>2
zUduXG5%F<_dQACG1<6WbXwFm~H?2x6%r9G_8{`ugHiF1(6i<)3)jAxb0Q}!+1cBJ()Q01mM#xGTvPAu{SDsXDRMEu@DEENdW71FT3wFPs9UM
zAW%W?$3za0{4DSW_;pV@JMPrG^(mmU@pPG~Kn(=QNb@_~e|XXuEhMh5OnRr?u@yz%^s`qq^4m)C<1f
zg~@o39L>n4hYq>D`&uhNs~K*{G_l`u01(n2Q>;A;YG^7A$kptDIAK2w1)hj*c{ZC}
zTYZ(tJ$tBUPtZNXg1X(G8!<|Lmdfb&}oYK(xKoKmJNUjHj6|yg||mRr*R-Dg;M#`
zkuSi^d$ix|r~i}WbBCet-RCrse|G%biLbGg-g}ems4i-k{mm>R17N(dJ$KE&_gEL6
z%3a=6l;6XBry1k5{5hh({SqGO1Hs%4>urEtb@;m{7O646KR_UP;3z5(7K5xl??lbf
zdiu{kee{hu#W&;U$Gg*qC!b952LDC7hBH)&V4C14ht_JK+c`tJLn4Et`RjL*8$B)m
ziL(TL)_4kNx@z(7;s5|`nEc_}zAKRQV(52~oKQd-9wT%E;z5Gvkq=FTPpDg`}9Z40$r4+CYoIN-qfS+yj
zZ)~S_{8%zwXhT2Qo&3O
z&%fE3i4pfQ_a7uz6bV=&N-nUQ4CbJyzvIjY281j(T>t>{jv_eKaggcf+0(Sm%-Vy;
zN@!LK-oO|NVqf?@u;h4`e>;xrhlu3{o+VyT=EPSv4-1%uYt(z!(J*Z3AJ+rIxP6;N
zWKXVU4Vi%Ffa+YI!HaK(N|OM&o&N`>c!()UuDn|iCSjWX7ng9Oq
zxBvve0vu_fQDE85HC(z8#^gRMpTGYDMpi4hB4?XE;dYSct?JF%X;Bl=u|k2Z5GN4`
z?Z~e2VX5hM54U|3SN#06`?l8xll}oiS*G80gsq2&(Hh63#)h-q?`iq=ugCOB+x5cR
z-FFmlq%mqj*wIk}wo`||2-Rxb?-|Y#=Bx;$F=2}?LEJo~)6SD6o4!mwlV2m{_rNf^
zCO;hcN|?WM4Ha!rfmUl>7pM{mU}-!R23qvg3zveMTt+t@a7SBkDRm^G%miD*Ta8f{
zqD`bcKdG*tw~OEUQIK5Q*;=JRmzh)4TmoUwi&7njP
zju+X*)Q{)$L^A{8?
zBq}CsJZtn!vAqJBw-d7G&o7Oc6uf3#f=gb9Ki_HHis73orU2ty9hH_!xCb9q%awt&
zwXRvvoX_RQOG>Wrlaqydg6Cf-p8IJHYm{n%+j!osiU;IdwUQt6we35ZL|1!)>GwVA
z9hL)s_UogWEwLfKgW-iHLHN#0M6xTo(L4Q5*e#ERu+wnz#|xR?)5&88{KW9Q!*U=`
zGhpyyR@aXJum_vA7q!99@^IA*XW@=?JZ|SBVI##b?Uj~(afhBp?uH%WCJo6;g(efqFVvpQiQgv&^vNbVhtb1(jBXb2ydBWDRlTr8V>2QHCyX9VUdBbz_%_=P
zDG-TIyskIQT9WZ4h9S^&*`QdYwQ@t0H8c>ORa8u>^U!xYt5=_|{ZTrOmK$C;BkzT>
zR3^&Ik+Mhrrh^eMNSQF`N#|QT-0#!{Ks+p}zVizZG3A)k4oeEcJiD#xVDP^MkoWa|
zM+E++G-~rl^;kdu`;E*Fna*D%v6E2VNf!w3rMqjD_h}`#u#gBix+;XaUj3s*)&0fQ
zV4MO1qL3{2AGsNQu&O09=@xe}2lfx&>fag%rov^yDDmuKW76)AL|i<$-rBrOJfJoS
zw@Y4A446L=Bmk^qBEeW)sueANF#J}4xyewJgM!Y4+!7pw0?^SWhxYxv1xm0s8yOR?)`wi~()Go97Toe;i@^=-2Gnk*{JgObMIfz^1ShsD?1
z3*Y8TaQ}}?I*(zlIvwiq_sDzF`Gk}-@H1F0zk
z-i9)6TH=XCOCAdz`>}bTs{8dXKNp#9hLA!Z8nY7Sp(E(Q5a=ItK4{iRi1`#6Vh0PD
z0A2(;(3D5)eEj$G)}apsV&h*iTTR~Q)Yg#f58+_}@=`w2JN?nc8v`s#Yq@3zr#O&=
zHjjeQx1;9W$E&Gck)F?y9#ytCo@|C~ss5Up$zikx%dSe;amSA-Ar7HXe$X%~-e(%9
zW|hYdJ;t`|>g8e#WCHlaU+EgNy#0mG(Gv9Au@?_zPQw?JG7OjS`U2rSZ34sj5Kp7T
zIr&r3KJB_knpACnhL0tkZl
zH2TW$V?Ai9uV6jMFMe68*&1o0Sc@HCFrnpsjnnz
zu4r?O)`o{=nQn|4iOk>2ZZ!tg)a!I`Xg(^j95ewf3%mpONQ~S;ghlzmy(YqeEPkww
zcB-OQ@K>&(Qz=t@vE*pkLBO0FjaX0^gXd|SIT%ZD{HN|^HU$Q%4t(@Kv}=8-*0Abe
zexl_{)z`>043wM+zucK_K=o#6BvO
zch+u%di~KJ0*N#66-Oz%PY(=Zd_l5@aB(!$0)dAdOSSHDog#w#X>V1P7(;ZJsw408
z8x7smu)ah{@-u~){}2V+A}_g~M=7D=+<;WeK?wv*$Kus&jP(R_dxllr$Xfvn$RA2r
z;@IQ$x=L`bX_`-09ABby=1vk{FKv^~*nGc@?F_RKc
zcTnN(k9R+wiQ2q0o35{=?G2(?>N8MOSDld$4)}qZWw`oUpNlJce4caB89!~0OG8C>
zCvrl*)U;M_hKx_aj#055d`+DzhCJwmaMg9(m?+^VE^~OX0@xk$(wtDN`
zP}+6`;UCN?8Yvl(PjO1>fFYv{ADt@-R44XZx{%r83eKb1I&5>ZID#&d1tfe5%9!(k
zh~+=w+g|GNK?`yan~W3%hzsm;fLBoG}l
zcAWm((8g6XKoU*LXr-e7MINb4ztw+>>4j3_b*a#ohvHJ_{Y`qABN}s5CSKrw8va6m&aMz4+^zCdn$jyztyh4-VcH)CSX8gzffAUF%q#@{k;Av=J82{25m4R~PfxA#ny5(iO@-8KRcFaaun7W)4JCATZ#@R#yt^
z2P#=5plB12u>k%-(oC!8{L}Z+n#g}YGKE%uiTRy+Riu%1sK4`<4o9L(0k}eg1JzGo
z@h}EUp#EnQ^gRCH<#rxMZtw6PeJ^i!f)5lTG{!JHXOirb;U)mgMWbvE3fOixce|*M
zDWbq`Vn!Oj&b$Fb(|yH-7sE2{Ln@y6r6}W}3fOUK!+4fKQnKpP$mvexdNVYBhvyFr
z4W`7sLz3)&j)FKXDRa&
zNpg&m4G@Z*7+n-(Uw6(s{FS80QALvE{)?b85$*EMgH{Z~PDcBdfQ&yp33KfPl|)NQ
zPdQ+QKaC1K_3+L6W^y4T&~DEk86D&E=t-WD@v{_SZE8ww&fcE-hS-bwL;+q;}6HHEhJNo+6y?5tP_K@+)}nj2rBrMKxexul&zIx)QW
zW;@foR`@5@@k!uFz9TlB&3AZ~2l`_4Af56RWmhLjT0q~GKYizw{;XgR#P~i9JrCuL
z(NJpi?@IA+|5~R`WH%TG@O5$>vhV9+c3Ha%u$_p4f4V(&V?0!J?Kmx|XNK`|Hc|OH
z3qY?Dr=1%mA}v-dd-N2MEUmvW^sQJZ{UDEC$UgmP=t~hAupd#UCxvtI7e%70jBYjb
zLS?Z3Hz`T3LveQ*XaeAJeKsX*uK-!%XEO(WI<2WKAv9)_c#LjA`tcd`>2k4kJaBi3
zyR0Mi6^UB`9yNS33r|6wJ*V^9Mgel#$WCCO0!JViWDv9x7jy%bMZE
z>;?qZ_jx03R}=K`X`=
z3YCC*dM@|Itz_=gC=eiZ%SKp)gm4Dfz*SyMK9}mg{nP%D+Z3E{m8B_ZU*o?iUCh;x
z`#G1^gwEkw0BWSAlmE;Q=cXMi8-@;L#NL&T*9wF?GTeDlTlFJdV<@FfM@dK`>pc^d
z`7u!gqm~c^Gd7&Z76u@X0P;;+r-?D3R0{Up)hN$JiHn!Qd#lTgh`ofxJrQuhXfm^<
ztupK-o2>pM%6O&31)tJ|-s8i#ieJ!^P#WbmmXw6ABt?MlEamOmajg1b!YwlXpt0uN
zXJt49@UX5;1&)F9YM_K9&iU}x(dntZQj&;zh6yMW^A6h>i>_|FZ+13W8qzjZr=~=E
z3vdYsG?U;RHN`Ep)zQd)>VkskA70Ph%{-mX4+k;-L!O6gIKUa&)55r@;6F2mu%MlN
zM8H&dIneVpJq$m$>(R|U$6Lr+;6y6ND19&Os}YZR`ZmKHjyZ@<1(4-(*qRUj#t4Xg
z`47XM{~Tu!F*mYKGkJfO)f1)qfmwZf{Nq1}(_IDN##7+IQ(STxs4zCr#t=?YiKHk|
zWavK9TJ(DGJ3idv*wHpkqW(tKLnWBSRZ~vw0)!ky$eJG(^p&-!Fi@HEsX#KvgNUT{
zOGtKw-6`3w#f=8n871rRd|yakWIFKaYT{xK(B#6dqDM#cx#hhV9RZM|{`Mu0=b8Q6
zzipqnwdJeu8ovC~@s&rAC7m}kmC_`F0Pq86eV7DrDKu6
zD}9}BWi?`a9bn_CIyu3B<0sJAWcz)+6*3-A9{jucOA|Vr0tGGJ8f;87UZ%ft`tSEe
zjt+Sx+lGOdZ_7q`F>%}I&>*%`W#$#?z`d=}F9_Z@W@rs_5R8I4G0ibex;|F$D&XSO
zhLzj%`jE!Xj92~3dI(jC3Qfb7YHtbYP9bQG+MCG=enkPaRU4I~8UAOw{%a~C+fW6M
z;n8=PZmlYh-E9RVd;PTp!z%Y$@F&h+6XJCz~syt007FGBkF$O(@$jBlP-F@J1>w;009*5>ttN7diSxL1{{0{-McX}
zMVt#vy0BPo1bLADH=dfm(Z*N>zWqmVdz6j+$*PSoy;Z`q2(8eoQoDf$U~DZJNAAQZ{9SjE9T-B(+ZmjhU12A(E+~!VBvU&vq(VbUuQUZNDpgQ!9
zi5#G9i^UfpDPW#NptEC_t-)-ljz+3WNAKMFG5eAKb56FGHi?d6vDq7>oS~Q~Ofn*K
zyGV#l}6xw1h#uR`sVTJ5V
z7yla|4>VI=&(JY~1=R}=p383EZa~P4sWqAah4ZX*m+IA!EVtP2T(a2=j8
zgnwuRB(TJxTWVz9?iEAA6A0%7V@HYXD-FYXJ=*iFftI^E(~)E^AI$bRURxbGi
zMUx*m!C=N#n=YeUq7dFoTXp^Qv4H&K--w~-sN0-@1Mc42u61qCgP;8D2yyS+i~cb5
z_f|DSS`dL}}9)hRQ
zw!%r%lmB+ZWz=*0ctxyCu$Z-SST(^-ZY&Wy7#&%hIt>|GlP&R8M1aGSqT73Ln`D=@
z@3d(rVcD?jgl95j4jmqw={1N9xPUL1{il%;%~~p(zujqp`J|w8UXCE%GpAqk>wv5l
zp;|96N88^@Z7BDukm`?DZ2&U{(!6&NWAWk(F1i+WLUX|BwOpKtb=B=6rwd^m4a%o<
z$-HlnKi1%X`|Z!NajYe}(43cQXAQYB)$hx`e^eKg1=H~1f_~etG5YfQB7*cC&rI<^
zSymu^0xnsQ6*JurvJabSfgz)u-IlBPwabO6Q63tH-
zUfOd2cEP^5Kse?~7+HCDj^39kA0Sx^K6sr9lD`36;^8Gx!Mk{4Ud;j+w)XfZoL1#`
z+lD4VWj~XqGOa-RI)`6r_2
z79um>QVoOVd4M%J#!M9-_`(acTN&oFLQ%7DXUbs!8^7-?|0&ibx!!jI9~$cJ7Dt3ZHg`YaS+{Cm_$SV6YkM(u980}Vb~k|wOD%+GxBt!XLPr#vHlpTk5
zyBKYE6az`iNq5l&N9b6!eA|#oG_DcA=JoHlD`2iK#SCkLKxxYiz6Yf-^8(yp*is`B
zG87PJ*GD1)&H3_L`Jm?1ZUZuk0nJ%SSo;vbhev9HtZfjqGz;|q={3dAK}IAX!x0*t
z+j0oDF2O6{S3|;z|Hmg8O7uL(9aSRY3Uu8;)1w9A`(7>o$j6FBK+L`N>4X9G)}DNf
z5^oJ{%^1n&3ZRcck#mp
zl;C;oEJYQ{?_EqD|6H74Kea3ZY_|~){qE!LFX2*~#m(})aXW8W7@gNH#VV6YP^yHP
zx|(*39u8Df59|F5N76ACx^`=-7>CO$eKGSVQmaV+A}0Dt^X>qY+V()dyOK$k=0Vg?
zDY%uZ#$d>B?_Bk?mALOR7_O^Chy;HJ(&C|6@P4b0Ln+;x3!m&Kpr&V}^*f3T$m1gZ
z&0skw&`9ZVHaqF>*e$6Huv$?dgwXgn}Mj_@eU%#K~7D_0Iw1R(*$6nb2kAZ6C&L}1MYhfie^R
zH^29^2u2@88YnF-B28lEo+(uXPqQw{^Je4pO(bA`g$8IpyXV>sMdPtsV}>IhAlm9CxOm%2ht2O=}YZv6d8cOr9ouFh9JWWKdmR5TX1wisnfsx*;>I
zRyre(eZuMA_)|%TC!NOv8l=-%O50fM*B2{%b%s>Ot;h~%Jnz6~jTHEf8d?2bIl`oI
zRD@Z+8B~NYGOAZ-%WVWyyrz$Qn7s4f>?i~z4~(a$IPd-+(7DMQQ1C*QjtC
zDmQS6xwrq}xm%T>y285xv>%X;jObQE!lDj?Wqo@iVSm&noOGG+Rw{ArY>U3p;q6M>
zy%Eu8fNKQ!<@yZc0#ykG$Y=C)iJM=foTflve!zz74Sv?MrSSs)h4DdiWAml+5LJuX
zwv1GYYEh~PVrzGr6C+G-TiT4>kRPRl1V*1@k3-ZZBafRB}5LgB4A*p
zJ3vDc?gf+oc+0jS7gcf3q%b~#3zk?ZsH=DT)7JiU^QlkeXPqd0HfEb|&TfrN+1cCr
zlT4O&p^A>1uJalpA0{UW3HY+4%@g`DQRI^F<}awazsmRu3+xxq7a}FFs?JMh*T%;C
z^;AEZU3{+ZLYPSC@LUY{>3E2cBkB@E0o@Wo*5uYkE0me_+z#U$f1!=!ME@Dh3O==#
z6MX@qOoLuvW$z0Ia`3e2lPu5I$}z!QH~Yqd%!8s2J5$
zr2nu2Wk%#hxMti3{9;G&2A1pv*=?I6mkhtWd2-o@-fW%|kiYZY@QDi_sVMp)*}|rL
zONE9LupfVFQ~zQ0qerCCG2UbmkgG7(Kz!iA`YRz{{srA
zZa{~z_pe{jH=7Bsv>d*u<$$vM%JLRMwg$7N(%&qkQI?!~C9}L)IH1xhM+DPiVp`hN
zuBTsB2TA&I_(9(BA1Y+2wWG56L^OoRYyPUVLV<79Q$f~iKPO;9ei$F({&jhFvMpX#
z*G+_1>VVyU4zqNVV7mZC%&$?Pztj>0S(7*8snl{!g$zZd#%=mBqy#{3`?Nwm$bU&R
z09ki{)>RoX`t3zFZMVQ4Ru7VLo}LLwQF#Z9nj|m1+g$-^&i7ro-7P?C;6xjF@xzpi
z^;1RPTvX1psLVHK!jf)yUiZM1Us^D&HEC6`E+Y4&_jzZz{9Mr$azJoYrHD4^k%R0h
z{bHdF*irzt8GP4h_^ItVaY_H?b3Hr1O>`
zn29EOcZdc~39yE#xOUWPUJssf@|%_QZd#ljP6p59ClS|3Pujhvq^!)R4=a8}i3Gl$
zjhNGB|A+hhuqJdH2+czPW5$!#xIO_~B>HEKCKas4etng;06l1po1
zRJyGWhhH<}hdqL4ruzz1YLn-au^cDXTGc$qIbA_aGcIOsjkGzk(x|y
zR#n#|{8#p|fS_=wtx-EDRmCtD
z+i@zZCdN#+lwIb-NSaV@SE!behWcUj!fEv4)pPz(L^l&6e?<$B2J*
z31Ra?-aFyO^mj;KDiOIzEgI_%AJ%m{3slO7WC%OCMr*PbcnuVj31kOa?LwFn;wI_T
zd3@vCfRFLPXj)}Bh@>ZiXCiOBzoibcjCk70@VSe>bR5FpfdLOXkryYnUtXy9Bs{c;
zC3Mq6w2!?0U{WDUt&H&E5(x@zJ)g9sm@Ke=VPKG*^KG}m`MF2Kz)8Q^E&qChW!H|x
zf2Jelc=GgriGjX4_-l+Y=qWi2b`Y3Dm8eYp3MW&dM_(1ibrYyhST|
zG^N{h^_U!2TYn;s|5*!wy=WMket|FFIR7_GAa4oBxZqp0C7>-#@SQNX
zem%30o(C{MU^jrkOoG<{M4q_a*H;PDnqe$3^=J
z8^P5Q6mW>z&u-EJk2T*6#}&6z2v-b+O`IhjYb1!Z5M=B
z1g)=`z=PVthTyR9PjC5JLfLf7Y1Lo^LH7%EAY2*{Zo}fyj_V6M&tbEP&Ul=UB-MXM
z%yYxzAi0y4u)7_C(%xv|3lnxzG8{3(FHzR3eGC0@5RHLy)Uj*3c5S{FtCet32*jLL~6UL_As*i$!Y_i9`$S
z>#A87lofm@Gke@=WSAXGORzY@k>=Tzy8-U~af89NHyuT+L
z<9usT!z1-QhztVuS5QMvK@`*vv>#G4@fIXZzoT#S2e=fq6NVt5g_s};_&PnM`Kbx`
zcq;HjDW3$4Pjqj3BWGcQ27>nFv$k(IC;6`g(?2u|Umw)L>_9m59~16pT1j7)|3Au?
x0DQsAmjHah%a;Ir!ONEbe8J0?0DQsA{{vb#1)c2ktPcPH002ovPDHLkV1mX31xEk?
literal 0
HcmV?d00001
From 97a1bf90a4147124da0d015a6c115d333ab4b5bd Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Tue, 14 Apr 2020 10:16:37 +0200
Subject: [PATCH 041/500] README.md: added Total Validator and GUIslice Builder
to list of projects that use FlatLaf
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
index 6ddee1d9..c1f0fe1c 100644
--- a/README.md
+++ b/README.md
@@ -80,9 +80,12 @@ Projects using FlatLaf
- [KeyStore Explorer](https://keystore-explorer.org/) 5.4.3
- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) (in weekly releases)
- [XMLmind XML Editor](https://www.xmlmind.com/xmleditor/) 9.3 (commercial)
+- [Total Validator](https://www.totalvalidator.com/) 15 (commercial)
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org)
- [MegaMek](https://github.com/MegaMek/megamek) v0.47.4 and
[MekHQ](https://github.com/MegaMek/mekhq) v0.47.5
+- [GUIslice Builder](https://github.com/ImpulseAdventure/GUIslice-Builder)
+ 0.13.b024
- [Rest Suite](https://github.com/supanadit/restsuite)
- [ControllerBuddy](https://github.com/bwRavencl/ControllerBuddy)
- [SpringRemote](https://github.com/HaleyWang/SpringRemote)
From 225018548722be4ca14a12034bcb691f2b47faff Mon Sep 17 00:00:00 2001
From: Karl Tauber
Date: Tue, 14 Apr 2020 12:41:14 +0200
Subject: [PATCH 042/500] Testing: FlatDisabledIconsTest: use intellij dark
icons in dark themes
---
.../testing/FlatDisabledIconsTest.java | 119 ++++++++++++------
.../flatlaf/testing/FlatDisabledIconsTest.jfd | 12 --
.../intellij-menu-cut@2x_dark.png | Bin 0 -> 536 bytes
.../intellij-menu-cut_dark.png | Bin 0 -> 285 bytes
.../intellij-menu-paste@2x_dark.png | Bin 0 -> 124 bytes
.../intellij-menu-paste_dark.png | Bin 0 -> 99 bytes
.../intellij-search@2x_dark.png | Bin 0 -> 687 bytes
.../intellij-search_dark.png | Bin 0 -> 308 bytes
.../intellij-show@2x_dark.png | Bin 0 -> 467 bytes
.../intellij-showReadAccess@2x_dark.png | Bin 0 -> 511 bytes
.../intellij-showReadAccess_dark.png | Bin 0 -> 324 bytes
.../intellij-showWriteAccess@2x_dark.png | Bin 0 -> 492 bytes
.../intellij-showWriteAccess_dark.png | Bin 0 -> 330 bytes
.../intellij-show_dark.png | Bin 0 -> 273 bytes
14 files changed, 83 insertions(+), 48 deletions(-)
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show@2x_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess@2x_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess@2x_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess_dark.png
create mode 100644 flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show_dark.png
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java
index cb6ed331..fa4a2e96 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.java
@@ -17,6 +17,7 @@
package com.formdev.flatlaf.testing;
import java.awt.Component;
+import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.FilteredImageSource;
@@ -24,6 +25,7 @@ import java.awt.image.ImageProducer;
import java.awt.image.RGBImageFilter;
import java.beans.*;
import javax.swing.*;
+import com.formdev.flatlaf.FlatLaf;
import net.miginfocom.swing.*;
/**
@@ -266,53 +268,17 @@ public class FlatDisabledIconsTest
//---- button6 ----
button6.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/netbeans-find24.gif")));
enabledToolBar.add(button6);
-
- //---- button7 ----
- button7.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut.png")));
enabledToolBar.add(button7);
-
- //---- button8 ----
- button8.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste.png")));
enabledToolBar.add(button8);
-
- //---- button9 ----
- button9.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show.png")));
enabledToolBar.add(button9);
-
- //---- button10 ----
- button10.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png")));
enabledToolBar.add(button10);
-
- //---- button11 ----
- button11.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess.png")));
enabledToolBar.add(button11);
-
- //---- button12 ----
- button12.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search.png")));
enabledToolBar.add(button12);
-
- //---- button13 ----
- button13.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x.png")));
enabledToolBar.add(button13);
-
- //---- button14 ----
- button14.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x.png")));
enabledToolBar.add(button14);
-
- //---- button15 ----
- button15.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show@2x.png")));
enabledToolBar.add(button15);
-
- //---- button16 ----
- button16.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess@2x.png")));
enabledToolBar.add(button16);
-
- //---- button17 ----
- button17.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess@2x.png")));
enabledToolBar.add(button17);
-
- //---- button18 ----
- button18.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x.png")));
enabledToolBar.add(button18);
}
add(enabledToolBar, "cell 1 0");
@@ -468,6 +434,44 @@ public class FlatDisabledIconsTest
selectedCheckBox.addActionListener(e -> selectedChanged());
add(selectedCheckBox, "cell 0 10");
// JFormDesigner - End of component initialization //GEN-END:initComponents
+
+ button7.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut_dark.png" ) );
+ button8.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste_dark.png" ) );
+ button9.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show_dark.png" ) );
+ button10.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess_dark.png" ) );
+ button11.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess_dark.png" ) );
+ button12.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search_dark.png" ) );
+
+ button13.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x_dark.png" ) );
+ button14.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x_dark.png" ) );
+ button15.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show@2x.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show@2x_dark.png" ) );
+ button16.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess@2x.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess@2x_dark.png" ) );
+ button17.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess@2x.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess@2x_dark.png" ) );
+ button18.setIcon( new LightOrDarkIcon(
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x.png",
+ "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x_dark.png" ) );
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
@@ -495,6 +499,49 @@ public class FlatDisabledIconsTest
private JCheckBox selectedCheckBox;
// JFormDesigner - End of variables declaration //GEN-END:variables
+ //---- class LightOrDarkIcon ----------------------------------------------
+
+ private static class LightOrDarkIcon
+ extends ImageIcon
+ {
+ private final ImageIcon lightIcon;
+ private final ImageIcon darkIcon;
+
+ LightOrDarkIcon( String lightIconName, String darkIconName ) {
+ this.lightIcon = new ImageIcon( getClass().getResource( lightIconName ) );
+ this.darkIcon = new ImageIcon( getClass().getResource( darkIconName ) );
+ }
+
+ private ImageIcon getCurrentIcon() {
+ return isDark() ? darkIcon : lightIcon;
+ }
+
+ private boolean isDark() {
+ LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
+ return lookAndFeel instanceof FlatLaf && ((FlatLaf)lookAndFeel).isDark();
+ }
+
+ @Override
+ public int getIconWidth() {
+ return getCurrentIcon().getIconWidth();
+ }
+
+ @Override
+ public int getIconHeight() {
+ return getCurrentIcon().getIconHeight();
+ }
+
+ @Override
+ public synchronized void paintIcon( Component c, Graphics g, int x, int y ) {
+ getCurrentIcon().paintIcon( c, g, x, y );
+ }
+
+ @Override
+ public Image getImage() {
+ return getCurrentIcon().getImage();
+ }
+ }
+
//---- class IntelliJFilterController ------------------------------------
private static class IntelliJFilterController
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.jfd
index b0773567..ca8f1851 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.jfd
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatDisabledIconsTest.jfd
@@ -49,51 +49,39 @@ new FormModel {
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button7"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button8"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button9"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button10"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button11"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button12"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button13"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button14"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button15"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-show@2x.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button16"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showReadAccess@2x.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button17"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-showWriteAccess@2x.png" )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "button18"
- "icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search@2x.png" )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x_dark.png b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-cut@2x_dark.png
new file mode 100644
index 0000000000000000000000000000000000000000..d2b603cbdfdfef9342ccbbe6aa883e586a09a437
GIT binary patch
literal 536
zcmV+z0_XjSP)lYx{H428YHUs~=pyyh;+4b-$+2jHKP$oPN&phC7nfqVl=p4p}
z4Dm>j`gC(tOg97mlqwLosB4@8lD^;s!TNL~zb`8cc9Q3msanQ4zf`_t;()S-GmHyt
zo$H{#uT=uhPpzcA3_|~|3WV{xux^~>F$|Zf-)FR;RPkJCm(7AW-GhR{(tnrp!wh~t
zv;n6hq?8O$yl%&)h^)R8q
z2eJ-5B*(Jxv8x`%)qEg{yvPX@nHU%WQ=1Qfe_}8v^qjDD92eSj3e2i<7&_3gO2th1
zfKEzfnW&r-ntY(|IL?ax*v&V@0(8wAx7^>nd9w(91Awl^NY
zy#RE#>3`Gk>?1m7E#{K*Ev*0y^*n|XjAvQxu
jNy>0T&@7-VGf@Hn_U}5pvwN|o00000NkvXXu0mjfQQ3c>
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x_dark.png b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-menu-paste@2x_dark.png
new file mode 100644
index 0000000000000000000000000000000000000000..fc404c0ea4110e2b21202c6121eedf601b557371
GIT binary patch
literal 124
zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzXHOT$kcwN$2@@WOWpW-u7
vZ4s|?cnA08dkjTS-FYQK*mz=`q<|WK&HB2~@%}V(pe_baS3j3^P64M<6kRkRO7d%2Ye3TxAYtXxEBjTN+zpr9~>+(`ukMz#n+abZvdf;P1j
ziC#!8tVJ%G9@Hk%ut6{zU$_5>fADcQ=iEDIrjiyv5Sj0M|8vjd&IDl?2LDp9Bm<<=
zX`5xRAG+ZUOv4n6!5ugXWsdry0@T7Ngb_Z%kx~b^0P``LOP!D`MSzQj!9T!tI0Y%V
z46hBJ>n=9Hc5UWApjpjq&yAr#!v7L{^pjeMb2UGPk?J;fC*TR!Ba31p@AWui~4?_0FT4~eVqLR$VRx&
z0Ij0_vrmAxVt_UVcnHrT3^TwXZ5a}U26$%(a0~86=wpC`qJGvVz!Nb*F9V!|jtFNN
zpheVw@>zmT?I@LD;0;dZy%K}W
zz&3_h!$U2&5`I#VQfPlL{_q%zVO;`yzL-TQ{
z&^Kp{072wMWZ3n)ATOFvLyhTl{HXv+BP_x^)Y*<_Nq(9+&VMU3yY7eo@5kxi^b?tF
V*5;M(2J-*_002ovPDHLkV1hQQFeU&1
literal 0
HcmV?d00001
diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search_dark.png b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/disabled_icons_test/intellij-search_dark.png
new file mode 100644
index 0000000000000000000000000000000000000000..bdfa83e5e7de88221498690fc1bb2970fee5696b
GIT binary patch
literal 308
zcmV-40n7f0P)#K1#{2f!#XnmQURyo4@N5fjlT>F)n{eMi0~r&pDv!%yq<
z+|RjJYOJ-Ui1&x@`>r1B;YxDf)jfFuGqCW0Egay<+U!?AmyJhgcIG=HAnWY
zsCQ^!;Q-DwkQ&_B^EKcCA%9t}Cki>qmOXz33}He;6>$Bv1sSuB1s=4?L#?K_kc7Aa
zJs#8{;}9c0TjmAmzfle|q&sVgQ7Rw^f)qS#K_8|hW3Sv09k2kKVWC3BSOvs7pag4Y
z@tSoVkc7lgako&0h>IhBHyHuu;}BJ26*j!4&L#J4EaC;ehg=W|rHR7;0000fd%!t
zEn9RzKE@eJo3<2?X8DHA6*z)+`Kqm3C2;9mzka>I`i+|w;|PrgB7MFk0-Mi4mJ{m%
z+>Y21gWqycP;T7(9b2%kUAs*N;nS@K8#Zp*4oYm`9I$Egeo&MkhXhm(-4oxD)nNdj
zg5x-XuLjw2ApbKKHNV$x+GGJ&2aI>@W^FpXfB$|KOy6(X