Compare commits

..

48 Commits
0.35 ... 0.36

Author SHA1 Message Date
Karl Tauber
e7cdc9cf8c release 0.36 2020-06-09 12:33:27 +02:00
Karl Tauber
2443547b3b FlatTestFrame: removed no longer needed nested JRootPane (was used for UI inspector) 2020-06-08 16:03:04 +02:00
Karl Tauber
8424300b5f Demo: faster repainting when enabling/disabling components 2020-06-08 15:58:52 +02:00
Karl Tauber
81822cf7f6 Demo: added UI inspector 2020-06-08 15:45:19 +02:00
Karl Tauber
907956994f Extras: FlatInspector:
- do not increase inspection level when activated with keyboard shortcut
- added some javadoc
- added to CHANGELOG.md and flatlaf-extras/README.md
2020-06-08 15:44:52 +02:00
Karl Tauber
9246cc0607 Extras: added FlatInspector (moved from flatlaf-testing) 2020-06-08 15:03:34 +02:00
Karl Tauber
9f81d147d1 Demo on macOS: enabled screen menu bar by default, except if explicitly disabled 2020-06-08 14:29:47 +02:00
Karl Tauber
b9bd26b2fb FlatSVGIcon: support mapping custom colors 2020-06-08 14:11:06 +02:00
Karl Tauber
1838174678 added "use" tab to javadoc 2020-06-08 12:53:48 +02:00
Karl Tauber
2aad301938 Spinner: fixed arrow positions 2020-06-07 18:27:55 +02:00
Karl Tauber
e18e8e3158 Popup: made Popup.show(), hide() and component listener more robust when used in unusual ways (issue #106) 2020-06-07 15:25:11 +02:00
Karl Tauber
049dae6584 Button: support non-square icon-only buttons (issue #110) 2020-06-03 15:55:14 +02:00
Karl Tauber
6a8bf2acc5 FlatInspector: fixed highlight figure bounds of windows; limit used inspection level to existing components 2020-06-02 16:07:11 +02:00
Karl Tauber
c45a769aa3 update JFrame/JDialog background color when switching Laf 2020-06-02 15:46:36 +02:00
Karl Tauber
e0b0617ad2 macOS Catalina: Use Helvetica Neue font 2020-05-30 21:44:52 +02:00
Karl Tauber
14ec6f6471 FlatInspector: increase/decrease inspection level with Ctrl/Shift keys 2020-05-30 17:35:54 +02:00
Karl Tauber
c4a1341aa9 FlatInspector:
- support ending inspection with ESC key
- inspect component at current mouse location when enabling inspector
2020-05-30 16:53:20 +02:00
Karl Tauber
fc68dfd7bc FlatInspector: support inspecting whole window including menubar and custom window decoration 2020-05-30 15:19:07 +02:00
Karl Tauber
b203ad63ee IntelliJ Themes: updated themes to newest versions (used IJThemesUpdater) 2020-05-28 12:17:46 +02:00
Karl Tauber
a560be11ed InternalFrame: renamed FlatInternalFrameMinimizeIcon to FlatInternalFrameRestoreIcon; added some missing @uiDefault to internal frame icons 2020-05-28 11:50:34 +02:00
Karl Tauber
ebd6375672 Spinner: optimized up/down chevron arrow positions 2020-05-25 13:05:59 +02:00
Karl Tauber
502731d3b0 Spinner: optimized up/down arrow positions 2020-05-24 19:05:28 +02:00
Karl Tauber
283535c429 Demo: use Command modifier to change font size on macOS 2020-05-24 15:26:54 +02:00
Karl Tauber
5cef1f6730 Testing: added font size spinner to control bar; also support Ctrl+0, Ctrl++ and Ctrl+- to change font size 2020-05-24 15:26:07 +02:00
Karl Tauber
7d14fbe739 Testing: do not fail startup when LaF initialization throws UnsupportedClassVersionError (may occur when switching from Java 9+ to Java 8) 2020-05-24 14:48:05 +02:00
Karl Tauber
e9e1e350eb Spinner:
- repaint if JSpinner component gained/lost focus
- paint focus border if JSpinner component is focused
- if spinner gained focus, transfer it to the editor text field
2020-05-24 14:44:36 +02:00
Karl Tauber
566e42cc40 revalidate layout when minimum width client property is changed 2020-05-23 22:57:39 +02:00
Karl Tauber
0abfb5922a ComboBox: minimum width is now 72 pixels (was ~50 for non-editable and ~130 for editable comboboxes) 2020-05-23 22:25:18 +02:00
Karl Tauber
4af8d2f1c5 ComboBox: support custom borders in combobox editors (issue #102) 2020-05-23 18:26:59 +02:00
Karl Tauber
d2d4f73834 ScrollBar: use derived colors for track and thumb (issue #103) 2020-05-23 16:40:09 +02:00
Karl Tauber
53fce4e81d ScrollBar: rotate track/thumb insets for horizontal orientation because they are given for vertical orientation (issue #103) 2020-05-23 14:16:12 +02:00
Karl Tauber
08c439b46e ScrollBar: use rounded thumb on macOS (issue #103) 2020-05-23 13:58:05 +02:00
Karl Tauber
934eb9fc1d ScrollBar: use rounded thumb on Linux (issue #103) 2020-05-23 13:51:25 +02:00
Karl Tauber
fd208a3879 ScrollBar: made styling more flexible by supporting insets and arc for track and thumb (issue #103) 2020-05-23 13:32:31 +02:00
Karl Tauber
10b131e111 Demo: show Java vendor in bottom control bar 2020-05-23 11:28:28 +02:00
Karl Tauber
c4c6faa943 Ubuntu Linux: fixed poorly rendered font (2nd attempt) (issue #105) 2020-05-23 11:06:24 +02:00
Karl Tauber
c7a8d1e1b7 Linux: changing system font did not update FlatLaf font 2020-05-22 18:22:46 +02:00
Karl Tauber
b36ac1b824 UI defaults: added GTKLookAndFeel dump made on Fedora 31 (Adweita theme) 2020-05-21 18:38:46 +02:00
Karl Tauber
bc6cb492f1 Ubuntu Linux: fixed poorly rendered font (issue #105) 2020-05-21 17:11:58 +02:00
Karl Tauber
ce503cedc3 Demo: improved "Font" menu:
- add current font family and size to menu
- filter out unavailable fonts
- select active font family and size
- disable font menu items if non-FlatLaf LaF is active

also show current font in bottom control bar

(issue #105)
2020-05-21 12:24:40 +02:00
Karl Tauber
c900c9cc82 reduce derived colors calculations 2020-05-20 14:49:56 +02:00
Karl Tauber
87b73f26f5 replaced FlatUIUtils.setColor() with deriveColor() for more flexibility 2020-05-20 14:24:22 +02:00
Karl Tauber
be529655d6 UIDefaultsLoader: on color functions use "autoInverse" option by default if "derived" option is set 2020-05-20 00:40:05 +02:00
Karl Tauber
2a0403a988 support CompoundBorder as component border with FlatBorder on the outside 2020-05-19 23:24:00 +02:00
Karl Tauber
815e23b930 ScrollBar: make hoverTrack and hoverThumb fields protected to allow subclasses implement own painting (issue #103) 2020-05-19 19:24:48 +02:00
Karl Tauber
f1c08e7769 FlatTestFrame: added Substance Business skin for testing light UI 2020-05-19 18:42:22 +02:00
Karl Tauber
571f028ca3 FlatComponentsTest: moved components that change something into own "control" panel 2020-05-19 11:31:52 +02:00
Karl Tauber
16d51fe6b4 ComboBox and Spinner: move arrow slightly to the left if round borders are used on the component 2020-05-18 23:26:34 +02:00
73 changed files with 3893 additions and 418 deletions

View File

@@ -1,6 +1,19 @@
FlatLaf Change Log FlatLaf Change Log
================== ==================
## 0.36
- ScrollBar: Made styling more flexible by supporting insets and arc for track
and thumb. (issue #103)
- ComboBox: Minimum width is now 72 pixels (was ~50 for non-editable and ~130
for editable comboboxes).
- ComboBox: Support custom borders in combobox editors. (issue #102)
- Button: Support non-square icon-only buttons. (issue #110)
- Ubuntu Linux: Fixed poorly rendered font. (issue #105)
- macOS Catalina: Use Helvetica Neue font.
- `FlatInspector` added (see [FlatLaf Extras](flatlaf-extras)).
## 0.35 ## 0.35
- Added drop shadows to popup menus, combobox popups, tooltips and internal - Added drop shadows to popup menus, combobox popups, tooltips and internal

View File

@@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
val releaseVersion = "0.35" val releaseVersion = "0.36"
val developmentVersion = "0.36-SNAPSHOT" val developmentVersion = "0.37-SNAPSHOT"
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion

View File

@@ -38,6 +38,7 @@ tasks {
javadoc { javadoc {
options { options {
this as StandardJavadocDocletOptions this as StandardJavadocDocletOptions
use( true )
tags = listOf( "uiDefault", "clientProperty" ) tags = listOf( "uiDefault", "clientProperty" )
addStringOption( "Xdoclint:all,-missing", "-Xdoclint:all,-missing" ) addStringOption( "Xdoclint:all,-missing", "-Xdoclint:all,-missing" )
} }

View File

@@ -99,7 +99,8 @@ public interface FlatClientProperties
/** /**
* Specifies minimum width of a component. * Specifies minimum width of a component.
* <p> * <p>
* <strong>Component</strong> {@link javax.swing.JButton}, {@link javax.swing.JToggleButton} and {@link javax.swing.text.JTextComponent}<br> * <strong>Component</strong> {@link javax.swing.JButton}, {@link javax.swing.JToggleButton},
* {@link javax.swing.JComboBox}, {@link javax.swing.JSpinner} and {@link javax.swing.text.JTextComponent}<br>
* <strong>Value type</strong> {@link java.lang.Integer}<br> * <strong>Value type</strong> {@link java.lang.Integer}<br>
*/ */
String MINIMUM_WIDTH = "JComponent.minimumWidth"; String MINIMUM_WIDTH = "JComponent.minimumWidth";

View File

@@ -74,6 +74,7 @@ public abstract class FlatLaf
private static final String DESKTOPFONTHINTS = "awt.font.desktophints"; private static final String DESKTOPFONTHINTS = "awt.font.desktophints";
private String desktopPropertyName; private String desktopPropertyName;
private String desktopPropertyName2;
private PropertyChangeListener desktopPropertyListener; private PropertyChangeListener desktopPropertyListener;
private static boolean aquaLoaded; private static boolean aquaLoaded;
@@ -160,15 +161,19 @@ public abstract class FlatLaf
// Settings > Ease of Access > Display > Make text bigger (100% - 225%) // Settings > Ease of Access > Display > Make text bigger (100% - 225%)
desktopPropertyName = "win.messagebox.font"; desktopPropertyName = "win.messagebox.font";
} else if( SystemInfo.IS_LINUX ) { } else if( SystemInfo.IS_LINUX ) {
// Linux/Gnome allows changing font in "Tweaks" app
desktopPropertyName = "gnome.Gtk/FontName";
// Linux/Gnome allows extra scaling and larger text: // Linux/Gnome allows extra scaling and larger text:
// Settings > Devices > Displays > Scale (100% or 200%) // Settings > Devices > Displays > Scale (100% or 200%)
// Settings > Universal access > Large Text (off or on, 125%) // Settings > Universal access > Large Text (off or on, 125%)
desktopPropertyName = "gnome.Xft/DPI"; // "Tweaks" app > Fonts > Scaling Factor (0,5 - 3)
desktopPropertyName2 = "gnome.Xft/DPI";
} }
if( desktopPropertyName != null ) { if( desktopPropertyName != null ) {
desktopPropertyListener = e -> { desktopPropertyListener = e -> {
String propertyName = e.getPropertyName(); String propertyName = e.getPropertyName();
if( desktopPropertyName.equals( propertyName ) ) if( desktopPropertyName.equals( propertyName ) || propertyName.equals( desktopPropertyName2 ) )
reSetLookAndFeel(); reSetLookAndFeel();
else if( DESKTOPFONTHINTS.equals( propertyName ) ) { else if( DESKTOPFONTHINTS.equals( propertyName ) ) {
if( UIManager.getLookAndFeel() instanceof FlatLaf ) { if( UIManager.getLookAndFeel() instanceof FlatLaf ) {
@@ -179,6 +184,8 @@ public abstract class FlatLaf
}; };
Toolkit toolkit = Toolkit.getDefaultToolkit(); Toolkit toolkit = Toolkit.getDefaultToolkit();
toolkit.addPropertyChangeListener( desktopPropertyName, desktopPropertyListener ); toolkit.addPropertyChangeListener( desktopPropertyName, desktopPropertyListener );
if( desktopPropertyName2 != null )
toolkit.addPropertyChangeListener( desktopPropertyName2, desktopPropertyListener );
toolkit.addPropertyChangeListener( DESKTOPFONTHINTS, desktopPropertyListener ); toolkit.addPropertyChangeListener( DESKTOPFONTHINTS, desktopPropertyListener );
} }
@@ -201,8 +208,11 @@ public abstract class FlatLaf
if( desktopPropertyListener != null ) { if( desktopPropertyListener != null ) {
Toolkit toolkit = Toolkit.getDefaultToolkit(); Toolkit toolkit = Toolkit.getDefaultToolkit();
toolkit.removePropertyChangeListener( desktopPropertyName, desktopPropertyListener ); toolkit.removePropertyChangeListener( desktopPropertyName, desktopPropertyListener );
if( desktopPropertyName2 != null )
toolkit.removePropertyChangeListener( desktopPropertyName2, desktopPropertyListener );
toolkit.removePropertyChangeListener( DESKTOPFONTHINTS, desktopPropertyListener ); toolkit.removePropertyChangeListener( DESKTOPFONTHINTS, desktopPropertyListener );
desktopPropertyName = null; desktopPropertyName = null;
desktopPropertyName2 = null;
desktopPropertyListener = null; desktopPropertyListener = null;
} }
@@ -367,7 +377,10 @@ public abstract class FlatLaf
} else if( SystemInfo.IS_MAC ) { } else if( SystemInfo.IS_MAC ) {
String fontName; String fontName;
if( SystemInfo.IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER ) { if( SystemInfo.IS_MAC_OS_10_15_CATALINA_OR_LATER ) {
// use Helvetica Neue font
fontName = "Helvetica Neue";
} else if( SystemInfo.IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER ) {
// use San Francisco Text font // use San Francisco Text font
fontName = ".SF NS Text"; fontName = ".SF NS Text";
} else { } else {
@@ -409,7 +422,7 @@ public abstract class FlatLaf
// using StyleContext.getFont() here because it uses // using StyleContext.getFont() here because it uses
// sun.font.FontUtilities.getCompositeFontUIResource() // sun.font.FontUtilities.getCompositeFontUIResource()
// and creates a composite font that is able to display all Unicode characters // and creates a composite font that is able to display all Unicode characters
Font font = new StyleContext().getFont( family, style, size ); Font font = StyleContext.getDefaultStyleContext().getFont( family, style, size );
return (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font ); return (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
} }

View File

@@ -74,6 +74,13 @@ class LinuxFontPolicy
family = family.isEmpty() ? word : (family + ' ' + word); family = family.isEmpty() ? word : (family + ' ' + word);
} }
// Ubuntu font is rendered poorly (except if running in JetBrains VM)
// --> use Liberation Sans font
if( family.startsWith( "Ubuntu" ) &&
!SystemInfo.IS_JETBRAINS_JVM &&
!Boolean.parseBoolean( System.getProperty( "flatlaf.useUbuntuFont" ) ) )
family = "Liberation Sans";
// scale font size // scale font size
double dsize = size * getGnomeFontScale(); double dsize = size * getGnomeFontScale();
size = (int) (dsize + 0.5); size = (int) (dsize + 0.5);

View File

@@ -572,7 +572,7 @@ class UIDefaultsLoader
* saturate(color,amount[,options]) or desaturate(color,amount[,options]) * saturate(color,amount[,options]) or desaturate(color,amount[,options])
* - color: a color (e.g. #f00) or a color function * - color: a color (e.g. #f00) or a color function
* - amount: percentage 0-100% * - amount: percentage 0-100%
* - options: [relative] [autoInverse] [lazy] [derived] * - options: [relative] [autoInverse] [noAutoInverse] [lazy] [derived]
*/ */
private static Object parseColorHSLIncreaseDecrease( int hslIndex, boolean increase, private static Object parseColorHSLIncreaseDecrease( int hslIndex, boolean increase,
List<String> params, Function<String, String> resolver, boolean reportError ) List<String> params, Function<String, String> resolver, boolean reportError )
@@ -590,6 +590,10 @@ class UIDefaultsLoader
autoInverse = options.contains( "autoInverse" ); autoInverse = options.contains( "autoInverse" );
lazy = options.contains( "lazy" ); lazy = options.contains( "lazy" );
derived = options.contains( "derived" ); derived = options.contains( "derived" );
// use autoInverse by default for derived colors, except if noAutoInverse is set
if( derived && !options.contains( "noAutoInverse" ) )
autoInverse = true;
} }
// create function // create function
@@ -606,15 +610,17 @@ class UIDefaultsLoader
} }
// parse base color // parse base color
ColorUIResource baseColor = (ColorUIResource) parseColorOrFunction( resolver.apply( colorStr ), resolver, reportError ); String resolvedColorStr = resolver.apply( colorStr );
ColorUIResource baseColor = (ColorUIResource) parseColorOrFunction( resolvedColorStr, resolver, reportError );
// apply this function to base color // apply this function to base color
Color newColor = ColorFunctions.applyFunctions( baseColor, function ); Color newColor = ColorFunctions.applyFunctions( baseColor, function );
if( derived ) { if( derived ) {
ColorFunction[] functions; ColorFunction[] functions;
if( baseColor instanceof DerivedColor ) { if( baseColor instanceof DerivedColor && resolvedColorStr == colorStr ) {
// if the base color is also derived, join the color functions // if the base color is also derived, join the color functions
// but only if base color function is specified directly in this function
ColorFunction[] baseFunctions = ((DerivedColor)baseColor).getFunctions(); ColorFunction[] baseFunctions = ((DerivedColor)baseColor).getFunctions();
functions = new ColorFunction[baseFunctions.length + 1]; functions = new ColorFunction[baseFunctions.length + 1];
System.arraycopy( baseFunctions, 0, functions, 0, baseFunctions.length ); System.arraycopy( baseFunctions, 0, functions, 0, baseFunctions.length );

View File

@@ -111,13 +111,13 @@ public class FlatCheckBoxIcon
paintBorder( g2 ); paintBorder( g2 );
// paint background // paint background
FlatUIUtils.setColor( g2, FlatButtonUI.buttonStateColor( c, g2.setColor( FlatUIUtils.deriveColor( FlatButtonUI.buttonStateColor( c,
selected ? selectedBackground : background, selected ? selectedBackground : background,
disabledBackground, disabledBackground,
focusedBackground, focusedBackground,
selected && selectedHoverBackground != null ? selectedHoverBackground : hoverBackground, selected && selectedHoverBackground != null ? selectedHoverBackground : hoverBackground,
selected && selectedPressedBackground != null ? selectedPressedBackground : pressedBackground ), selected && selectedPressedBackground != null ? selectedPressedBackground : pressedBackground ),
background ); background ) );
paintBackground( g2 ); paintBackground( g2 );
// paint checkmark // paint checkmark

View File

@@ -100,12 +100,12 @@ public class FlatHelpButtonIcon
g2.fill( new Ellipse2D.Float( focusWidth + 0.5f, focusWidth + 0.5f, 21, 21 ) ); g2.fill( new Ellipse2D.Float( focusWidth + 0.5f, focusWidth + 0.5f, 21, 21 ) );
// paint background // paint background
FlatUIUtils.setColor( g2, FlatButtonUI.buttonStateColor( c, g2.setColor( FlatUIUtils.deriveColor( FlatButtonUI.buttonStateColor( c,
background, background,
disabledBackground, disabledBackground,
focusedBackground, focusedBackground,
hoverBackground, hoverBackground,
pressedBackground ), background ); pressedBackground ), background ) );
g2.fill( new Ellipse2D.Float( focusWidth + 1.5f, focusWidth + 1.5f, 19, 19 ) ); g2.fill( new Ellipse2D.Float( focusWidth + 1.5f, focusWidth + 1.5f, 19, 19 ) );
// paint question mark // paint question mark

View File

@@ -27,6 +27,7 @@ import com.formdev.flatlaf.ui.FlatUIUtils;
/** /**
* Base class for internal frame icons. * Base class for internal frame icons.
* *
* @uiDefault InternalFrame.buttonSize Dimension
* @uiDefault InternalFrame.buttonHoverBackground Color * @uiDefault InternalFrame.buttonHoverBackground Color
* @uiDefault InternalFrame.buttonPressedBackground Color * @uiDefault InternalFrame.buttonPressedBackground Color
* *
@@ -53,7 +54,7 @@ public abstract class FlatInternalFrameAbstractIcon
protected void paintBackground( Component c, Graphics2D g ) { protected void paintBackground( Component c, Graphics2D g ) {
Color background = FlatButtonUI.buttonStateColor( c, null, null, null, hoverBackground, pressedBackground ); Color background = FlatButtonUI.buttonStateColor( c, null, null, null, hoverBackground, pressedBackground );
if( background != null ) { if( background != null ) {
FlatUIUtils.setColor( g, background, c.getBackground() ); g.setColor( FlatUIUtils.deriveColor( background, c.getBackground() ) );
g.fillRect( 0, 0, width, height ); g.fillRect( 0, 0, width, height );
} }
} }

View File

@@ -28,8 +28,11 @@ import com.formdev.flatlaf.ui.FlatButtonUI;
/** /**
* "close" icon for {@link javax.swing.JInternalFrame}. * "close" icon for {@link javax.swing.JInternalFrame}.
* *
* @uiDefault InternalFrame.buttonHoverBackground Color * @uiDefault InternalFrame.buttonSize Dimension
* @uiDefault InternalFrame.buttonPressedBackground Color * @uiDefault InternalFrame.closeHoverBackground Color
* @uiDefault InternalFrame.closePressedBackground Color
* @uiDefault InternalFrame.closeHoverForeground Color
* @uiDefault InternalFrame.closePressedForeground Color
* *
* @author Karl Tauber * @author Karl Tauber
*/ */

View File

@@ -24,14 +24,14 @@ import java.awt.geom.Rectangle2D;
import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils;
/** /**
* "minimize" (actually "restore") icon for {@link javax.swing.JInternalFrame}. * "restore" (or "minimize") icon for {@link javax.swing.JInternalFrame}.
* *
* @author Karl Tauber * @author Karl Tauber
*/ */
public class FlatInternalFrameMinimizeIcon public class FlatInternalFrameRestoreIcon
extends FlatInternalFrameAbstractIcon extends FlatInternalFrameAbstractIcon
{ {
public FlatInternalFrameMinimizeIcon() { public FlatInternalFrameRestoreIcon() {
} }
@Override @Override

View File

@@ -19,6 +19,7 @@ package com.formdev.flatlaf.ui;
import static com.formdev.flatlaf.util.UIScale.scale; import static com.formdev.flatlaf.util.UIScale.scale;
import java.awt.BasicStroke; import java.awt.BasicStroke;
import java.awt.Color; import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
@@ -26,6 +27,7 @@ import java.awt.Shape;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.geom.Path2D; import java.awt.geom.Path2D;
import javax.swing.JComponent;
import javax.swing.plaf.UIResource; import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicArrowButton; import javax.swing.plaf.basic.BasicArrowButton;
@@ -111,6 +113,10 @@ public class FlatArrowButton
this.yOffset = yOffset; this.yOffset = yOffset;
} }
protected Color deriveHoverBackground( Color hoverBackground ) {
return hoverBackground;
}
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return scale( super.getPreferredSize() ); return scale( super.getPreferredSize() );
@@ -132,31 +138,44 @@ public class FlatArrowButton
// paint hover background // paint hover background
if( enabled && isHover() && hoverBackground != null ) { if( enabled && isHover() && hoverBackground != null ) {
g.setColor( hoverBackground ); g.setColor( deriveHoverBackground( hoverBackground ) );
g.fillRect( 0, 0, width, height ); g.fillRect( 0, 0, width, height );
} }
int direction = getDirection(); int direction = getDirection();
boolean vert = (direction == NORTH || direction == SOUTH); boolean vert = (direction == NORTH || direction == SOUTH);
// compute width/height
int w = scale( arrowWidth + (chevron ? 0 : 1) ); int w = scale( arrowWidth + (chevron ? 0 : 1) );
int h = scale( (arrowWidth / 2) + (chevron ? 0 : 1) ); int h = scale( (arrowWidth / 2) + (chevron ? 0 : 1) );
// rotate width/height
int rw = vert ? w : h; int rw = vert ? w : h;
int rh = vert ? h : w; int rh = vert ? h : w;
// chevron lines end 1px outside of width/height
if( chevron ) {
// add 1px to width/height for position calculation only
rw++;
rh++;
}
int x = Math.round( (width - rw) / 2f + scale( (float) xOffset ) ); int x = Math.round( (width - rw) / 2f + scale( (float) xOffset ) );
int y = Math.round( (height - rh) / 2f + scale( (float) yOffset ) ); int y = Math.round( (height - rh) / 2f + scale( (float) yOffset ) );
// optimization for small chevron arrows (e.g. OneTouchButtons in SplitPane) // move arrow for round borders
if( x + rw >= width && x > 0 ) Container parent = getParent();
x--; if( vert && parent instanceof JComponent && FlatUIUtils.hasRoundBorder( (JComponent) parent ) )
if( y + rh >= height && y > 0 ) x -= scale( parent.getComponentOrientation().isLeftToRight() ? 1 : -1 );
y--;
// paint arrow // paint arrow
g.setColor( enabled g.setColor( enabled
? (isHover() && hoverForeground != null ? hoverForeground : foreground) ? (isHover() && hoverForeground != null ? hoverForeground : foreground)
: disabledForeground ); : disabledForeground );
g.translate( x, y ); g.translate( x, y );
/*debug
debugPaint( g2, vert, rw, rh );
debug*/
Shape arrowShape = createArrowShape( direction, chevron, w, h ); Shape arrowShape = createArrowShape( direction, chevron, w, h );
if( chevron ) { if( chevron ) {
g2.setStroke( new BasicStroke( scale( 1f ) ) ); g2.setStroke( new BasicStroke( scale( 1f ) ) );
@@ -177,4 +196,22 @@ public class FlatArrowButton
default: return new Path2D.Float(); default: return new Path2D.Float();
} }
} }
/*debug
private void debugPaint( Graphics g, boolean vert, int w, int h ) {
Color oldColor = g.getColor();
g.setColor( Color.red );
g.drawRect( 0, 0, w - 1, h - 1 );
int xy1 = -2;
int xy2 = h + 1;
for( int i = 0; i < 20; i++ ) {
g.drawRect( vert ? 0 : xy1, vert ? xy1 : 0, 0, 0 );
g.drawRect( vert ? 0 : xy2, vert ? xy2 : 0, 0, 0 );
xy1 -= 2;
xy2 += 2;
}
g.setColor( oldColor );
}
debug*/
} }

View File

@@ -178,6 +178,9 @@ public class FlatBorder
Component editorComponent = ((JComboBox<?>)c).getEditor().getEditorComponent(); Component editorComponent = ((JComboBox<?>)c).getEditor().getEditorComponent();
return (editorComponent != null) ? FlatUIUtils.isPermanentFocusOwner( editorComponent ) : false; return (editorComponent != null) ? FlatUIUtils.isPermanentFocusOwner( editorComponent ) : false;
} else if( c instanceof JSpinner ) { } else if( c instanceof JSpinner ) {
if( FlatUIUtils.isPermanentFocusOwner( c ) )
return true;
JComponent editor = ((JSpinner)c).getEditor(); JComponent editor = ((JSpinner)c).getEditor();
if( editor instanceof JSpinner.DefaultEditor ) { if( editor instanceof JSpinner.DefaultEditor ) {
JTextField textField = ((JSpinner.DefaultEditor)editor).getTextField(); JTextField textField = ((JSpinner.DefaultEditor)editor).getTextField();

View File

@@ -114,8 +114,8 @@ public class FlatButtonBorder
} else { } else {
insets = super.getBorderInsets( c, insets ); insets = super.getBorderInsets( c, insets );
// use smaller left and right insets for icon-only buttons (so that they are square) // use smaller left and right insets for icon-only or single-character buttons (so that they are square)
if( FlatButtonUI.isIconOnlyButton( c ) && ((AbstractButton)c).getMargin() instanceof UIResource ) if( FlatButtonUI.isIconOnlyOrSingleCharacterButton( c ) && ((AbstractButton)c).getMargin() instanceof UIResource )
insets.left = insets.right = Math.min( insets.top, insets.bottom ); insets.left = insets.right = Math.min( insets.top, insets.bottom );
} }

View File

@@ -210,6 +210,7 @@ public class FlatButtonUI
break; break;
case BUTTON_TYPE: case BUTTON_TYPE:
b.revalidate();
b.repaint(); b.repaint();
break; break;
} }
@@ -223,7 +224,11 @@ public class FlatButtonUI
return c instanceof JButton && ((JButton)c).isDefaultButton(); return c instanceof JButton && ((JButton)c).isDefaultButton();
} }
static boolean isIconOnlyButton( Component c ) { /**
* Returns true if the button has an icon but no text,
* or it it does not have an icon and the text is either "..." or one character.
*/
static boolean isIconOnlyOrSingleCharacterButton( Component c ) {
if( !(c instanceof JButton) && !(c instanceof JToggleButton) ) if( !(c instanceof JButton) && !(c instanceof JToggleButton) )
return false; return false;
@@ -312,7 +317,7 @@ public class FlatButtonUI
if( background == startBg && endBg != null && !startBg.equals( endBg ) ) if( background == startBg && endBg != null && !startBg.equals( endBg ) )
g2.setPaint( new GradientPaint( 0, 0, startBg, 0, height, endBg ) ); g2.setPaint( new GradientPaint( 0, 0, startBg, 0, height, endBg ) );
else else
FlatUIUtils.setColor( g2, background, def ? defaultBackground : c.getBackground() ); g2.setColor( FlatUIUtils.deriveColor( background, def ? defaultBackground : c.getBackground() ) );
FlatUIUtils.paintComponentBackground( g2, x, y, width, height, focusWidth, arc ); FlatUIUtils.paintComponentBackground( g2, x, y, width, height, focusWidth, arc );
} finally { } finally {
@@ -408,11 +413,13 @@ public class FlatButtonUI
if( prefSize == null ) if( prefSize == null )
return null; return null;
// make button square if it is a icon-only button // make button square if it is a single-character button
// or apply minimum width, if not in toolbar and not a icon-only button // or apply minimum width, if not in toolbar and not a icon-only or single-character button
if( isIconOnlyButton( c ) ) if( isIconOnlyOrSingleCharacterButton( c ) ) {
prefSize.width = Math.max( prefSize.width, prefSize.height ); // make only single-character buttons square to allow non-square icon-only buttons
else if( !isToolBarButton( c ) && c.getBorder() instanceof FlatButtonBorder ) { if( ((AbstractButton)c).getIcon() == null )
prefSize.width = Math.max( prefSize.width, prefSize.height );
} else if( !isToolBarButton( c ) && c.getBorder() instanceof FlatButtonBorder ) {
float focusWidth = FlatUIUtils.getBorderFocusWidth( c ); float focusWidth = FlatUIUtils.getBorderFocusWidth( c );
prefSize.width = Math.max( prefSize.width, scale( FlatUIUtils.minimumWidth( c, minimumWidth ) ) + Math.round( focusWidth * 2 ) ); prefSize.width = Math.max( prefSize.width, scale( FlatUIUtils.minimumWidth( c, minimumWidth ) ) + Math.round( focusWidth * 2 ) );
prefSize.height = Math.max( prefSize.height, scale( FlatUIUtils.minimumHeight( c, 0 ) ) + Math.round( focusWidth * 2 ) ); prefSize.height = Math.max( prefSize.height, scale( FlatUIUtils.minimumHeight( c, 0 ) ) + Math.round( focusWidth * 2 ) );

View File

@@ -39,6 +39,7 @@ import java.beans.PropertyChangeListener;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import javax.swing.AbstractAction; import javax.swing.AbstractAction;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.ComboBoxEditor;
import javax.swing.DefaultListCellRenderer; import javax.swing.DefaultListCellRenderer;
import javax.swing.InputMap; import javax.swing.InputMap;
import javax.swing.JButton; import javax.swing.JButton;
@@ -46,6 +47,7 @@ import javax.swing.JComboBox;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JList; import javax.swing.JList;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import javax.swing.ListCellRenderer; import javax.swing.ListCellRenderer;
import javax.swing.LookAndFeel; import javax.swing.LookAndFeel;
@@ -76,6 +78,8 @@ import com.formdev.flatlaf.util.UIScale;
* *
* <!-- FlatComboBoxUI --> * <!-- FlatComboBoxUI -->
* *
* @uiDefault ComboBox.minimumWidth int
* @uiDefault ComboBox.editorColumns int
* @uiDefault Component.arrowType String triangle (default) or chevron * @uiDefault Component.arrowType String triangle (default) or chevron
* @uiDefault Component.isIntelliJTheme boolean * @uiDefault Component.isIntelliJTheme boolean
* @uiDefault Component.borderColor Color * @uiDefault Component.borderColor Color
@@ -94,6 +98,8 @@ import com.formdev.flatlaf.util.UIScale;
public class FlatComboBoxUI public class FlatComboBoxUI
extends BasicComboBoxUI extends BasicComboBoxUI
{ {
protected int minimumWidth;
protected int editorColumns;
protected String arrowType; protected String arrowType;
protected boolean isIntelliJTheme; protected boolean isIntelliJTheme;
protected Color borderColor; protected Color borderColor;
@@ -146,6 +152,8 @@ public class FlatComboBoxUI
LookAndFeel.installProperty( comboBox, "opaque", false ); LookAndFeel.installProperty( comboBox, "opaque", false );
minimumWidth = UIManager.getInt( "ComboBox.minimumWidth" );
editorColumns = UIManager.getInt( "ComboBox.editorColumns" );
arrowType = UIManager.getString( "Component.arrowType" ); arrowType = UIManager.getString( "Component.arrowType" );
isIntelliJTheme = UIManager.getBoolean( "Component.isIntelliJTheme" ); isIntelliJTheme = UIManager.getBoolean( "Component.isIntelliJTheme" );
borderColor = UIManager.getColor( "Component.borderColor" ); borderColor = UIManager.getColor( "Component.borderColor" );
@@ -245,6 +253,8 @@ public class FlatComboBoxUI
editor.repaint(); editor.repaint();
else if( FlatClientProperties.COMPONENT_ROUND_RECT.equals( propertyName ) ) else if( FlatClientProperties.COMPONENT_ROUND_RECT.equals( propertyName ) )
comboBox.repaint(); comboBox.repaint();
else if( FlatClientProperties.MINIMUM_WIDTH.equals( propertyName ) )
comboBox.revalidate();
} }
}; };
} }
@@ -254,18 +264,30 @@ public class FlatComboBoxUI
return new FlatComboPopup( comboBox ); return new FlatComboPopup( comboBox );
} }
@Override
protected ComboBoxEditor createEditor() {
ComboBoxEditor comboBoxEditor = super.createEditor();
Component editor = comboBoxEditor.getEditorComponent();
if( editor instanceof JTextField ) {
JTextField textField = (JTextField) editor;
textField.setColumns( editorColumns );
// assign a non-null and non-javax.swing.plaf.UIResource border to the text field,
// otherwise it is replaced with default text field border when switching LaF
// because javax.swing.plaf.basic.BasicComboBoxEditor.BorderlessTextField.setBorder()
// uses "border instanceof javax.swing.plaf.basic.BasicComboBoxEditor.UIResource"
// instead of "border instanceof javax.swing.plaf.UIResource"
textField.setBorder( BorderFactory.createEmptyBorder() );
}
return comboBoxEditor;
}
@Override @Override
protected void configureEditor() { protected void configureEditor() {
super.configureEditor(); super.configureEditor();
// assign a non-javax.swing.plaf.UIResource border to the text field,
// otherwise it is replaced with default text field border when switching LaF
// because javax.swing.plaf.basic.BasicComboBoxEditor.BorderlessTextField.setBorder()
// uses "border instanceof javax.swing.plaf.basic.BasicComboBoxEditor.UIResource"
// instead of "border instanceof javax.swing.plaf.UIResource"
if( editor instanceof JTextComponent )
((JTextComponent)editor).setBorder( BorderFactory.createEmptyBorder() );
// explicitly make non-opaque // explicitly make non-opaque
if( editor instanceof JComponent ) if( editor instanceof JComponent )
((JComponent)editor).setOpaque( false ); ((JComponent)editor).setOpaque( false );
@@ -398,6 +420,13 @@ public class FlatComboBoxUI
return isIntelliJTheme ? FlatUIUtils.getParentBackground( c ) : disabledBackground; return isIntelliJTheme ? FlatUIUtils.getParentBackground( c ) : disabledBackground;
} }
@Override
public Dimension getMinimumSize( JComponent c ) {
Dimension minimumSize = super.getMinimumSize( c );
minimumSize.width = Math.max( minimumSize.width, scale( FlatUIUtils.minimumWidth( c, minimumWidth ) ) );
return minimumSize;
}
@Override @Override
protected Dimension getDefaultSize() { protected Dimension getDefaultSize() {
@SuppressWarnings( "unchecked" ) @SuppressWarnings( "unchecked" )
@@ -418,6 +447,18 @@ public class FlatComboBoxUI
Dimension displaySize = super.getDisplaySize(); Dimension displaySize = super.getDisplaySize();
// recalculate width without hardcoded 100 under special conditions
if( displaySize.width == 100 + padding.left + padding.right &&
comboBox.isEditable() &&
comboBox.getItemCount() == 0 &&
comboBox.getPrototypeDisplayValue() == null )
{
int width = getDefaultSize().width;
width = Math.max( width, editor.getPreferredSize().width );
width += padding.left + padding.right;
displaySize = new Dimension( width, displaySize.height );
}
uninstallCellPaddingBorder( renderer ); uninstallCellPaddingBorder( renderer );
return displaySize; return displaySize;
} }

View File

@@ -19,6 +19,7 @@ package com.formdev.flatlaf.ui;
import static com.formdev.flatlaf.util.UIScale.scale; import static com.formdev.flatlaf.util.UIScale.scale;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.beans.PropertyChangeEvent;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JEditorPane; import javax.swing.JEditorPane;
import javax.swing.UIManager; import javax.swing.UIManager;
@@ -26,6 +27,7 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource; import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicEditorPaneUI; import javax.swing.plaf.basic.BasicEditorPaneUI;
import javax.swing.text.JTextComponent; import javax.swing.text.JTextComponent;
import com.formdev.flatlaf.FlatClientProperties;
/** /**
* Provides the Flat LaF UI delegate for {@link javax.swing.JEditorPane}. * Provides the Flat LaF UI delegate for {@link javax.swing.JEditorPane}.
@@ -83,6 +85,20 @@ public class FlatEditorPaneUI
getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties ); getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties );
} }
@Override
protected void propertyChange( PropertyChangeEvent e ) {
super.propertyChange( e );
propertyChange( getComponent(), e );
}
static void propertyChange( JTextComponent c, PropertyChangeEvent e ) {
switch( e.getPropertyName() ) {
case FlatClientProperties.MINIMUM_WIDTH:
c.revalidate();
break;
}
}
@Override @Override
public Dimension getPreferredSize( JComponent c ) { public Dimension getPreferredSize( JComponent c ) {
return applyMinimumWidth( c, super.getPreferredSize( c ), minimumWidth ); return applyMinimumWidth( c, super.getPreferredSize( c ), minimumWidth );

View File

@@ -151,7 +151,7 @@ public class FlatMenuUI
if( model.isRollover() && !model.isArmed() && !model.isSelected() && if( model.isRollover() && !model.isArmed() && !model.isSelected() &&
model.isEnabled() && ((JMenu)menuItem).isTopLevelMenu() ) model.isEnabled() && ((JMenu)menuItem).isTopLevelMenu() )
{ {
FlatUIUtils.setColor( g, hoverBackground, menuItem.getBackground() ); g.setColor( FlatUIUtils.deriveColor( hoverBackground, menuItem.getBackground() ) );
g.fillRect( 0, 0, menuItem.getWidth(), menuItem.getHeight() ); g.fillRect( 0, 0, menuItem.getWidth(), menuItem.getHeight() );
} else } else
super.paintBackground( g, selectionBackground ); super.paintBackground( g, selectionBackground );

View File

@@ -153,7 +153,8 @@ public class FlatPopupFactory
@Override @Override
public void show() { public void show() {
delegate.show(); if( delegate != null )
delegate.show();
} }
@Override @Override
@@ -185,6 +186,7 @@ public class FlatPopupFactory
private boolean oldOpaque; private boolean oldOpaque;
// medium weight // medium weight
private boolean mediumWeightShown;
private Panel mediumWeightPanel; private Panel mediumWeightPanel;
private JPanel dropShadowPanel; private JPanel dropShadowPanel;
private ComponentListener mediumPanelListener; private ComponentListener mediumPanelListener;
@@ -311,6 +313,11 @@ public class FlatPopupFactory
} }
private void showMediumWeightDropShadow() { private void showMediumWeightDropShadow() {
if( mediumWeightShown )
return;
mediumWeightShown = true;
Window window = SwingUtilities.windowForComponent( owner ); Window window = SwingUtilities.windowForComponent( owner );
if( window == null ) if( window == null )
return; return;
@@ -326,24 +333,29 @@ public class FlatPopupFactory
mediumPanelListener = new ComponentListener() { mediumPanelListener = new ComponentListener() {
@Override @Override
public void componentShown( ComponentEvent e ) { public void componentShown( ComponentEvent e ) {
dropShadowPanel.setVisible( true ); if( dropShadowPanel != null )
dropShadowPanel.setVisible( true );
} }
@Override @Override
public void componentHidden( ComponentEvent e ) { public void componentHidden( ComponentEvent e ) {
dropShadowPanel.setVisible( false ); if( dropShadowPanel != null )
dropShadowPanel.setVisible( false );
} }
@Override @Override
public void componentMoved( ComponentEvent e ) { public void componentMoved( ComponentEvent e ) {
Point location = mediumWeightPanel.getLocation(); if( dropShadowPanel != null && mediumWeightPanel != null ) {
Insets insets = dropShadowPanel.getInsets(); Point location = mediumWeightPanel.getLocation();
dropShadowPanel.setLocation( location.x - insets.left, location.y - insets.top ); Insets insets = dropShadowPanel.getInsets();
dropShadowPanel.setLocation( location.x - insets.left, location.y - insets.top );
}
} }
@Override @Override
public void componentResized( ComponentEvent e ) { public void componentResized( ComponentEvent e ) {
dropShadowPanel.setSize( FlatUIUtils.addInsets( mediumWeightPanel.getSize(), dropShadowPanel.getInsets() ) ); if( dropShadowPanel != null )
dropShadowPanel.setSize( FlatUIUtils.addInsets( mediumWeightPanel.getSize(), dropShadowPanel.getInsets() ) );
} }
}; };
mediumWeightPanel.addComponentListener( mediumPanelListener ); mediumWeightPanel.addComponentListener( mediumPanelListener );

View File

@@ -16,8 +16,15 @@
package com.formdev.flatlaf.ui; package com.formdev.flatlaf.ui;
import java.awt.Color;
import java.awt.Container;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JRootPane;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicRootPaneUI; import javax.swing.plaf.basic.BasicRootPaneUI;
/** /**
@@ -35,4 +42,21 @@ public class FlatRootPaneUI
instance = new FlatRootPaneUI(); instance = new FlatRootPaneUI();
return instance; return instance;
} }
@Override
protected void installDefaults( JRootPane c ) {
super.installDefaults( c );
// Update background color of JFrame or JDialog parent to avoid bad border
// on HiDPI screens when switching from light to dark Laf.
// The background of JFrame is initialized in JFrame.frameInit() and
// the background of JDialog in JDialog.dialogInit(),
// but it was not updated when switching Laf.
Container parent = c.getParent();
if( parent instanceof JFrame || parent instanceof JDialog ) {
Color background = parent.getBackground();
if( background == null || background instanceof UIResource )
parent.setBackground( UIManager.getColor( "control" ) );
}
}
} }

View File

@@ -19,6 +19,8 @@ package com.formdev.flatlaf.ui;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@@ -28,6 +30,7 @@ import java.util.Objects;
import javax.swing.InputMap; import javax.swing.InputMap;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.UIManager; import javax.swing.UIManager;
@@ -52,8 +55,13 @@ import com.formdev.flatlaf.util.UIScale;
* *
* <!-- FlatScrollBarUI --> * <!-- FlatScrollBarUI -->
* *
* @uiDefault ScrollBar.trackInsets Insets
* @uiDefault ScrollBar.thumbInsets Insets
* @uiDefault ScrollBar.trackArc int
* @uiDefault ScrollBar.thumbArc int
* @uiDefault ScrollBar.hoverTrackColor Color * @uiDefault ScrollBar.hoverTrackColor Color
* @uiDefault ScrollBar.hoverThumbColor Color * @uiDefault ScrollBar.hoverThumbColor Color
* @uiDefault ScrollBar.hoverThumbWithTrack boolean
* @uiDefault Component.arrowType String triangle (default) or chevron * @uiDefault Component.arrowType String triangle (default) or chevron
* @uiDefault ScrollBar.showButtons boolean * @uiDefault ScrollBar.showButtons boolean
* @uiDefault ScrollBar.buttonArrowColor Color * @uiDefault ScrollBar.buttonArrowColor Color
@@ -64,8 +72,13 @@ import com.formdev.flatlaf.util.UIScale;
public class FlatScrollBarUI public class FlatScrollBarUI
extends BasicScrollBarUI extends BasicScrollBarUI
{ {
protected Insets trackInsets;
protected Insets thumbInsets;
protected int trackArc;
protected int thumbArc;
protected Color hoverTrackColor; protected Color hoverTrackColor;
protected Color hoverThumbColor; protected Color hoverThumbColor;
protected boolean hoverThumbWithTrack;
protected boolean showButtons; protected boolean showButtons;
protected String arrowType; protected String arrowType;
@@ -73,8 +86,8 @@ public class FlatScrollBarUI
protected Color buttonDisabledArrowColor; protected Color buttonDisabledArrowColor;
private MouseAdapter hoverListener; private MouseAdapter hoverListener;
private boolean hoverTrack; protected boolean hoverTrack;
private boolean hoverThumb; protected boolean hoverThumb;
public static ComponentUI createUI( JComponent c ) { public static ComponentUI createUI( JComponent c ) {
return new FlatScrollBarUI(); return new FlatScrollBarUI();
@@ -102,8 +115,13 @@ public class FlatScrollBarUI
protected void installDefaults() { protected void installDefaults() {
super.installDefaults(); super.installDefaults();
trackInsets = UIManager.getInsets( "ScrollBar.trackInsets" );
thumbInsets = UIManager.getInsets( "ScrollBar.thumbInsets" );
trackArc = UIManager.getInt( "ScrollBar.trackArc" );
thumbArc = UIManager.getInt( "ScrollBar.thumbArc" );
hoverTrackColor = UIManager.getColor( "ScrollBar.hoverTrackColor" ); hoverTrackColor = UIManager.getColor( "ScrollBar.hoverTrackColor" );
hoverThumbColor = UIManager.getColor( "ScrollBar.hoverThumbColor" ); hoverThumbColor = UIManager.getColor( "ScrollBar.hoverThumbColor" );
hoverThumbWithTrack = UIManager.getBoolean( "ScrollBar.hoverThumbWithTrack" );
showButtons = UIManager.getBoolean( "ScrollBar.showButtons" ); showButtons = UIManager.getBoolean( "ScrollBar.showButtons" );
arrowType = UIManager.getString( "Component.arrowType" ); arrowType = UIManager.getString( "Component.arrowType" );
@@ -115,6 +133,8 @@ public class FlatScrollBarUI
protected void uninstallDefaults() { protected void uninstallDefaults() {
super.uninstallDefaults(); super.uninstallDefaults();
trackInsets = null;
thumbInsets = null;
hoverTrackColor = null; hoverTrackColor = null;
hoverThumbColor = null; hoverThumbColor = null;
@@ -171,6 +191,11 @@ public class FlatScrollBarUI
FlatArrowButton button = new FlatArrowButton( orientation, FlatArrowButton button = new FlatArrowButton( orientation,
arrowType, buttonArrowColor, buttonDisabledArrowColor, null, hoverTrackColor ) arrowType, buttonArrowColor, buttonDisabledArrowColor, null, hoverTrackColor )
{ {
@Override
protected Color deriveHoverBackground( Color hoverBackground ) {
return getTrackColor( scrollbar, true ) ;
}
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
if( isShowButtons() ) { if( isShowButtons() ) {
@@ -203,6 +228,45 @@ public class FlatScrollBarUI
return (showButtons != null) ? Objects.equals( showButtons, true ) : this.showButtons; return (showButtons != null) ? Objects.equals( showButtons, true ) : this.showButtons;
} }
@Override
public void paint( Graphics g, JComponent c ) {
FlatUIUtils.setRenderingHints( (Graphics2D) g );
super.paint( g, c );
}
@Override
protected void paintTrack( Graphics g, JComponent c, Rectangle trackBounds ) {
g.setColor( getTrackColor( c, hoverTrack ) );
paintTrackOrThumb( g, c, trackBounds, trackInsets, trackArc );
}
@Override
protected void paintThumb( Graphics g, JComponent c, Rectangle thumbBounds ) {
if( thumbBounds.isEmpty() || !scrollbar.isEnabled() )
return;
g.setColor( getThumbColor( c, hoverThumb ) );
paintTrackOrThumb( g, c, thumbBounds, thumbInsets, thumbArc );
}
protected void paintTrackOrThumb( Graphics g, JComponent c, Rectangle bounds, Insets insets, int arc ) {
// rotate insets for horizontal orientation because they are given for vertical orientation
if( scrollbar.getOrientation() == JScrollBar.HORIZONTAL )
insets = new Insets( insets.right, insets.top, insets.left, insets.bottom );
// subtract insets from bounds
bounds = FlatUIUtils.subtractInsets( bounds, UIScale.scale( insets ) );
if( arc <= 0 ) {
// paint rectangle
g.fillRect( bounds.x, bounds.y, bounds.width, bounds.height );
} else {
// paint round rectangle
arc = Math.min( UIScale.scale( arc ), Math.min( bounds.width, bounds.height ) );
g.fillRoundRect( bounds.x, bounds.y, bounds.width, bounds.height, arc, arc );
}
}
@Override @Override
protected void paintDecreaseHighlight( Graphics g ) { protected void paintDecreaseHighlight( Graphics g ) {
// do not paint // do not paint
@@ -213,19 +277,15 @@ public class FlatScrollBarUI
// do not paint // do not paint
} }
@Override protected Color getTrackColor( JComponent c, boolean hover ) {
protected void paintTrack( Graphics g, JComponent c, Rectangle trackBounds ) { Color trackColor = FlatUIUtils.deriveColor( this.trackColor, c.getBackground() );
g.setColor( hoverTrack ? hoverTrackColor : trackColor ); return hover ? FlatUIUtils.deriveColor( hoverTrackColor, trackColor ) : trackColor;
g.fillRect( trackBounds.x, trackBounds.y, trackBounds.width, trackBounds.height );
} }
@Override protected Color getThumbColor( JComponent c, boolean hover ) {
protected void paintThumb( Graphics g, JComponent c, Rectangle thumbBounds ) { Color trackColor = FlatUIUtils.deriveColor( this.trackColor, c.getBackground() );
if( thumbBounds.isEmpty() || !scrollbar.isEnabled() ) Color thumbColor = FlatUIUtils.deriveColor( this.thumbColor, trackColor );
return; return hover ? FlatUIUtils.deriveColor( hoverThumbColor, thumbColor ) : thumbColor;
g.setColor( hoverThumb ? hoverThumbColor : thumbColor );
g.fillRect( thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height );
} }
@Override @Override
@@ -276,7 +336,7 @@ public class FlatScrollBarUI
boolean inThumb = getThumbBounds().contains( x, y ); boolean inThumb = getThumbBounds().contains( x, y );
if( inTrack != hoverTrack || inThumb != hoverThumb ) { if( inTrack != hoverTrack || inThumb != hoverThumb ) {
hoverTrack = inTrack; hoverTrack = inTrack;
hoverThumb = inThumb; hoverThumb = inThumb || (hoverThumbWithTrack && inTrack);
repaint(); repaint();
} }
} }

View File

@@ -201,7 +201,7 @@ public class FlatSliderUI
} }
if( coloredTrack != null ) { if( coloredTrack != null ) {
FlatUIUtils.setColor( g, FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor), thumbColor ); g.setColor( FlatUIUtils.deriveColor( FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor), thumbColor ) );
((Graphics2D)g).fill( coloredTrack ); ((Graphics2D)g).fill( coloredTrack );
} }
@@ -211,10 +211,10 @@ public class FlatSliderUI
@Override @Override
public void paintThumb( Graphics g ) { public void paintThumb( Graphics g ) {
FlatUIUtils.setColor( g, slider.isEnabled() g.setColor( FlatUIUtils.deriveColor( slider.isEnabled()
? (FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor)) ? (FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor))
: disabledForeground, : disabledForeground,
thumbColor ); thumbColor ) );
if( isRoundThumb() ) if( isRoundThumb() )
g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height ); g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height );

View File

@@ -141,6 +141,7 @@ public class FlatSpinnerUI
super.installListeners(); super.installListeners();
addEditorFocusListener( spinner.getEditor() ); addEditorFocusListener( spinner.getEditor() );
spinner.addFocusListener( getHandler() );
spinner.addPropertyChangeListener( getHandler() ); spinner.addPropertyChangeListener( getHandler() );
} }
@@ -149,6 +150,7 @@ public class FlatSpinnerUI
super.uninstallListeners(); super.uninstallListeners();
removeEditorFocusListener( spinner.getEditor() ); removeEditorFocusListener( spinner.getEditor() );
spinner.removeFocusListener( getHandler() );
spinner.removePropertyChangeListener( getHandler() ); spinner.removePropertyChangeListener( getHandler() );
handler = null; handler = null;
@@ -206,7 +208,7 @@ public class FlatSpinnerUI
} }
} }
private JTextField getEditorTextField( JComponent editor ) { private static JTextField getEditorTextField( JComponent editor ) {
return editor instanceof JSpinner.DefaultEditor return editor instanceof JSpinner.DefaultEditor
? ((JSpinner.DefaultEditor)editor).getTextField() ? ((JSpinner.DefaultEditor)editor).getTextField()
: null; : null;
@@ -365,12 +367,14 @@ public class FlatSpinnerUI
if( editor != null ) if( editor != null )
editor.setBounds( FlatUIUtils.subtractInsets( editorRect, padding ) ); editor.setBounds( FlatUIUtils.subtractInsets( editorRect, padding ) );
int nextHeight = Math.round( buttonsRect.height / 2f ); int nextHeight = (buttonsRect.height / 2) + (buttonsRect.height % 2); // round up
if( nextButton != null ) if( nextButton != null )
nextButton.setBounds( buttonsRect.x, buttonsRect.y, buttonsRect.width, nextHeight ); nextButton.setBounds( buttonsRect.x, buttonsRect.y, buttonsRect.width, nextHeight );
if( previousButton != null ) { if( previousButton != null ) {
previousButton.setBounds( buttonsRect.x, buttonsRect.y + nextHeight, // for precise layout of arrows, the "previous" button has the same height
buttonsRect.width, buttonsRect.height - nextHeight ); // as the "next" button and may overlap on uneven buttonsRect.height
int previousY = buttonsRect.y + buttonsRect.height - nextHeight;
previousButton.setBounds( buttonsRect.x, previousY, buttonsRect.width, nextHeight );
} }
} }
@@ -379,6 +383,13 @@ public class FlatSpinnerUI
@Override @Override
public void focusGained( FocusEvent e ) { public void focusGained( FocusEvent e ) {
spinner.repaint(); spinner.repaint();
// if spinner gained focus, transfer it to the editor text field
if( e.getComponent() == spinner ) {
JTextField textField = getEditorTextField( spinner.getEditor() );
if( textField != null )
textField.requestFocusInWindow();
}
} }
@Override @Override
@@ -399,6 +410,10 @@ public class FlatSpinnerUI
case FlatClientProperties.COMPONENT_ROUND_RECT: case FlatClientProperties.COMPONENT_ROUND_RECT:
spinner.repaint(); spinner.repaint();
break; break;
case FlatClientProperties.MINIMUM_WIDTH:
spinner.revalidate();
break;
} }
} }
} }

View File

@@ -19,6 +19,7 @@ package com.formdev.flatlaf.ui;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.beans.PropertyChangeEvent;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.UIManager; import javax.swing.UIManager;
@@ -82,6 +83,12 @@ public class FlatTextAreaUI
inactiveBackground = null; inactiveBackground = null;
} }
@Override
protected void propertyChange( PropertyChangeEvent e ) {
super.propertyChange( e );
FlatEditorPaneUI.propertyChange( getComponent(), e );
}
@Override @Override
protected void paintBackground( Graphics g ) { protected void paintBackground( Graphics g ) {
JTextComponent c = getComponent(); JTextComponent c = getComponent();

View File

@@ -32,7 +32,6 @@ import javax.swing.JSpinner;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.LookAndFeel; import javax.swing.LookAndFeel;
import javax.swing.UIManager; import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource; import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicTextFieldUI; import javax.swing.plaf.basic.BasicTextFieldUI;
@@ -136,6 +135,10 @@ public class FlatTextFieldUI
case FlatClientProperties.COMPONENT_ROUND_RECT: case FlatClientProperties.COMPONENT_ROUND_RECT:
c.repaint(); c.repaint();
break; break;
case FlatClientProperties.MINIMUM_WIDTH:
c.revalidate();
break;
} }
} }
@@ -152,14 +155,12 @@ public class FlatTextFieldUI
} }
static void paintBackground( Graphics g, JTextComponent c, boolean isIntelliJTheme ) { static void paintBackground( Graphics g, JTextComponent c, boolean isIntelliJTheme ) {
Border border = c.getBorder();
// do not paint background if: // do not paint background if:
// - not opaque and // - not opaque and
// - border is not a flat border and // - border is not a flat border and
// - opaque was explicitly set (to false) // - opaque was explicitly set (to false)
// (same behaviour as in AquaTextFieldUI) // (same behaviour as in AquaTextFieldUI)
if( !c.isOpaque() && !(border instanceof FlatBorder) && FlatUIUtils.hasOpaqueBeenExplicitlySet( c ) ) if( !c.isOpaque() && FlatUIUtils.getOutsideFlatBorder( c ) == null && FlatUIUtils.hasOpaqueBeenExplicitlySet( c ) )
return; return;
float focusWidth = FlatUIUtils.getBorderFocusWidth( c ); float focusWidth = FlatUIUtils.getBorderFocusWidth( c );

View File

@@ -18,6 +18,7 @@ package com.formdev.flatlaf.ui;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.beans.PropertyChangeEvent;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JEditorPane; import javax.swing.JEditorPane;
import javax.swing.UIManager; import javax.swing.UIManager;
@@ -82,6 +83,12 @@ public class FlatTextPaneUI
getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties ); getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties );
} }
@Override
protected void propertyChange( PropertyChangeEvent e ) {
super.propertyChange( e );
FlatEditorPaneUI.propertyChange( getComponent(), e );
}
@Override @Override
public Dimension getPreferredSize( JComponent c ) { public Dimension getPreferredSize( JComponent c ) {
return FlatEditorPaneUI.applyMinimumWidth( c, super.getPreferredSize( c ), minimumWidth ); return FlatEditorPaneUI.applyMinimumWidth( c, super.getPreferredSize( c ), minimumWidth );

View File

@@ -40,6 +40,7 @@ import javax.swing.JComponent;
import javax.swing.LookAndFeel; import javax.swing.LookAndFeel;
import javax.swing.UIManager; import javax.swing.UIManager;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
import javax.swing.plaf.UIResource; import javax.swing.plaf.UIResource;
import com.formdev.flatlaf.FlatClientProperties; import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.util.DerivedColor; import com.formdev.flatlaf.util.DerivedColor;
@@ -152,9 +153,9 @@ public class FlatUIUtils
* Returns the scaled thickness of the outer focus border for the given component. * Returns the scaled thickness of the outer focus border for the given component.
*/ */
public static float getBorderFocusWidth( JComponent c ) { public static float getBorderFocusWidth( JComponent c ) {
Border border = c.getBorder(); FlatBorder border = getOutsideFlatBorder( c );
return (border instanceof FlatBorder) return (border != null)
? UIScale.scale( (float) ((FlatBorder)border).getFocusWidth( c ) ) ? UIScale.scale( (float) border.getFocusWidth( c ) )
: 0; : 0;
} }
@@ -162,12 +163,28 @@ public class FlatUIUtils
* Returns the scaled arc diameter of the border for the given component. * Returns the scaled arc diameter of the border for the given component.
*/ */
public static float getBorderArc( JComponent c ) { public static float getBorderArc( JComponent c ) {
Border border = c.getBorder(); FlatBorder border = getOutsideFlatBorder( c );
return (border instanceof FlatBorder) return (border != null)
? UIScale.scale( (float) ((FlatBorder)border).getArc( c ) ) ? UIScale.scale( (float) border.getArc( c ) )
: 0; : 0;
} }
public static boolean hasRoundBorder( JComponent c ) {
return getBorderArc( c ) >= c.getHeight();
}
public static FlatBorder getOutsideFlatBorder( JComponent c ) {
Border border = c.getBorder();
for(;;) {
if( border instanceof FlatBorder )
return (FlatBorder) border;
else if( border instanceof CompoundBorder )
border = ((CompoundBorder)border).getOutsideBorder();
else
return null;
}
}
/** /**
* Sets rendering hints used for painting. * Sets rendering hints used for painting.
*/ */
@@ -177,10 +194,10 @@ public class FlatUIUtils
MAC_USE_QUARTZ ? RenderingHints.VALUE_STROKE_PURE : RenderingHints.VALUE_STROKE_NORMALIZE ); MAC_USE_QUARTZ ? RenderingHints.VALUE_STROKE_PURE : RenderingHints.VALUE_STROKE_NORMALIZE );
} }
public static void setColor( Graphics g, Color color, Color baseColor ) { public static Color deriveColor( Color color, Color baseColor ) {
if( color instanceof DerivedColor ) return (color instanceof DerivedColor)
color = ((DerivedColor)color).derive( baseColor ); ? ((DerivedColor)color).derive( baseColor )
g.setColor( color ); : color;
} }
/** /**

View File

@@ -21,7 +21,6 @@ import java.awt.Insets;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.util.function.Function; import java.util.function.Function;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.border.Border;
/** /**
* Support for MigLayout visual paddings. * Support for MigLayout visual paddings.
@@ -75,9 +74,9 @@ public class MigLayoutVisualPadding
return; return;
install( c, c2 -> { install( c, c2 -> {
Border border = c2.getBorder(); FlatBorder border = FlatUIUtils.getOutsideFlatBorder( c2 );
if( border instanceof FlatBorder ) { if( border != null ) {
int focusWidth = ((FlatBorder)border).getFocusWidth( c2 ); int focusWidth = border.getFocusWidth( c2 );
return new Insets( focusWidth, focusWidth, focusWidth, focusWidth ); return new Insets( focusWidth, focusWidth, focusWidth, focusWidth );
} else } else
return null; return null;

View File

@@ -32,13 +32,28 @@ public class DerivedColor
{ {
private final ColorFunction[] functions; private final ColorFunction[] functions;
private boolean hasBaseOfDefaultColor;
private int baseOfDefaultColorRGB;
public DerivedColor( Color defaultColor, ColorFunction... functions ) { public DerivedColor( Color defaultColor, ColorFunction... functions ) {
super( (defaultColor != null) ? defaultColor : Color.red ); super( (defaultColor != null) ? defaultColor : Color.red );
this.functions = functions; this.functions = functions;
} }
public Color derive( Color baseColor ) { public Color derive( Color baseColor ) {
return ColorFunctions.applyFunctions( baseColor, functions ); if( (hasBaseOfDefaultColor && baseOfDefaultColorRGB == baseColor.getRGB()) || baseColor == this )
return this; // return default color
Color result = ColorFunctions.applyFunctions( baseColor, functions );
// if the result is equal to the default color, then the original base color
// was passed and we can cache this to avoid color calculations
if( !hasBaseOfDefaultColor && result.getRGB() == this.getRGB() ) {
hasBaseOfDefaultColor = true;
baseOfDefaultColorRGB = baseColor.getRGB();
}
return result;
} }
public ColorFunction[] getFunctions() { public ColorFunction[] getFunctions() {

View File

@@ -33,6 +33,7 @@ public class SystemInfo
// OS versions // OS versions
public static final boolean IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER; public static final boolean IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER;
public static final boolean IS_MAC_OS_10_15_CATALINA_OR_LATER;
// Java versions // Java versions
public static final boolean IS_JAVA_9_OR_LATER; public static final boolean IS_JAVA_9_OR_LATER;
@@ -53,6 +54,7 @@ public class SystemInfo
// OS versions // OS versions
long osVersion = scanVersion( System.getProperty( "os.version" ) ); long osVersion = scanVersion( System.getProperty( "os.version" ) );
IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER = (IS_MAC && osVersion >= toVersion( 10, 11, 0, 0 )); IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER = (IS_MAC && osVersion >= toVersion( 10, 11, 0, 0 ));
IS_MAC_OS_10_15_CATALINA_OR_LATER = (IS_MAC && osVersion >= toVersion( 10, 15, 0, 0 ));
// Java versions // Java versions
long javaVersion = scanVersion( System.getProperty( "java.version" ) ); long javaVersion = scanVersion( System.getProperty( "java.version" ) );

View File

@@ -72,8 +72,8 @@ controlDkShadow=lighten($controlShadow,10%)
#---- Button ---- #---- Button ----
Button.background=#4c5052 Button.background=#4c5052
Button.hoverBackground=lighten($Button.background,3%,derived autoInverse) Button.hoverBackground=lighten($Button.background,3%,derived)
Button.pressedBackground=lighten($Button.background,6%,derived autoInverse) Button.pressedBackground=lighten($Button.background,6%,derived)
Button.borderColor=#5e6060 Button.borderColor=#5e6060
Button.disabledBorderColor=#5e6060 Button.disabledBorderColor=#5e6060
@@ -82,16 +82,16 @@ Button.hoverBorderColor=$Button.focusedBorderColor
Button.default.background=#365880 Button.default.background=#365880
Button.default.foreground=#bbbbbb Button.default.foreground=#bbbbbb
Button.default.hoverBackground=lighten($Button.default.background,3%,derived autoInverse) Button.default.hoverBackground=lighten($Button.default.background,3%,derived)
Button.default.pressedBackground=lighten($Button.default.background,6%,derived autoInverse) Button.default.pressedBackground=lighten($Button.default.background,6%,derived)
Button.default.borderColor=#4c708c Button.default.borderColor=#4c708c
Button.default.hoverBorderColor=#537699 Button.default.hoverBorderColor=#537699
Button.default.focusedBorderColor=#537699 Button.default.focusedBorderColor=#537699
Button.default.focusColor=#43688c Button.default.focusColor=#43688c
Button.default.boldText=true Button.default.boldText=true
Button.toolbar.hoverBackground=lighten($Button.background,1%,derived autoInverse) Button.toolbar.hoverBackground=lighten($Button.background,1%,derived)
Button.toolbar.pressedBackground=lighten($Button.background,4%,derived autoInverse) Button.toolbar.pressedBackground=lighten($Button.background,4%,derived)
#---- CheckBox ---- #---- CheckBox ----
@@ -104,8 +104,8 @@ CheckBox.icon.hoverBorderColor=$CheckBox.icon.focusedBorderColor
CheckBox.icon.selectedFocusedBorderColor=#466D94 CheckBox.icon.selectedFocusedBorderColor=#466D94
CheckBox.icon.background=#43494A CheckBox.icon.background=#43494A
CheckBox.icon.disabledBackground=@background CheckBox.icon.disabledBackground=@background
CheckBox.icon.hoverBackground=lighten($CheckBox.icon.background,3%,derived autoInverse) CheckBox.icon.hoverBackground=lighten($CheckBox.icon.background,3%,derived)
CheckBox.icon.pressedBackground=lighten($CheckBox.icon.background,6%,derived autoInverse) CheckBox.icon.pressedBackground=lighten($CheckBox.icon.background,6%,derived)
CheckBox.icon.selectedBackground=#43494A CheckBox.icon.selectedBackground=#43494A
CheckBox.icon.checkmarkColor=#A7A7A7 CheckBox.icon.checkmarkColor=#A7A7A7
CheckBox.icon.disabledCheckmarkColor=#606060 CheckBox.icon.disabledCheckmarkColor=#606060
@@ -134,7 +134,7 @@ Component.error.borderColor=desaturate($Component.error.focusedBorderColor,25%)
Component.error.focusedBorderColor=#8b3c3c Component.error.focusedBorderColor=#8b3c3c
Component.warning.borderColor=darken(desaturate($Component.warning.focusedBorderColor,20%),10%) Component.warning.borderColor=darken(desaturate($Component.warning.focusedBorderColor,20%),10%)
Component.warning.focusedBorderColor=#ac7920 Component.warning.focusedBorderColor=#ac7920
Component.custom.borderColor=desaturate(#f00,50%,relative derived) Component.custom.borderColor=desaturate(#f00,50%,relative derived noAutoInverse)
#---- Desktop ---- #---- Desktop ----
@@ -157,8 +157,8 @@ InternalFrame.inactiveTitleForeground=@disabledText
InternalFrame.activeBorderColor=darken(@background,7%) InternalFrame.activeBorderColor=darken(@background,7%)
InternalFrame.inactiveBorderColor=darken(@background,3%) InternalFrame.inactiveBorderColor=darken(@background,3%)
InternalFrame.buttonHoverBackground=lighten($InternalFrame.activeTitleBackground,10%,derived autoInverse) InternalFrame.buttonHoverBackground=lighten($InternalFrame.activeTitleBackground,10%,derived)
InternalFrame.buttonPressedBackground=lighten($InternalFrame.activeTitleBackground,20%,derived autoInverse) InternalFrame.buttonPressedBackground=lighten($InternalFrame.activeTitleBackground,20%,derived)
InternalFrame.closeHoverBackground=lazy(Actions.Red) InternalFrame.closeHoverBackground=lazy(Actions.Red)
InternalFrame.closePressedBackground=darken(Actions.Red,10%,lazy) InternalFrame.closePressedBackground=darken(Actions.Red,10%,lazy)
InternalFrame.closeHoverForeground=#fff InternalFrame.closeHoverForeground=#fff
@@ -217,10 +217,10 @@ ProgressBar.selectionBackground=@foreground
#---- ScrollBar ---- #---- ScrollBar ----
ScrollBar.track=#3F4244 ScrollBar.track=lighten(@background,1%,derived noAutoInverse)
ScrollBar.thumb=lighten($ScrollBar.track,10%) ScrollBar.thumb=lighten($ScrollBar.track,10%,derived noAutoInverse)
ScrollBar.hoverTrackColor=lighten($ScrollBar.track,4%) ScrollBar.hoverTrackColor=lighten($ScrollBar.track,4%,derived noAutoInverse)
ScrollBar.hoverThumbColor=lighten($ScrollBar.thumb,10%) ScrollBar.hoverThumbColor=lighten($ScrollBar.thumb,10%,derived noAutoInverse)
#---- Separator ---- #---- Separator ----
@@ -233,7 +233,7 @@ Separator.foreground=#515151
Slider.trackColor=#646464 Slider.trackColor=#646464
Slider.thumbColor=#A6A6A6 Slider.thumbColor=#A6A6A6
Slider.tickColor=#888888 Slider.tickColor=#888888
Slider.hoverColor=darken($Slider.thumbColor,15%,derived autoInverse) Slider.hoverColor=darken($Slider.thumbColor,15%,derived)
Slider.disabledForeground=#4c5052 Slider.disabledForeground=#4c5052
@@ -268,11 +268,11 @@ TableHeader.bottomSeparatorColor=$TableHeader.separatorColor
#---- ToggleButton ---- #---- ToggleButton ----
ToggleButton.selectedBackground=lighten($ToggleButton.background,10%,derived autoInverse) ToggleButton.selectedBackground=lighten($ToggleButton.background,10%,derived)
ToggleButton.selectedForeground=@foreground ToggleButton.selectedForeground=@foreground
ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,3%,derived autoInverse) ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,3%,derived)
ToggleButton.toolbar.selectedBackground=lighten($ToggleButton.background,7%,derived autoInverse) ToggleButton.toolbar.selectedBackground=lighten($ToggleButton.background,7%,derived)
#---- ToolTip ---- #---- ToolTip ----

View File

@@ -178,6 +178,8 @@ ColorChooser.swatchesDefaultRecentColor=$control
ComboBox.border=com.formdev.flatlaf.ui.FlatRoundBorder ComboBox.border=com.formdev.flatlaf.ui.FlatRoundBorder
ComboBox.padding=2,6,2,6 ComboBox.padding=2,6,2,6
ComboBox.minimumWidth=72
ComboBox.editorColumns=0
[mac]ComboBox.showPopupOnNavigation=true [mac]ComboBox.showPopupOnNavigation=true
@@ -259,7 +261,7 @@ InternalFrame.buttonSize=24,24
InternalFrame.closeIcon=com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon InternalFrame.closeIcon=com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon
InternalFrame.iconifyIcon=com.formdev.flatlaf.icons.FlatInternalFrameIconifyIcon InternalFrame.iconifyIcon=com.formdev.flatlaf.icons.FlatInternalFrameIconifyIcon
InternalFrame.maximizeIcon=com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon InternalFrame.maximizeIcon=com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon
InternalFrame.minimizeIcon=com.formdev.flatlaf.icons.FlatInternalFrameMinimizeIcon InternalFrame.minimizeIcon=com.formdev.flatlaf.icons.FlatInternalFrameRestoreIcon
InternalFrame.windowBindings=null InternalFrame.windowBindings=null
# drop shadow # drop shadow
@@ -424,12 +426,24 @@ RadioButtonMenuItem.background=@menuBackground
#---- ScrollBar ---- #---- ScrollBar ----
ScrollBar.width=10 ScrollBar.width=10
ScrollBar.trackInsets=0,0,0,0
ScrollBar.thumbInsets=0,0,0,0
ScrollBar.trackArc=0
ScrollBar.thumbArc=0
ScrollBar.hoverThumbWithTrack=false
ScrollBar.showButtons=false ScrollBar.showButtons=false
ScrollBar.squareButtons=false ScrollBar.squareButtons=false
ScrollBar.buttonArrowColor=$ComboBox.buttonArrowColor ScrollBar.buttonArrowColor=$ComboBox.buttonArrowColor
ScrollBar.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor ScrollBar.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor
ScrollBar.allowsAbsolutePositioning=true ScrollBar.allowsAbsolutePositioning=true
[mac]ScrollBar.thumbInsets=2,2,2,2
[mac]ScrollBar.thumbArc=999
[mac]ScrollBar.hoverThumbWithTrack=true
[linux]ScrollBar.thumbInsets=2,2,2,2
[linux]ScrollBar.thumbArc=999
#---- ScrollPane ---- #---- ScrollPane ----

View File

@@ -73,8 +73,8 @@ controlDkShadow=darken($controlShadow,15%)
Button.background=#ffffff Button.background=#ffffff
Button.focusedBackground=#e3f1fa Button.focusedBackground=#e3f1fa
Button.hoverBackground=darken($Button.background,3%,derived autoInverse) Button.hoverBackground=darken($Button.background,3%,derived)
Button.pressedBackground=darken($Button.background,10%,derived autoInverse) Button.pressedBackground=darken($Button.background,10%,derived)
Button.borderColor=$Component.borderColor Button.borderColor=$Component.borderColor
Button.disabledBorderColor=$Component.disabledBorderColor Button.disabledBorderColor=$Component.disabledBorderColor
@@ -92,8 +92,8 @@ Button.default.focusedBorderColor=$Button.focusedBorderColor
Button.default.focusColor=$Component.focusColor Button.default.focusColor=$Component.focusColor
Button.default.borderWidth=2 Button.default.borderWidth=2
Button.toolbar.hoverBackground=darken($Button.background,12%,derived autoInverse) Button.toolbar.hoverBackground=darken($Button.background,12%,derived)
Button.toolbar.pressedBackground=darken($Button.background,15%,derived autoInverse) Button.toolbar.pressedBackground=darken($Button.background,15%,derived)
#---- CheckBox ---- #---- CheckBox ----
@@ -136,7 +136,7 @@ Component.error.borderColor=lighten(desaturate($Component.error.focusedBorderCol
Component.error.focusedBorderColor=#e53e4d Component.error.focusedBorderColor=#e53e4d
Component.warning.borderColor=lighten(saturate($Component.warning.focusedBorderColor,25%),20%) Component.warning.borderColor=lighten(saturate($Component.warning.focusedBorderColor,25%),20%)
Component.warning.focusedBorderColor=#e2a53a Component.warning.focusedBorderColor=#e2a53a
Component.custom.borderColor=lighten(desaturate(#f00,20%,derived),25%,derived) Component.custom.borderColor=lighten(desaturate(#f00,20%,derived noAutoInverse),25%,derived noAutoInverse)
#---- Desktop ---- #---- Desktop ----
@@ -164,8 +164,8 @@ InternalFrame.inactiveTitleForeground=@disabledText
InternalFrame.activeBorderColor=darken($Component.borderColor,20%) InternalFrame.activeBorderColor=darken($Component.borderColor,20%)
InternalFrame.inactiveBorderColor=$Component.borderColor InternalFrame.inactiveBorderColor=$Component.borderColor
InternalFrame.buttonHoverBackground=darken($InternalFrame.activeTitleBackground,10%,derived autoInverse) InternalFrame.buttonHoverBackground=darken($InternalFrame.activeTitleBackground,10%,derived)
InternalFrame.buttonPressedBackground=darken($InternalFrame.activeTitleBackground,20%,derived autoInverse) InternalFrame.buttonPressedBackground=darken($InternalFrame.activeTitleBackground,20%,derived)
InternalFrame.closeHoverBackground=lazy(Actions.Red) InternalFrame.closeHoverBackground=lazy(Actions.Red)
InternalFrame.closePressedBackground=darken(Actions.Red,10%,lazy) InternalFrame.closePressedBackground=darken(Actions.Red,10%,lazy)
InternalFrame.closeHoverForeground=#fff InternalFrame.closeHoverForeground=#fff
@@ -224,10 +224,10 @@ ProgressBar.selectionBackground=@foreground
#---- ScrollBar ---- #---- ScrollBar ----
ScrollBar.track=#F5F5F5 ScrollBar.track=lighten(@background,1%,derived noAutoInverse)
ScrollBar.thumb=darken($ScrollBar.track,10%) ScrollBar.thumb=darken($ScrollBar.track,10%,derived noAutoInverse)
ScrollBar.hoverTrackColor=darken($ScrollBar.track,3%) ScrollBar.hoverTrackColor=darken($ScrollBar.track,3%,derived noAutoInverse)
ScrollBar.hoverThumbColor=darken($ScrollBar.thumb,10%) ScrollBar.hoverThumbColor=darken($ScrollBar.thumb,10%,derived noAutoInverse)
#---- Separator ---- #---- Separator ----
@@ -240,7 +240,7 @@ Separator.foreground=#d1d1d1
Slider.trackColor=#c4c4c4 Slider.trackColor=#c4c4c4
Slider.thumbColor=#6e6e6e Slider.thumbColor=#6e6e6e
Slider.tickColor=#888888 Slider.tickColor=#888888
Slider.hoverColor=lighten($Slider.thumbColor,15%,derived autoInverse) Slider.hoverColor=lighten($Slider.thumbColor,15%,derived)
Slider.disabledForeground=#c0c0c0 Slider.disabledForeground=#c0c0c0
@@ -275,9 +275,9 @@ TableHeader.bottomSeparatorColor=$TableHeader.separatorColor
#---- ToggleButton ---- #---- ToggleButton ----
ToggleButton.selectedBackground=darken($ToggleButton.background,20%,derived autoInverse) ToggleButton.selectedBackground=darken($ToggleButton.background,20%,derived)
ToggleButton.selectedForeground=@foreground ToggleButton.selectedForeground=@foreground
ToggleButton.disabledSelectedBackground=darken($ToggleButton.background,13%,derived autoInverse) ToggleButton.disabledSelectedBackground=darken($ToggleButton.background,13%,derived)
ToggleButton.toolbar.selectedBackground=$ToggleButton.selectedBackground ToggleButton.toolbar.selectedBackground=$ToggleButton.selectedBackground

View File

@@ -39,8 +39,8 @@ HelpButton.hoverBorderColor=null
ToggleButton.startBackground=$ToggleButton.background ToggleButton.startBackground=$ToggleButton.background
ToggleButton.endBackground=$ToggleButton.background ToggleButton.endBackground=$ToggleButton.background
[dark]ToggleButton.selectedBackground=lighten($ToggleButton.background,15%,derived autoInverse) [dark]ToggleButton.selectedBackground=lighten($ToggleButton.background,15%,derived)
[dark]ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,5%,derived autoInverse) [dark]ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,5%,derived)
#---- theme specific ---- #---- theme specific ----

View File

@@ -37,7 +37,7 @@ import net.miginfocom.swing.*;
class ControlBar class ControlBar
extends JPanel extends JPanel
{ {
private JFrame frame; private DemoFrame frame;
private JTabbedPane tabbedPane; private JTabbedPane tabbedPane;
ControlBar() { ControlBar() {
@@ -78,6 +78,9 @@ class ControlBar
// update info label because user scale factor may change // update info label because user scale factor may change
updateInfoLabel(); updateInfoLabel();
// update "Font" menu
frame.updateFontMenuItems();
// this is necessary because embedded JOptionPane's "steal" the default button // this is necessary because embedded JOptionPane's "steal" the default button
frame.getRootPane().setDefaultButton( closeButton ); frame.getRootPane().setDefaultButton( closeButton );
} ); } );
@@ -90,7 +93,15 @@ class ControlBar
} ); } );
} }
void initialize( JFrame frame, JTabbedPane tabbedPane ) { @Override
public void updateUI() {
super.updateUI();
if( infoLabel != null )
updateInfoLabel();
}
void initialize( DemoFrame frame, JTabbedPane tabbedPane ) {
this.frame = frame; this.frame = frame;
this.tabbedPane = tabbedPane; this.tabbedPane = tabbedPane;
@@ -139,12 +150,20 @@ class ControlBar
} }
private void updateInfoLabel() { private void updateInfoLabel() {
String javaVendor = System.getProperty( "java.vendor" );
if( "Oracle Corporation".equals( javaVendor ) )
javaVendor = null;
double systemScaleFactor = UIScale.getSystemScaleFactor( getGraphicsConfiguration() ); double systemScaleFactor = UIScale.getSystemScaleFactor( getGraphicsConfiguration() );
float userScaleFactor = UIScale.getUserScaleFactor(); float userScaleFactor = UIScale.getUserScaleFactor();
Font font = UIManager.getFont( "Label.font" );
String newInfo = "(Java " + System.getProperty( "java.version" ) String newInfo = "(Java " + System.getProperty( "java.version" )
+ (javaVendor != null ? ("; " + javaVendor) : "")
+ (systemScaleFactor != 1 ? ("; system scale factor " + systemScaleFactor) : "") + (systemScaleFactor != 1 ? ("; system scale factor " + systemScaleFactor) : "")
+ (userScaleFactor != 1 ? ("; user scale factor " + userScaleFactor) : "") + (userScaleFactor != 1 ? ("; user scale factor " + userScaleFactor) : "")
+ (systemScaleFactor == 1 && userScaleFactor == 1 ? "; no scaling" : "") + (systemScaleFactor == 1 && userScaleFactor == 1 ? "; no scaling" : "")
+ "; " + font.getFamily() + " " + font.getSize()
+ (font.isBold() ? " BOLD" : "")
+ (font.isItalic() ? " ITALIC" : "")
+ ")"; + ")";
if( !newInfo.equals( infoLabel.getText() ) ) if( !newInfo.equals( infoLabel.getText() ) )
@@ -177,6 +196,10 @@ class ControlBar
// change look and feel // change look and feel
UIManager.setLookAndFeel( lafClassName ); UIManager.setLookAndFeel( lafClassName );
// clear custom default font when switching to non-FlatLaf LaF
if( !(UIManager.getLookAndFeel() instanceof FlatLaf) )
UIManager.put( "defaultFont", null );
// update all components // update all components
FlatLaf.updateUI(); FlatLaf.updateUI();
@@ -208,6 +231,9 @@ class ControlBar
private void enabledChanged() { private void enabledChanged() {
enabledDisable( tabbedPane, enabledCheckBox.isSelected() ); enabledDisable( tabbedPane, enabledCheckBox.isSelected() );
// repainting whole tabbed pane is faster than repainting many individual components
tabbedPane.repaint();
} }
private void enabledDisable( Container container, boolean enabled ) { private void enabledDisable( Container container, boolean enabled ) {

View File

@@ -18,8 +18,11 @@ package com.formdev.flatlaf.demo;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.util.ArrayList;
import java.util.Arrays;
import javax.swing.*; import javax.swing.*;
import javax.swing.text.DefaultEditorKit; import javax.swing.text.DefaultEditorKit;
import javax.swing.text.StyleContext;
import com.formdev.flatlaf.FlatLaf; import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.demo.extras.*; import com.formdev.flatlaf.demo.extras.*;
import com.formdev.flatlaf.demo.intellijthemes.*; import com.formdev.flatlaf.demo.intellijthemes.*;
@@ -32,10 +35,18 @@ import net.miginfocom.swing.*;
class DemoFrame class DemoFrame
extends JFrame extends JFrame
{ {
private final String[] availableFontFamilyNames;
private int initialFontMenuItemCount = -1;
DemoFrame() { DemoFrame() {
int tabIndex = DemoPrefs.getState().getInt( FlatLafDemo.KEY_TAB, 0 ); int tabIndex = DemoPrefs.getState().getInt( FlatLafDemo.KEY_TAB, 0 );
availableFontFamilyNames = GraphicsEnvironment.getLocalGraphicsEnvironment()
.getAvailableFontFamilyNames().clone();
Arrays.sort( availableFontFamilyNames );
initComponents(); initComponents();
updateFontMenuItems();
controlBar.initialize( this, tabbedPane ); controlBar.initialize( this, tabbedPane );
if( tabIndex >= 0 && tabIndex < tabbedPane.getTabCount() && tabIndex != tabbedPane.getSelectedIndex() ) if( tabIndex >= 0 && tabIndex < tabbedPane.getTabCount() && tabIndex != tabbedPane.getSelectedIndex() )
@@ -73,7 +84,7 @@ class DemoFrame
String fontFamily = e.getActionCommand(); String fontFamily = e.getActionCommand();
Font font = UIManager.getFont( "defaultFont" ); Font font = UIManager.getFont( "defaultFont" );
Font newFont = new Font( fontFamily, font.getStyle(), font.getSize() ); Font newFont = StyleContext.getDefaultStyleContext().getFont( fontFamily, font.getStyle(), font.getSize() );
UIManager.put( "defaultFont", newFont ); UIManager.put( "defaultFont", newFont );
FlatLaf.updateUI(); FlatLaf.updateUI();
@@ -91,6 +102,7 @@ class DemoFrame
private void restoreFont() { private void restoreFont() {
UIManager.put( "defaultFont", null ); UIManager.put( "defaultFont", null );
updateFontMenuItems();
FlatLaf.updateUI(); FlatLaf.updateUI();
} }
@@ -99,17 +111,80 @@ class DemoFrame
Font newFont = font.deriveFont( (float) (font.getSize() + 1) ); Font newFont = font.deriveFont( (float) (font.getSize() + 1) );
UIManager.put( "defaultFont", newFont ); UIManager.put( "defaultFont", newFont );
updateFontMenuItems();
FlatLaf.updateUI(); FlatLaf.updateUI();
} }
private void decrFont() { private void decrFont() {
Font font = UIManager.getFont( "defaultFont" ); Font font = UIManager.getFont( "defaultFont" );
Font newFont = font.deriveFont( (float) Math.max( font.getSize() - 1, 8 ) ); Font newFont = font.deriveFont( (float) Math.max( font.getSize() - 1, 10 ) );
UIManager.put( "defaultFont", newFont ); UIManager.put( "defaultFont", newFont );
updateFontMenuItems();
FlatLaf.updateUI(); FlatLaf.updateUI();
} }
void updateFontMenuItems() {
if( initialFontMenuItemCount < 0 )
initialFontMenuItemCount = fontMenu.getItemCount();
else {
// remove old font items
for( int i = fontMenu.getItemCount() - 1; i >= initialFontMenuItemCount; i-- )
fontMenu.remove( i );
}
// get current font
Font currentFont = UIManager.getFont( "Label.font" );
String currentFamily = currentFont.getFamily();
String currentSize = Integer.toString( currentFont.getSize() );
// add font families
fontMenu.addSeparator();
ArrayList<String> families = new ArrayList<>( Arrays.asList(
"Arial", "Cantarell", "Comic Sans MS", "Courier New", "DejaVu Sans",
"Dialog", "Liberation Sans", "Monospaced", "Noto Sans", "Roboto",
"SansSerif", "Segoe UI", "Serif", "Tahoma", "Ubuntu", "Verdana" ) );
if( !families.contains( currentFamily ) )
families.add( currentFamily );
families.sort( String.CASE_INSENSITIVE_ORDER );
ButtonGroup familiesGroup = new ButtonGroup();
for( String family : families ) {
if( Arrays.binarySearch( availableFontFamilyNames, family ) < 0 )
continue; // not available
JCheckBoxMenuItem item = new JCheckBoxMenuItem( family );
item.setSelected( family.equals( currentFamily ) );
item.addActionListener( this::fontFamilyChanged );
fontMenu.add( item );
familiesGroup.add( item );
}
// add font sizes
fontMenu.addSeparator();
ArrayList<String> sizes = new ArrayList<>( Arrays.asList(
"10", "12", "14", "16", "18", "20", "24", "28" ) );
if( !sizes.contains( currentSize ) )
sizes.add( currentSize );
sizes.sort( String.CASE_INSENSITIVE_ORDER );
ButtonGroup sizesGroup = new ButtonGroup();
for( String size : sizes ) {
JCheckBoxMenuItem item = new JCheckBoxMenuItem( size );
item.setSelected( size.equals( currentSize ) );
item.addActionListener( this::fontSizeChanged );
fontMenu.add( item );
sizesGroup.add( item );
}
// enabled/disable items
boolean enabled = UIManager.getLookAndFeel() instanceof FlatLaf;
for( Component item : fontMenu.getMenuComponents() )
item.setEnabled( enabled );
}
private void initComponents() { private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
JMenuBar menuBar1 = new JMenuBar(); JMenuBar menuBar1 = new JMenuBar();
@@ -356,19 +431,19 @@ class DemoFrame
//---- restoreFontMenuItem ---- //---- restoreFontMenuItem ----
restoreFontMenuItem.setText("Restore Font"); restoreFontMenuItem.setText("Restore Font");
restoreFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_0, KeyEvent.CTRL_MASK)); restoreFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_0, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
restoreFontMenuItem.addActionListener(e -> restoreFont()); restoreFontMenuItem.addActionListener(e -> restoreFont());
fontMenu.add(restoreFontMenuItem); fontMenu.add(restoreFontMenuItem);
//---- incrFontMenuItem ---- //---- incrFontMenuItem ----
incrFontMenuItem.setText("Increase Font Size"); incrFontMenuItem.setText("Increase Font Size");
incrFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, KeyEvent.CTRL_MASK)); incrFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
incrFontMenuItem.addActionListener(e -> incrFont()); incrFontMenuItem.addActionListener(e -> incrFont());
fontMenu.add(incrFontMenuItem); fontMenu.add(incrFontMenuItem);
//---- decrFontMenuItem ---- //---- decrFontMenuItem ----
decrFontMenuItem.setText("Decrease Font Size"); decrFontMenuItem.setText("Decrease Font Size");
decrFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, KeyEvent.CTRL_MASK)); decrFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
decrFontMenuItem.addActionListener(e -> decrFont()); decrFontMenuItem.addActionListener(e -> decrFont());
fontMenu.add(decrFontMenuItem); fontMenu.add(decrFontMenuItem);
} }
@@ -493,26 +568,6 @@ class DemoFrame
cutMenuItem.addActionListener( new DefaultEditorKit.CutAction() ); cutMenuItem.addActionListener( new DefaultEditorKit.CutAction() );
copyMenuItem.addActionListener( new DefaultEditorKit.CopyAction() ); copyMenuItem.addActionListener( new DefaultEditorKit.CopyAction() );
pasteMenuItem.addActionListener( new DefaultEditorKit.PasteAction() ); 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 // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables

View File

@@ -303,19 +303,19 @@ new FormModel {
add( new FormComponent( "javax.swing.JMenuItem" ) { add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "restoreFontMenuItem" name: "restoreFontMenuItem"
"text": "Restore Font" "text": "Restore Font"
"accelerator": static javax.swing.KeyStroke getKeyStroke( 48, 130, false ) "accelerator": static javax.swing.KeyStroke getKeyStroke( 48, 4226, false )
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "restoreFont", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "restoreFont", false ) )
} ) } )
add( new FormComponent( "javax.swing.JMenuItem" ) { add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "incrFontMenuItem" name: "incrFontMenuItem"
"text": "Increase Font Size" "text": "Increase Font Size"
"accelerator": static javax.swing.KeyStroke getKeyStroke( 521, 130, false ) "accelerator": static javax.swing.KeyStroke getKeyStroke( 521, 4226, false )
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "incrFont", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "incrFont", false ) )
} ) } )
add( new FormComponent( "javax.swing.JMenuItem" ) { add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "decrFontMenuItem" name: "decrFontMenuItem"
"text": "Decrease Font Size" "text": "Decrease Font Size"
"accelerator": static javax.swing.KeyStroke getKeyStroke( 45, 130, false ) "accelerator": static javax.swing.KeyStroke getKeyStroke( 45, 4226, false )
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "decrFont", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "decrFont", false ) )
} ) } )
} ) } )

View File

@@ -82,7 +82,7 @@ public class DemoPrefs
} else } else
UIManager.setLookAndFeel( lafClassName ); UIManager.setLookAndFeel( lafClassName );
} }
} catch( Exception ex ) { } catch( Throwable ex ) {
ex.printStackTrace(); ex.printStackTrace();
// fallback // fallback

View File

@@ -17,6 +17,7 @@
package com.formdev.flatlaf.demo; package com.formdev.flatlaf.demo;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import com.formdev.flatlaf.extras.FlatInspector;
import com.formdev.flatlaf.util.SystemInfo; import com.formdev.flatlaf.util.SystemInfo;
/** /**
@@ -28,7 +29,8 @@ public class FlatLafDemo
static final String KEY_TAB = "tab"; static final String KEY_TAB = "tab";
public static void main( String[] args ) { public static void main( String[] args ) {
if( SystemInfo.IS_MAC ) // on macOS enable screen menu bar
if( SystemInfo.IS_MAC && System.getProperty( "apple.laf.useScreenMenuBar" ) == null )
System.setProperty( "apple.laf.useScreenMenuBar", "true" ); System.setProperty( "apple.laf.useScreenMenuBar", "true" );
SwingUtilities.invokeLater( () -> { SwingUtilities.invokeLater( () -> {
@@ -37,6 +39,9 @@ public class FlatLafDemo
// set look and feel // set look and feel
DemoPrefs.initLaf( args ); DemoPrefs.initLaf( args );
// install inspector
FlatInspector.install( "ctrl shift alt X" );
// create frame // create frame
DemoFrame frame = new DemoFrame(); DemoFrame frame = new DemoFrame();

View File

@@ -46,21 +46,21 @@
"license": "MIT", "license": "MIT",
"licenseFile": "Gradianto.LICENSE.txt", "licenseFile": "Gradianto.LICENSE.txt",
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto", "sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
"sourceCodePath": "blob/master/resources/Gradianto_dark_fuchsia.theme.json" "sourceCodePath": "blob/master/src/main/resources/Gradianto_dark_fuchsia.theme.json"
}, },
"Gradianto_deep_ocean.theme.json": { "Gradianto_deep_ocean.theme.json": {
"name": "Gradianto Deep Ocean", "name": "Gradianto Deep Ocean",
"license": "MIT", "license": "MIT",
"licenseFile": "Gradianto.LICENSE.txt", "licenseFile": "Gradianto.LICENSE.txt",
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto", "sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
"sourceCodePath": "blob/master/resources/Gradianto_deep_ocean.theme.json" "sourceCodePath": "blob/master/src/main/resources/Gradianto_deep_ocean.theme.json"
}, },
"Gradianto_midnight_blue.theme.json": { "Gradianto_midnight_blue.theme.json": {
"name": "Gradianto Midnight Blue", "name": "Gradianto Midnight Blue",
"license": "MIT", "license": "MIT",
"licenseFile": "Gradianto.LICENSE.txt", "licenseFile": "Gradianto.LICENSE.txt",
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto", "sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
"sourceCodePath": "blob/master/resources/Gradianto_midnight_blue.theme.json" "sourceCodePath": "blob/master/src/main/resources/Gradianto_midnight_blue.theme.json"
}, },
"Gray.theme.json": { "Gray.theme.json": {
"name": "Gray", "name": "Gray",

View File

@@ -3,6 +3,9 @@ FlatLaf Extras
This sub-project provides some additional components and classes: This sub-project provides some additional components and classes:
- [FlatInspector](src/main/java/com/formdev/flatlaf/extras/FlatInspector.java):
A simple UI inspector that shows information about UI component at mouse
location in a tooltip.
- [FlatSVGIcon](src/main/java/com/formdev/flatlaf/extras/FlatSVGIcon.java): An - [FlatSVGIcon](src/main/java/com/formdev/flatlaf/extras/FlatSVGIcon.java): An
icon that displays SVG using icon that displays SVG using
[svgSalamander](https://github.com/JFormDesigner/svgSalamander). [svgSalamander](https://github.com/JFormDesigner/svgSalamander).

View File

@@ -38,6 +38,7 @@ tasks {
javadoc { javadoc {
options { options {
this as StandardJavadocDocletOptions this as StandardJavadocDocletOptions
use( true )
tags = listOf( "uiDefault", "clientProperty" ) tags = listOf( "uiDefault", "clientProperty" )
} }
isFailOnError = false isFailOnError = false

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.formdev.flatlaf.testing; package com.formdev.flatlaf.extras;
import java.awt.AWTEvent; import java.awt.AWTEvent;
import java.awt.Color; import java.awt.Color;
@@ -28,15 +28,19 @@ import java.awt.Graphics2D;
import java.awt.Insets; import java.awt.Insets;
import java.awt.KeyboardFocusManager; import java.awt.KeyboardFocusManager;
import java.awt.LayoutManager; import java.awt.LayoutManager;
import java.awt.MouseInfo;
import java.awt.Point; import java.awt.Point;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.Toolkit; import java.awt.Toolkit;
import java.awt.Window; import java.awt.Window;
import java.awt.event.AWTEventListener;
import java.awt.event.InputEvent; import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter; import java.awt.event.MouseMotionAdapter;
import java.awt.event.MouseMotionListener; import java.awt.event.MouseMotionListener;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import javax.swing.AbstractButton; import javax.swing.AbstractButton;
import javax.swing.JComponent; import javax.swing.JComponent;
@@ -57,6 +61,24 @@ import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.UIScale; import com.formdev.flatlaf.util.UIScale;
/** /**
* A simple UI inspector that shows information about UI component at mouse location
* in a tooltip.
* <p>
* To use it in an application install it with:
* <pre>
* FlatInspector.install( "ctrl shift alt X" );
* </pre>
* This can be done e.g. in the main() method and allows enabling (and disabling)
* the UI inspector for the active window with the given keystroke.
* <p>
* When the UI inspector is active some additional keys are available:
* <ul>
* <li>press <kbd>Esc</kbd> key to disable UI inspector</li>
* <li>press <kbd>Ctrl</kbd> key to increase inspection level, which shows
* information about parent of UI component at mouse location</li>
* <li>press <kbd>Shift</kbd> key to decrease inspection level</li>
* </ul>
*
* @author Karl Tauber * @author Karl Tauber
*/ */
public class FlatInspector public class FlatInspector
@@ -68,11 +90,15 @@ public class FlatInspector
private final JRootPane rootPane; private final JRootPane rootPane;
private final MouseMotionListener mouseMotionListener; private final MouseMotionListener mouseMotionListener;
private final AWTEventListener keyListener;
private final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport( this );
private boolean enabled;
private Component lastComponent; private Component lastComponent;
private int lastX; private int lastX;
private int lastY; private int lastY;
private int inspectParentLevel; private int inspectParentLevel;
private boolean wasCtrlOrShiftKeyPressed;
private JComponent highlightFigure; private JComponent highlightFigure;
private JToolTip tip; private JToolTip tip;
@@ -113,14 +139,46 @@ public class FlatInspector
public void mouseMoved( MouseEvent e ) { public void mouseMoved( MouseEvent e ) {
lastX = e.getX(); lastX = e.getX();
lastY = e.getY(); lastY = e.getY();
inspectParentLevel = (e.isControlDown() ? 1 : 0)
+ (e.isShiftDown() ? 2 : 0)
+ (e.isAltDown() ? 4 : 0);
inspect( lastX, lastY ); inspect( lastX, lastY );
} }
}; };
rootPane.getGlassPane().addMouseMotionListener( mouseMotionListener ); rootPane.getGlassPane().addMouseMotionListener( mouseMotionListener );
keyListener = e -> {
KeyEvent keyEvent = (KeyEvent) e;
int keyCode = keyEvent.getKeyCode();
int id = e.getID();
if( id == KeyEvent.KEY_PRESSED ) {
// this avoids that the inspection level is changed when UI inspector
// is enabled with keyboard shortcut (e.g. Ctrl+Shift+Alt+X)
if( keyCode == KeyEvent.VK_CONTROL || keyCode == KeyEvent.VK_SHIFT )
wasCtrlOrShiftKeyPressed = true;
} else if( id == KeyEvent.KEY_RELEASED && wasCtrlOrShiftKeyPressed ) {
if( keyCode == KeyEvent.VK_CONTROL ) {
inspectParentLevel++;
inspect( lastX, lastY );
} else if( keyCode == KeyEvent.VK_SHIFT && inspectParentLevel > 0 ) {
inspectParentLevel--;
inspect( lastX, lastY );
}
}
if( keyCode == KeyEvent.VK_ESCAPE ) {
// consume pressed and released ESC key events to e.g. avoid that dialog is closed
keyEvent.consume();
if( id == KeyEvent.KEY_PRESSED ) {
FlatInspector inspector = (FlatInspector) rootPane.getClientProperty( FlatInspector.class );
if( inspector == FlatInspector.this ) {
uninstall();
rootPane.putClientProperty( FlatInspector.class, null );
} else
setEnabled( false );
}
}
};
} }
private void uninstall() { private void uninstall() {
@@ -129,11 +187,43 @@ public class FlatInspector
rootPane.getGlassPane().removeMouseMotionListener( mouseMotionListener ); rootPane.getGlassPane().removeMouseMotionListener( mouseMotionListener );
} }
public void addPropertyChangeListener( PropertyChangeListener l ) {
propertyChangeSupport.addPropertyChangeListener( l );
}
public void removePropertyChangeListener( PropertyChangeListener l ) {
propertyChangeSupport.removePropertyChangeListener( l );
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled( boolean enabled ) { public void setEnabled( boolean enabled ) {
if( this.enabled == enabled )
return;
this.enabled = enabled;
rootPane.getGlassPane().setVisible( enabled ); rootPane.getGlassPane().setVisible( enabled );
if( !enabled ) { Toolkit toolkit = Toolkit.getDefaultToolkit();
if( enabled )
toolkit.addAWTEventListener( keyListener, AWTEvent.KEY_EVENT_MASK );
else
toolkit.removeAWTEventListener( keyListener );
if( enabled ) {
Point pt = new Point( MouseInfo.getPointerInfo().getLocation() );
SwingUtilities.convertPointFromScreen( pt, rootPane );
lastX = pt.x;
lastY = pt.y;
inspect( lastX, lastY );
} else {
lastComponent = null; lastComponent = null;
inspectParentLevel = 0;
if( highlightFigure != null ) if( highlightFigure != null )
highlightFigure.getParent().remove( highlightFigure ); highlightFigure.getParent().remove( highlightFigure );
@@ -143,6 +233,8 @@ public class FlatInspector
tip.getParent().remove( tip ); tip.getParent().remove( tip );
tip = null; tip = null;
} }
propertyChangeSupport.firePropertyChange( "enabled", !enabled, enabled );
} }
public void update() { public void update() {
@@ -157,11 +249,14 @@ public class FlatInspector
} }
private void inspect( int x, int y ) { private void inspect( int x, int y ) {
Container contentPane = rootPane.getContentPane(); Point pt = SwingUtilities.convertPoint( rootPane.getGlassPane(), x, y, rootPane );
Point pt = SwingUtilities.convertPoint( rootPane.getGlassPane(), x, y, contentPane ); Component c = getDeepestComponentAt( rootPane, pt.x, pt.y );
Component c = SwingUtilities.getDeepestComponentAt( contentPane, pt.x, pt.y );
for( int i = 0; i < inspectParentLevel && c != null; i++ ) { for( int i = 0; i < inspectParentLevel && c != null; i++ ) {
c = c.getParent(); Container parent = c.getParent();
if( parent == null )
break;
c = parent;
} }
if( c == lastComponent ) if( c == lastComponent )
@@ -173,6 +268,38 @@ public class FlatInspector
showToolTip( c, x, y ); showToolTip( c, x, y );
} }
private Component getDeepestComponentAt( Component parent, int x, int y ) {
if( !parent.contains( x, y ) )
return null;
if( parent instanceof Container ) {
for( Component child : ((Container)parent).getComponents() ) {
if( child == null || !child.isVisible() )
continue;
int cx = x - child.getX();
int cy = y - child.getY();
Component c = (child instanceof Container)
? getDeepestComponentAt( child, cx, cy )
: child.getComponentAt( cx, cy );
if( c == null || !c.isVisible() )
continue;
// ignore highlight figure and tooltip
if( c == highlightFigure || c == tip )
continue;
// ignore glass pane
if( c.getParent() instanceof JRootPane && c == ((JRootPane)c.getParent()).getGlassPane() )
continue;
return c;
}
}
return parent;
}
private void highlight( Component c ) { private void highlight( Component c ) {
if( highlightFigure == null ) { if( highlightFigure == null ) {
highlightFigure = createHighlightFigure(); highlightFigure = createHighlightFigure();
@@ -182,9 +309,9 @@ public class FlatInspector
highlightFigure.setVisible( c != null ); highlightFigure.setVisible( c != null );
if( c != null ) { if( c != null ) {
Rectangle bounds = c.getBounds(); highlightFigure.setBounds( new Rectangle(
Rectangle highlightBounds = SwingUtilities.convertRectangle( c.getParent(), bounds, rootPane ); SwingUtilities.convertPoint( c, 0, 0, rootPane ),
highlightFigure.setBounds( highlightBounds ); c.getSize() ) );
} }
} }
@@ -308,11 +435,16 @@ public class FlatInspector
text += "ContentAreaFilled: " + ((AbstractButton)c).isContentAreaFilled() + '\n'; text += "ContentAreaFilled: " + ((AbstractButton)c).isContentAreaFilled() + '\n';
text += "Focusable: " + c.isFocusable() + '\n'; text += "Focusable: " + c.isFocusable() + '\n';
text += "Left-to-right: " + c.getComponentOrientation().isLeftToRight() + '\n'; text += "Left-to-right: " + c.getComponentOrientation().isLeftToRight() + '\n';
text += "Parent: " + c.getParent().getClass().getName(); text += "Parent: " + (c.getParent() != null ? c.getParent().getClass().getName() : "null");
if( inspectParentLevel > 0 ) if( inspectParentLevel > 0 )
text += "\n\nParent level: " + inspectParentLevel; text += "\n\nParent level: " + inspectParentLevel;
if( inspectParentLevel > 0 )
text += "\n(press Ctrl/Shift to increase/decrease level)";
else
text += "\n\n(press Ctrl key to inspect parent)";
return text; return text;
} }

View File

@@ -175,6 +175,7 @@ public class FlatSVGIcon
private static ColorFilter instance; private static ColorFilter instance;
private final Map<Integer, String> rgb2keyMap = new HashMap<>(); private final Map<Integer, String> rgb2keyMap = new HashMap<>();
private final Map<Color, Color> color2colorMap = new HashMap<>();
public static ColorFilter getInstance() { public static ColorFilter getInstance() {
if( instance == null ) if( instance == null )
@@ -187,12 +188,28 @@ public class FlatSVGIcon
rgb2keyMap.put( c.rgb, c.key ); rgb2keyMap.put( c.rgb, c.key );
} }
public void addAll( Map<Color, Color> from2toMap ) {
color2colorMap.putAll( from2toMap );
}
public void add( Color from, Color to ) {
color2colorMap.put( from, to );
}
public void remove( Color from ) {
color2colorMap.remove( from );
}
public Color filter( Color color ) { public Color filter( Color color ) {
Color newColor = color2colorMap.get( color );
if( newColor != null )
return newColor;
String colorKey = rgb2keyMap.get( color.getRGB() & 0xffffff ); String colorKey = rgb2keyMap.get( color.getRGB() & 0xffffff );
if( colorKey == null ) if( colorKey == null )
return color; return color;
Color newColor = UIManager.getColor( colorKey ); newColor = UIManager.getColor( colorKey );
if( newColor == null ) if( newColor == null )
return color; return color;

View File

@@ -37,6 +37,7 @@ tasks {
javadoc { javadoc {
options { options {
this as StandardJavadocDocletOptions this as StandardJavadocDocletOptions
use( true )
tags = listOf( "uiDefault", "clientProperty" ) tags = listOf( "uiDefault", "clientProperty" )
} }
isFailOnError = false isFailOnError = false

View File

@@ -159,6 +159,13 @@
"inactiveBackground": "#44475a" "inactiveBackground": "#44475a"
} }
}, },
"ScrollBar": {
"Mac": {
"Transparent": {
"hoverThumbColor": "#bd93f9"
}
}
},
"SearchEverywhere": { "SearchEverywhere": {
"SearchField": { "SearchField": {
"background": "#44475a" "background": "#44475a"

View File

@@ -1,7 +1,7 @@
{ {
"name": "Gradianto Dark Fuchsia", "name": "Gradianto Dark Fuchsia",
"dark": true, "dark": true,
"author": "", "author": "thvardhan",
"editorScheme": "/Gradianto_dark_fuchsia.xml", "editorScheme": "/Gradianto_dark_fuchsia.xml",
"ui": { "ui": {
"*": { "*": {

View File

@@ -1,7 +1,7 @@
{ {
"name": "Gradianto Deep Ocean", "name": "Gradianto Deep Ocean",
"dark": true, "dark": true,
"author": "", "author": "thvardhan",
"editorScheme": "/Gradianto_deep_ocean.xml", "editorScheme": "/Gradianto_deep_ocean.xml",
"ui": { "ui": {
"*": { "*": {
@@ -214,7 +214,7 @@
"tagBackground": "#3d445a", "tagBackground": "#3d445a",
"lightSelectionBackground": "#3c4b7e" "lightSelectionBackground": "#3c4b7e"
}, },
"EditorPane.inactiveBackground": "#040c25" "EditorPane.inactiveBackground": "#25334aff"
}, },
"icons": { "icons": {
"ColorPalette": { "ColorPalette": {

View File

@@ -1,7 +1,7 @@
{ {
"name": "Gradianto Midnight Blue", "name": "Gradianto Midnight Blue",
"dark": true, "dark": true,
"author": "", "author": "thvardhan",
"editorScheme": "/Gradianto_midnight_blue.xml", "editorScheme": "/Gradianto_midnight_blue.xml",
"ui": { "ui": {
"*": { "*": {
@@ -217,7 +217,7 @@
"tagBackground": "#40405a", "tagBackground": "#40405a",
"lightSelectionBackground": "#48387e" "lightSelectionBackground": "#48387e"
}, },
"EditorPane.inactiveBackground": "#1a0225" "EditorPane.inactiveBackground": "#414157ff"
}, },
"icons": { "icons": {
"ColorPalette": { "ColorPalette": {

View File

@@ -5,6 +5,7 @@
"editorScheme": "/gruvbox_dark_hard.xml", "editorScheme": "/gruvbox_dark_hard.xml",
"colors": { "colors": {
"bg0": "#282828", "bg0": "#282828",
"bg0_hh": "#101415",
"bg0_h": "#1d2021", "bg0_h": "#1d2021",
"bg0_s": "#32302f", "bg0_s": "#32302f",
"bg1": "#3c3836", "bg1": "#3c3836",
@@ -51,7 +52,7 @@
"selectionBackgroundInactive": "bg0_s", "selectionBackgroundInactive": "bg0_s",
"selectionInactiveBackground": "bg0_s", "selectionInactiveBackground": "bg0_s",
"selectedBackground": "bg0_h", "selectedBackground": "bg0_hh",
"selectedForeground": "fg0", "selectedForeground": "fg0",
"selectedInactiveBackground": "bg0_s", "selectedInactiveBackground": "bg0_s",
"selectedBackgroundInactive": "bg0_s", "selectedBackgroundInactive": "bg0_s",
@@ -59,7 +60,7 @@
"hoverBackground": "#28282866", "hoverBackground": "#28282866",
"borderColor": "bg2", "borderColor": "bg2",
"disabledBorderColor": "bg0_h", "disabledBorderColor": "bg0_hh",
"separatorColor": "bg2" "separatorColor": "bg2"
}, },
@@ -91,6 +92,7 @@
}, },
"EditorTabs": { "EditorTabs": {
"selectedBackground": "bg0_s", "selectedBackground": "bg0_s",
"underlinedTabBackground": "bg2",
"underlineColor": "blue1", "underlineColor": "blue1",
"inactiveMaskColor": "#28282866" "inactiveMaskColor": "#28282866"
}, },
@@ -101,8 +103,8 @@
}, },
"HeaderTab": { "HeaderTab": {
"selectedInactiveBackground": "bg0_h", "selectedInactiveBackground": "bg0_hh",
"hoverInactiveBackground": "bg0_h" "hoverInactiveBackground": "bg0_hh"
} }
}, },
"Table": { "Table": {

View File

@@ -91,6 +91,7 @@
}, },
"EditorTabs": { "EditorTabs": {
"selectedBackground": "bg0_s", "selectedBackground": "bg0_s",
"underlinedTabBackground": "bg2",
"underlineColor": "blue1", "underlineColor": "blue1",
"inactiveMaskColor": "#28282866" "inactiveMaskColor": "#28282866"
}, },

View File

@@ -91,6 +91,7 @@
}, },
"EditorTabs": { "EditorTabs": {
"selectedBackground": "bg0_s", "selectedBackground": "bg0_s",
"underlinedTabBackground": "bg2",
"underlineColor": "blue1", "underlineColor": "blue1",
"inactiveMaskColor": "#28282866" "inactiveMaskColor": "#28282866"
}, },

View File

@@ -1,5 +1,5 @@
{ {
"name": "Atom One Light", "name": "Atom One Light Contrast",
"dark": false, "dark": false,
"author": "Mallowigi", "author": "Mallowigi",
"editorScheme": "/colors/Atom One Light.xml", "editorScheme": "/colors/Atom One Light.xml",

View File

@@ -24,7 +24,7 @@
"errorForeground": "#cd3359", "errorForeground": "#cd3359",
"borderColor": "#46494f", "borderColor": "#333841",
"disabledBorderColor": "#2d3137", "disabledBorderColor": "#2d3137",
"focusColor": "#21252b", "focusColor": "#21252b",
"focusedBorderColor": "#568AF2", "focusedBorderColor": "#568AF2",
@@ -93,8 +93,6 @@
"foreground": "#abb2bf" "foreground": "#abb2bf"
}, },
"DebuggerPopup.borderColor": "#46494f",
"DefaultTabs": { "DefaultTabs": {
"underlineColor": "#568AF2", "underlineColor": "#568AF2",
"inactiveUnderlineColor": "#4269b9", "inactiveUnderlineColor": "#4269b9",
@@ -104,7 +102,7 @@
"DragAndDrop": { "DragAndDrop": {
"areaForeground": "#abb2bf", "areaForeground": "#abb2bf",
"areaBackground": "#323844", "areaBackground": "#323844",
"areaBorderColor": "#46494f" "areaBorderColor": "#333841"
}, },
"Editor": { "Editor": {
@@ -139,11 +137,6 @@
"visitedForeground": "#6494ed" "visitedForeground": "#6494ed"
}, },
"MenuBar.borderColor": "#46494f",
"Menu.borderColor": "#2d3137",
"NavBar.borderColor": "#46494f",
"Notification": { "Notification": {
"background": "#3d424b", "background": "#3d424b",
"borderColor": "#53565f", "borderColor": "#53565f",
@@ -312,8 +305,7 @@
"Header": { "Header": {
"background": "#414855", "background": "#414855",
"inactiveBackground": "#323844", "inactiveBackground": "#323844"
"borderColor": "#21252b"
}, },
"HeaderTab": { "HeaderTab": {

View File

@@ -33,6 +33,7 @@ tasks {
javadoc { javadoc {
options { options {
this as StandardJavadocDocletOptions this as StandardJavadocDocletOptions
use( true )
tags = listOf( "uiDefault", "clientProperty" ) tags = listOf( "uiDefault", "clientProperty" )
} }
isFailOnError = false isFailOnError = false

View File

@@ -38,6 +38,7 @@ tasks {
javadoc { javadoc {
options { options {
this as StandardJavadocDocletOptions this as StandardJavadocDocletOptions
use( true )
tags = listOf( "uiDefault", "clientProperty" ) tags = listOf( "uiDefault", "clientProperty" )
} }
isFailOnError = false isFailOnError = false

View File

@@ -55,6 +55,22 @@ public class FlatComponentsTest
progressBar4.setIndeterminate( indeterminate ); progressBar4.setIndeterminate( indeterminate );
} }
private void borderPaintedChanged() {
boolean borderPainted = borderPaintedCheckBox.isSelected();
for( Component c : getComponents() ) {
if( c instanceof AbstractButton )
((AbstractButton)c).setBorderPainted( borderPainted );
else if( c instanceof JProgressBar )
((JProgressBar)c).setBorderPainted( borderPainted );
else if( c instanceof JToolBar )
((JToolBar)c).setBorderPainted( borderPainted );
if( c instanceof JCheckBox )
((JCheckBox)c).setBorderPaintedFlat( borderPainted );
}
}
private void contentAreaFilledChanged() { private void contentAreaFilledChanged() {
boolean contentAreaFilled = contentAreaFilledCheckBox.isSelected(); boolean contentAreaFilled = contentAreaFilledCheckBox.isSelected();
@@ -145,14 +161,11 @@ public class FlatComponentsTest
JCheckBox checkBox4 = new JCheckBox(); JCheckBox checkBox4 = new JCheckBox();
JToggleButton toggleButton5 = new JToggleButton(); JToggleButton toggleButton5 = new JToggleButton();
JToggleButton toggleButton8 = new JToggleButton(); JToggleButton toggleButton8 = new JToggleButton();
buttonTypeComboBox = new JComboBox<>();
JLabel radioButtonLabel = new JLabel(); JLabel radioButtonLabel = new JLabel();
JRadioButton radioButton1 = new JRadioButton(); JRadioButton radioButton1 = new JRadioButton();
JRadioButton radioButton2 = new JRadioButton(); JRadioButton radioButton2 = new JRadioButton();
JRadioButton radioButton3 = new JRadioButton(); JRadioButton radioButton3 = new JRadioButton();
JRadioButton radioButton4 = new JRadioButton(); JRadioButton radioButton4 = new JRadioButton();
contentAreaFilledCheckBox = new JCheckBox();
roundRectCheckBox = new JCheckBox();
JLabel comboBoxLabel = new JLabel(); JLabel comboBoxLabel = new JLabel();
JComboBox<String> comboBox1 = new JComboBox<>(); JComboBox<String> comboBox1 = new JComboBox<>();
JComboBox<String> comboBox2 = new JComboBox<>(); JComboBox<String> comboBox2 = new JComboBox<>();
@@ -235,15 +248,20 @@ public class FlatComponentsTest
JButton button10 = new JButton(); JButton button10 = new JButton();
JButton button11 = new JButton(); JButton button11 = new JButton();
JToggleButton toggleButton7 = new JToggleButton(); JToggleButton toggleButton7 = new JToggleButton();
JScrollPane scrollPane15 = new JScrollPane();
JPanel panel3 = new JPanel();
JButton button21 = new JButton();
JPanel panel5 = new JPanel();
buttonTypeComboBox = new JComboBox<>();
borderPaintedCheckBox = new JCheckBox();
roundRectCheckBox = new JCheckBox();
contentAreaFilledCheckBox = new JCheckBox();
JPanel panel4 = new JPanel(); JPanel panel4 = new JPanel();
noOutlineRadioButton = new JRadioButton(); noOutlineRadioButton = new JRadioButton();
errorOutlineRadioButton = new JRadioButton(); errorOutlineRadioButton = new JRadioButton();
warningOutlineRadioButton = new JRadioButton(); warningOutlineRadioButton = new JRadioButton();
magentaOutlineRadioButton = new JRadioButton(); magentaOutlineRadioButton = new JRadioButton();
magentaCyanOutlineRadioButton = new JRadioButton(); magentaCyanOutlineRadioButton = new JRadioButton();
JScrollPane scrollPane15 = new JScrollPane();
JPanel panel3 = new JPanel();
JButton button21 = new JButton();
JLabel scrollBarLabel = new JLabel(); JLabel scrollBarLabel = new JLabel();
JScrollBar scrollBar1 = new JScrollBar(); JScrollBar scrollBar1 = new JScrollBar();
JScrollBar scrollBar4 = new JScrollBar(); JScrollBar scrollBar4 = new JScrollBar();
@@ -530,17 +548,6 @@ public class FlatComponentsTest
toggleButton8.setSelected(true); toggleButton8.setSelected(true);
add(toggleButton8, "cell 5 3"); add(toggleButton8, "cell 5 3");
//---- buttonTypeComboBox ----
buttonTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
"-",
"square",
"roundRect",
"tab",
"help"
}));
buttonTypeComboBox.addActionListener(e -> buttonTypeChanged());
add(buttonTypeComboBox, "cell 6 3");
//---- radioButtonLabel ---- //---- radioButtonLabel ----
radioButtonLabel.setText("JRadioButton:"); radioButtonLabel.setText("JRadioButton:");
add(radioButtonLabel, "cell 0 4"); add(radioButtonLabel, "cell 0 4");
@@ -567,17 +574,6 @@ public class FlatComponentsTest
radioButton4.setEnabled(false); radioButton4.setEnabled(false);
add(radioButton4, "cell 4 4"); add(radioButton4, "cell 4 4");
//---- contentAreaFilledCheckBox ----
contentAreaFilledCheckBox.setText("contentAreaFilled");
contentAreaFilledCheckBox.setSelected(true);
contentAreaFilledCheckBox.addActionListener(e -> contentAreaFilledChanged());
add(contentAreaFilledCheckBox, "cell 5 4");
//---- roundRectCheckBox ----
roundRectCheckBox.setText("roundRect");
roundRectCheckBox.addActionListener(e -> roundRectChanged());
add(roundRectCheckBox, "cell 6 4");
//---- comboBoxLabel ---- //---- comboBoxLabel ----
comboBoxLabel.setText("JComboBox:"); comboBoxLabel.setText("JComboBox:");
add(comboBoxLabel, "cell 0 5"); add(comboBoxLabel, "cell 0 5");
@@ -1039,38 +1035,6 @@ public class FlatComponentsTest
} }
add(toolBar2, "cell 4 13 1 6,growy"); add(toolBar2, "cell 4 13 1 6,growy");
//======== panel4 ========
{
panel4.setLayout(new BoxLayout(panel4, BoxLayout.Y_AXIS));
//---- noOutlineRadioButton ----
noOutlineRadioButton.setText("no outline");
noOutlineRadioButton.setSelected(true);
noOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(noOutlineRadioButton);
//---- errorOutlineRadioButton ----
errorOutlineRadioButton.setText("error");
errorOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(errorOutlineRadioButton);
//---- warningOutlineRadioButton ----
warningOutlineRadioButton.setText("warning");
warningOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(warningOutlineRadioButton);
//---- magentaOutlineRadioButton ----
magentaOutlineRadioButton.setText("magenta");
magentaOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(magentaOutlineRadioButton);
//---- magentaCyanOutlineRadioButton ----
magentaCyanOutlineRadioButton.setText("magenta / cyan");
magentaCyanOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(magentaCyanOutlineRadioButton);
}
add(panel4, "cell 5 13");
//======== scrollPane15 ======== //======== scrollPane15 ========
{ {
scrollPane15.setBorder(BorderFactory.createEmptyBorder()); scrollPane15.setBorder(BorderFactory.createEmptyBorder());
@@ -1088,7 +1052,82 @@ public class FlatComponentsTest
} }
scrollPane15.setViewportView(panel3); scrollPane15.setViewportView(panel3);
} }
add(scrollPane15, "cell 6 13,growy,width 100,height 50"); add(scrollPane15, "cell 6 10 1 3,growy,width 100,height 50");
//======== panel5 ========
{
panel5.setBorder(new TitledBorder("Control"));
panel5.setLayout(new MigLayout(
"ltr,insets dialog,hidemode 3",
// columns
"[]" +
"[]",
// rows
"[]" +
"[]" +
"[]"));
//---- buttonTypeComboBox ----
buttonTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
"-",
"square",
"roundRect",
"tab",
"help"
}));
buttonTypeComboBox.addActionListener(e -> buttonTypeChanged());
panel5.add(buttonTypeComboBox, "cell 0 0");
//---- borderPaintedCheckBox ----
borderPaintedCheckBox.setText("borderPainted");
borderPaintedCheckBox.setSelected(true);
borderPaintedCheckBox.addActionListener(e -> borderPaintedChanged());
panel5.add(borderPaintedCheckBox, "cell 1 0");
//---- roundRectCheckBox ----
roundRectCheckBox.setText("roundRect");
roundRectCheckBox.addActionListener(e -> roundRectChanged());
panel5.add(roundRectCheckBox, "cell 0 1");
//---- contentAreaFilledCheckBox ----
contentAreaFilledCheckBox.setText("contentAreaFilled");
contentAreaFilledCheckBox.setSelected(true);
contentAreaFilledCheckBox.addActionListener(e -> contentAreaFilledChanged());
panel5.add(contentAreaFilledCheckBox, "cell 1 1");
//======== panel4 ========
{
panel4.setLayout(new BoxLayout(panel4, BoxLayout.Y_AXIS));
//---- noOutlineRadioButton ----
noOutlineRadioButton.setText("no outline");
noOutlineRadioButton.setSelected(true);
noOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(noOutlineRadioButton);
//---- errorOutlineRadioButton ----
errorOutlineRadioButton.setText("error");
errorOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(errorOutlineRadioButton);
//---- warningOutlineRadioButton ----
warningOutlineRadioButton.setText("warning");
warningOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(warningOutlineRadioButton);
//---- magentaOutlineRadioButton ----
magentaOutlineRadioButton.setText("magenta");
magentaOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(magentaOutlineRadioButton);
//---- magentaCyanOutlineRadioButton ----
magentaCyanOutlineRadioButton.setText("magenta / cyan");
magentaCyanOutlineRadioButton.addActionListener(e -> outlineChanged());
panel4.add(magentaCyanOutlineRadioButton);
}
panel5.add(panel4, "cell 0 2");
}
add(panel5, "cell 5 13 2 10,grow");
//---- scrollBarLabel ---- //---- scrollBarLabel ----
scrollBarLabel.setText("JScrollBar:"); scrollBarLabel.setText("JScrollBar:");
@@ -1235,11 +1274,11 @@ public class FlatComponentsTest
toggleButton17.setSelected(true); toggleButton17.setSelected(true);
toolBar1.add(toggleButton17); toolBar1.add(toggleButton17);
} }
add(toolBar1, "cell 1 23 2 1,growx"); add(toolBar1, "cell 1 23 5 1");
//---- label3 ---- //---- label3 ----
label3.setText("Square:"); label3.setText("Square:");
add(label3, "cell 3 23 3 1"); add(label3, "cell 1 23 5 1");
//======== toolBar3 ======== //======== toolBar3 ========
{ {
@@ -1266,11 +1305,11 @@ public class FlatComponentsTest
toggleButton24.putClientProperty("JButton.buttonType", "square"); toggleButton24.putClientProperty("JButton.buttonType", "square");
toolBar3.add(toggleButton24); toolBar3.add(toggleButton24);
} }
add(toolBar3, "cell 3 23 3 1"); add(toolBar3, "cell 1 23 5 1");
//---- label4 ---- //---- label4 ----
label4.setText("Round:"); label4.setText("Round:");
add(label4, "cell 3 23 3 1"); add(label4, "cell 1 23 5 1");
//======== toolBar4 ======== //======== toolBar4 ========
{ {
@@ -1297,7 +1336,7 @@ public class FlatComponentsTest
toggleButton26.putClientProperty("JButton.buttonType", "roundRect"); toggleButton26.putClientProperty("JButton.buttonType", "roundRect");
toolBar4.add(toggleButton26); toolBar4.add(toggleButton26);
} }
add(toolBar4, "cell 3 23 3 1"); add(toolBar4, "cell 1 23 5 1");
//---- buttonGroup1 ---- //---- buttonGroup1 ----
ButtonGroup buttonGroup1 = new ButtonGroup(); ButtonGroup buttonGroup1 = new ButtonGroup();
@@ -1315,12 +1354,13 @@ public class FlatComponentsTest
} }
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JComboBox<String> buttonTypeComboBox;
private JCheckBox contentAreaFilledCheckBox;
private JCheckBox roundRectCheckBox;
private JTextField textField1; private JTextField textField1;
private JProgressBar progressBar3; private JProgressBar progressBar3;
private JProgressBar progressBar4; private JProgressBar progressBar4;
private JComboBox<String> buttonTypeComboBox;
private JCheckBox borderPaintedCheckBox;
private JCheckBox roundRectCheckBox;
private JCheckBox contentAreaFilledCheckBox;
private JRadioButton noOutlineRadioButton; private JRadioButton noOutlineRadioButton;
private JRadioButton errorOutlineRadioButton; private JRadioButton errorOutlineRadioButton;
private JRadioButton warningOutlineRadioButton; private JRadioButton warningOutlineRadioButton;

View File

@@ -296,23 +296,6 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 3" "value": "cell 5 3"
} ) } )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "buttonTypeComboBox"
"model": new javax.swing.DefaultComboBoxModel {
selectedItem: "-"
addElement( "-" )
addElement( "square" )
addElement( "roundRect" )
addElement( "tab" )
addElement( "help" )
}
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 3"
} )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "radioButtonLabel" name: "radioButtonLabel"
"text": "JRadioButton:" "text": "JRadioButton:"
@@ -349,27 +332,6 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 4" "value": "cell 4 4"
} ) } )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "contentAreaFilledCheckBox"
"text": "contentAreaFilled"
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "contentAreaFilledChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 4"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "roundRectCheckBox"
"text": "roundRect"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "roundRectChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 4"
} )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "comboBoxLabel" name: "comboBoxLabel"
"text": "JComboBox:" "text": "JComboBox:"
@@ -958,59 +920,6 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 13 1 6,growy" "value": "cell 4 13 1 6,growy"
} ) } )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class javax.swing.BoxLayout ) {
"axis": 1
} ) {
name: "panel4"
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "noOutlineRadioButton"
"text": "no outline"
"$buttonGroup": new FormReference( "buttonGroup1" )
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "errorOutlineRadioButton"
"text": "error"
"$buttonGroup": new FormReference( "buttonGroup1" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "warningOutlineRadioButton"
"text": "warning"
"$buttonGroup": new FormReference( "buttonGroup1" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "magentaOutlineRadioButton"
"text": "magenta"
"$buttonGroup": &FormReference0 new FormReference( "buttonGroup1" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "magentaCyanOutlineRadioButton"
"text": "magenta / cyan"
"$buttonGroup": #FormReference0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 13"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane15" name: "scrollPane15"
"border": new javax.swing.border.EmptyBorder( 0, 0, 0, 0 ) "border": new javax.swing.border.EmptyBorder( 0, 0, 0, 0 )
@@ -1027,7 +936,119 @@ new FormModel {
} ) } )
} ) } )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 13,growy,width 100,height 50" "value": "cell 6 10 1 3,growy,width 100,height 50"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$columnConstraints": "[][]"
"$rowConstraints": "[][][]"
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
} ) {
name: "panel5"
"border": new javax.swing.border.TitledBorder( "Control" )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "buttonTypeComboBox"
"model": new javax.swing.DefaultComboBoxModel {
selectedItem: "-"
addElement( "-" )
addElement( "square" )
addElement( "roundRect" )
addElement( "tab" )
addElement( "help" )
}
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "borderPaintedCheckBox"
"text": "borderPainted"
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "borderPaintedChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "roundRectCheckBox"
"text": "roundRect"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "roundRectChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "contentAreaFilledCheckBox"
"text": "contentAreaFilled"
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "contentAreaFilledChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class javax.swing.BoxLayout ) {
"axis": 1
} ) {
name: "panel4"
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "noOutlineRadioButton"
"text": "no outline"
"$buttonGroup": new FormReference( "buttonGroup1" )
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "errorOutlineRadioButton"
"text": "error"
"$buttonGroup": new FormReference( "buttonGroup1" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "warningOutlineRadioButton"
"text": "warning"
"$buttonGroup": new FormReference( "buttonGroup1" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "magentaOutlineRadioButton"
"text": "magenta"
"$buttonGroup": &FormReference0 new FormReference( "buttonGroup1" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "magentaCyanOutlineRadioButton"
"text": "magenta / cyan"
"$buttonGroup": #FormReference0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "outlineChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 13 2 10,grow"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "scrollBarLabel" name: "scrollBarLabel"
@@ -1231,13 +1252,13 @@ new FormModel {
"selected": true "selected": true
} ) } )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 23 2 1,growx" "value": "cell 1 23 5 1"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3" name: "label3"
"text": "Square:" "text": "Square:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 23 3 1" "value": "cell 1 23 5 1"
} ) } )
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
name: "toolBar3" name: "toolBar3"
@@ -1264,13 +1285,13 @@ new FormModel {
"$client.JButton.buttonType": "square" "$client.JButton.buttonType": "square"
} ) } )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 23 3 1" "value": "cell 1 23 5 1"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4" name: "label4"
"text": "Round:" "text": "Round:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 23 3 1" "value": "cell 1 23 5 1"
} ) } )
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) { add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
name: "toolBar4" name: "toolBar4"
@@ -1297,7 +1318,7 @@ new FormModel {
"$client.JButton.buttonType": "roundRect" "$client.JButton.buttonType": "roundRect"
} ) } )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 23 3 1" "value": "cell 1 23 5 1"
} ) } )
}, new FormLayoutConstraints( null ) { }, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 ) "location": new java.awt.Point( 0, 0 )

View File

@@ -0,0 +1,500 @@
/*
* 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.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.plaf.basic.BasicComboBoxEditor;
import com.formdev.flatlaf.icons.FlatFileViewFloppyDriveIcon;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.swing.*;
/**
* @author Karl Tauber
*/
public class FlatCustomBordersTest
extends FlatTestPanel
{
private static final Color RED = new Color( 0x60ff0000, true );
private static final Color GREEN = new Color( 0x6000ff00, true );
private static final Color MAGENTA = new Color( 0x60ff00ff, true );
private static final Color ORANGE = new Color( 0x60ffc800, true );
public static void main( String[] args ) {
SwingUtilities.invokeLater( () -> {
FlatTestFrame frame = FlatTestFrame.create( args, "FlatCustomBordersTest" );
frame.showFrame( FlatCustomBordersTest::new );
} );
}
FlatCustomBordersTest() {
initComponents();
applyCustomBorders();
}
@Override
public void updateUI() {
super.updateUI();
if( textField2 != null )
applyCustomBorders();
}
private void applyCustomBorders() {
LineBorder lineBorder = new LineBorder( MAGENTA, UIScale.scale( 3 ) );
applyCustomInsideBorder( button2, "Button.border" );
applyCustomInsideBorder( button6, "Button.border" );
applyCustomOutsideBorder( button3, "Button.border" );
applyCustomOutsideBorder( button7, "Button.border" );
button4.setBorder( lineBorder );
button8.setBorder( lineBorder );
applyCustomInsideBorder( comboBox2, "ComboBox.border" );
applyCustomInsideBorder( comboBox6, "ComboBox.border" );
applyCustomOutsideBorder( comboBox3, "ComboBox.border" );
applyCustomOutsideBorder( comboBox7, "ComboBox.border" );
comboBox4.setBorder( lineBorder );
comboBox8.setBorder( lineBorder );
applyCustomInsideBorder( comboBox10, "ComboBox.border" );
applyCustomInsideBorder( comboBox14, "ComboBox.border" );
applyCustomOutsideBorder( comboBox11, "ComboBox.border" );
applyCustomOutsideBorder( comboBox15, "ComboBox.border" );
comboBox12.setBorder( lineBorder );
comboBox16.setBorder( lineBorder );
applyCustomInsideBorder( spinner2, "Spinner.border" );
applyCustomInsideBorder( spinner6, "Spinner.border" );
applyCustomOutsideBorder( spinner3, "Spinner.border" );
applyCustomOutsideBorder( spinner7, "Spinner.border" );
spinner4.setBorder( lineBorder );
spinner8.setBorder( lineBorder );
applyCustomInsideBorder( textField2, "TextField.border" );
applyCustomInsideBorder( textField6, "TextField.border" );
applyCustomOutsideBorder( textField3, "TextField.border" );
applyCustomOutsideBorder( textField7, "TextField.border" );
textField4.setBorder( lineBorder );
textField8.setBorder( lineBorder );
applyCustomComboBoxEditorBorder( comboBox17 );
applyCustomComboBoxEditorBorder( comboBox18 );
applyCustomComboBoxEditorBorderWithIcon( comboBox19 );
applyCustomComboBoxEditorBorderWithIcon( comboBox20 );
}
private void applyCustomInsideBorder( JComponent c, String uiKey ) {
c.setBorder( new CompoundBorder( UIManager.getBorder( uiKey ), new LineBorder( RED, UIScale.scale( 3 ) ) ) );
}
private void applyCustomOutsideBorder( JComponent c, String uiKey ) {
c.setBorder( new CompoundBorder( new LineBorder( GREEN, UIScale.scale( 3 ) ), UIManager.getBorder( uiKey ) ) );
}
private void applyCustomComboBoxEditorBorder( JComboBox<String> comboBox ) {
applyCustomComboBoxEditorBorder( comboBox, new LineBorder( ORANGE, UIScale.scale( 3 ) ) );
}
private void applyCustomComboBoxEditorBorderWithIcon( JComboBox<String> comboBox ) {
applyCustomComboBoxEditorBorder( comboBox, new BorderWithIcon() );
}
private void applyCustomComboBoxEditorBorder( JComboBox<String> comboBox, Border border ) {
JTextField customTextField = new JTextField();
customTextField.setBorder( border );
comboBox.setEditor( new BasicComboBoxEditor() {
@Override
protected JTextField createEditorComponent() {
return customTextField;
}
} );
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
label1 = new JLabel();
label3 = new JLabel();
label4 = new JLabel();
label2 = new JLabel();
label8 = new JLabel();
label9 = new JLabel();
label7 = new JLabel();
button1 = new JButton();
button2 = new JButton();
button3 = new JButton();
button4 = new JButton();
button5 = new JButton();
button6 = new JButton();
button7 = new JButton();
button8 = new JButton();
label5 = new JLabel();
comboBox1 = new JComboBox<>();
comboBox2 = new JComboBox<>();
comboBox3 = new JComboBox<>();
comboBox4 = new JComboBox<>();
comboBox5 = new JComboBox<>();
comboBox6 = new JComboBox<>();
comboBox7 = new JComboBox<>();
comboBox8 = new JComboBox<>();
comboBox9 = new JComboBox<>();
comboBox10 = new JComboBox<>();
comboBox11 = new JComboBox<>();
comboBox12 = new JComboBox<>();
comboBox17 = new JComboBox<>();
comboBox19 = new JComboBox<>();
comboBox13 = new JComboBox<>();
comboBox14 = new JComboBox<>();
comboBox15 = new JComboBox<>();
comboBox16 = new JComboBox<>();
comboBox18 = new JComboBox<>();
comboBox20 = new JComboBox<>();
label6 = new JLabel();
spinner1 = new JSpinner();
spinner2 = new JSpinner();
spinner3 = new JSpinner();
spinner4 = new JSpinner();
spinner5 = new JSpinner();
spinner6 = new JSpinner();
spinner7 = new JSpinner();
spinner8 = new JSpinner();
textFieldLabel = new JLabel();
textField1 = new JTextField();
textField2 = new JTextField();
textField3 = new JTextField();
textField4 = new JTextField();
textField5 = new JTextField();
textField6 = new JTextField();
textField7 = new JTextField();
textField8 = new JTextField();
//======== this ========
setLayout(new MigLayout(
"ltr,insets dialog,hidemode 3",
// columns
"[]" +
"[fill]" +
"[fill]" +
"[fill]" +
"[fill]" +
"[fill]" +
"[fill]",
// rows
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]"));
//---- label1 ----
label1.setText("plain");
add(label1, "cell 1 0");
//---- label3 ----
label3.setText("custom inside");
add(label3, "cell 2 0");
//---- label4 ----
label4.setText("custom outside");
add(label4, "cell 3 0");
//---- label2 ----
label2.setText("LineBorder");
add(label2, "cell 4 0");
//---- label8 ----
label8.setText("custom editor");
add(label8, "cell 5 0");
//---- label9 ----
label9.setText("with icon");
add(label9, "cell 6 0");
//---- label7 ----
label7.setText("JButton:");
add(label7, "cell 0 1");
//---- button1 ----
button1.setText("text");
add(button1, "cell 1 1");
//---- button2 ----
button2.setText("text");
add(button2, "cell 2 1");
//---- button3 ----
button3.setText("text");
add(button3, "cell 3 1");
//---- button4 ----
button4.setText("text");
add(button4, "cell 4 1");
//---- button5 ----
button5.setText("text");
button5.putClientProperty("JButton.buttonType", "roundRect");
add(button5, "cell 1 2");
//---- button6 ----
button6.setText("text");
button6.putClientProperty("JButton.buttonType", "roundRect");
add(button6, "cell 2 2");
//---- button7 ----
button7.setText("text");
button7.putClientProperty("JButton.buttonType", "roundRect");
add(button7, "cell 3 2");
//---- button8 ----
button8.setText("text");
button8.putClientProperty("JButton.buttonType", "roundRect");
add(button8, "cell 4 2");
//---- label5 ----
label5.setText("JComboBox:");
add(label5, "cell 0 3");
add(comboBox1, "cell 1 3");
add(comboBox2, "cell 2 3");
add(comboBox3, "cell 3 3");
add(comboBox4, "cell 4 3");
//---- comboBox5 ----
comboBox5.putClientProperty("JComponent.roundRect", true);
add(comboBox5, "cell 1 4");
//---- comboBox6 ----
comboBox6.putClientProperty("JComponent.roundRect", true);
add(comboBox6, "cell 2 4");
//---- comboBox7 ----
comboBox7.putClientProperty("JComponent.roundRect", true);
add(comboBox7, "cell 3 4");
//---- comboBox8 ----
comboBox8.putClientProperty("JComponent.roundRect", true);
add(comboBox8, "cell 4 4");
//---- comboBox9 ----
comboBox9.setEditable(true);
add(comboBox9, "cell 1 5");
//---- comboBox10 ----
comboBox10.setEditable(true);
add(comboBox10, "cell 2 5");
//---- comboBox11 ----
comboBox11.setEditable(true);
add(comboBox11, "cell 3 5");
//---- comboBox12 ----
comboBox12.setEditable(true);
add(comboBox12, "cell 4 5");
//---- comboBox17 ----
comboBox17.setEditable(true);
add(comboBox17, "cell 5 5");
//---- comboBox19 ----
comboBox19.setEditable(true);
add(comboBox19, "cell 6 5");
//---- comboBox13 ----
comboBox13.putClientProperty("JComponent.roundRect", true);
comboBox13.setEditable(true);
add(comboBox13, "cell 1 6");
//---- comboBox14 ----
comboBox14.putClientProperty("JComponent.roundRect", true);
comboBox14.setEditable(true);
add(comboBox14, "cell 2 6");
//---- comboBox15 ----
comboBox15.putClientProperty("JComponent.roundRect", true);
comboBox15.setEditable(true);
add(comboBox15, "cell 3 6");
//---- comboBox16 ----
comboBox16.putClientProperty("JComponent.roundRect", true);
comboBox16.setEditable(true);
add(comboBox16, "cell 4 6");
//---- comboBox18 ----
comboBox18.putClientProperty("JComponent.roundRect", true);
comboBox18.setEditable(true);
add(comboBox18, "cell 5 6");
//---- comboBox20 ----
comboBox20.putClientProperty("JComponent.roundRect", true);
comboBox20.setEditable(true);
add(comboBox20, "cell 6 6");
//---- label6 ----
label6.setText("JSpinner:");
add(label6, "cell 0 7");
add(spinner1, "cell 1 7");
add(spinner2, "cell 2 7");
add(spinner3, "cell 3 7");
add(spinner4, "cell 4 7");
//---- spinner5 ----
spinner5.putClientProperty("JComponent.roundRect", true);
add(spinner5, "cell 1 8");
//---- spinner6 ----
spinner6.putClientProperty("JComponent.roundRect", true);
add(spinner6, "cell 2 8");
//---- spinner7 ----
spinner7.putClientProperty("JComponent.roundRect", true);
add(spinner7, "cell 3 8");
//---- spinner8 ----
spinner8.putClientProperty("JComponent.roundRect", true);
add(spinner8, "cell 4 8");
//---- textFieldLabel ----
textFieldLabel.setText("JTextField:");
add(textFieldLabel, "cell 0 9");
//---- textField1 ----
textField1.setText("text");
textField1.putClientProperty("JComponent.roundRect", false);
add(textField1, "cell 1 9,growx");
//---- textField2 ----
textField2.putClientProperty("JComponent.roundRect", false);
textField2.setText("text");
add(textField2, "cell 2 9");
//---- textField3 ----
textField3.setText("text");
add(textField3, "cell 3 9");
//---- textField4 ----
textField4.putClientProperty("JComponent.roundRect", false);
textField4.setText("text");
add(textField4, "cell 4 9");
//---- textField5 ----
textField5.setText("text");
textField5.putClientProperty("JComponent.roundRect", true);
add(textField5, "cell 1 10,growx");
//---- textField6 ----
textField6.putClientProperty("JComponent.roundRect", true);
textField6.setText("text");
add(textField6, "cell 2 10");
//---- textField7 ----
textField7.setText("text");
textField7.putClientProperty("JComponent.roundRect", true);
add(textField7, "cell 3 10");
//---- textField8 ----
textField8.putClientProperty("JComponent.roundRect", true);
textField8.setText("text");
add(textField8, "cell 4 10");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JLabel label1;
private JLabel label3;
private JLabel label4;
private JLabel label2;
private JLabel label8;
private JLabel label9;
private JLabel label7;
private JButton button1;
private JButton button2;
private JButton button3;
private JButton button4;
private JButton button5;
private JButton button6;
private JButton button7;
private JButton button8;
private JLabel label5;
private JComboBox<String> comboBox1;
private JComboBox<String> comboBox2;
private JComboBox<String> comboBox3;
private JComboBox<String> comboBox4;
private JComboBox<String> comboBox5;
private JComboBox<String> comboBox6;
private JComboBox<String> comboBox7;
private JComboBox<String> comboBox8;
private JComboBox<String> comboBox9;
private JComboBox<String> comboBox10;
private JComboBox<String> comboBox11;
private JComboBox<String> comboBox12;
private JComboBox<String> comboBox17;
private JComboBox<String> comboBox19;
private JComboBox<String> comboBox13;
private JComboBox<String> comboBox14;
private JComboBox<String> comboBox15;
private JComboBox<String> comboBox16;
private JComboBox<String> comboBox18;
private JComboBox<String> comboBox20;
private JLabel label6;
private JSpinner spinner1;
private JSpinner spinner2;
private JSpinner spinner3;
private JSpinner spinner4;
private JSpinner spinner5;
private JSpinner spinner6;
private JSpinner spinner7;
private JSpinner spinner8;
private JLabel textFieldLabel;
private JTextField textField1;
private JTextField textField2;
private JTextField textField3;
private JTextField textField4;
private JTextField textField5;
private JTextField textField6;
private JTextField textField7;
private JTextField textField8;
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class BorderWithIcon -----------------------------------------------
private static class BorderWithIcon
implements Border
{
private final FlatFileViewFloppyDriveIcon icon = new FlatFileViewFloppyDriveIcon();
@Override
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
icon.paintIcon( c, g, x + width - icon.getIconWidth() - 2, y + ((height - icon.getIconHeight()) / 2) );
}
@Override
public boolean isBorderOpaque() {
return false;
}
@Override
public Insets getBorderInsets( Component c ) {
return new Insets( 0, 0, 0, icon.getIconWidth() + 4 );
}
}
}

View File

@@ -0,0 +1,410 @@
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[][fill][fill][fill][fill][fill][fill]"
"$rowConstraints": "[][][][][][][][][][][]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1"
"text": "plain"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3"
"text": "custom inside"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4"
"text": "custom outside"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label2"
"text": "LineBorder"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label8"
"text": "custom editor"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label9"
"text": "with icon"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label7"
"text": "JButton:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button2"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button3"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button4"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button5"
"text": "text"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button6"
"text": "text"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 2"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button7"
"text": "text"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 2"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button8"
"text": "text"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label5"
"text": "JComboBox:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox1"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox2"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox3"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox4"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox5"
"$client.JComponent.roundRect": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox6"
"$client.JComponent.roundRect": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 4"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox7"
"$client.JComponent.roundRect": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 4"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox8"
"$client.JComponent.roundRect": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 4"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox9"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox10"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox11"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox12"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox17"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox19"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox13"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox14"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox15"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox16"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox18"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox20"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 6"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label6"
"text": "JSpinner:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner2"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner4"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner5"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 8"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner6"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 8"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner7"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 8"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner8"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 8"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "textFieldLabel"
"text": "JTextField:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 9"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField1"
"text": "text"
"$client.JComponent.roundRect": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 9,growx"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField2"
"$client.JComponent.roundRect": false
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 9"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField3"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 9"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField4"
"$client.JComponent.roundRect": false
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 9"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField5"
"text": "text"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 10,growx"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField6"
"$client.JComponent.roundRect": true
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 10"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField7"
"text": "text"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 10"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField8"
"$client.JComponent.roundRect": true
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 10"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 790, 715 )
} )
}
}

View File

@@ -112,10 +112,16 @@ public class FlatTestFrame
lafModel.addElement( new LookAndFeelInfo( name, className ) ); lafModel.addElement( new LookAndFeelInfo( name, className ) );
} }
String substanceClassName = "org.pushingpixels.substance.api.skin.SubstanceGraphiteAquaLookAndFeel"; String substanceLightClassName = "org.pushingpixels.substance.api.skin.SubstanceBusinessLookAndFeel";
if( SystemInfo.IS_JAVA_9_OR_LATER && isClassAvailable( substanceClassName ) ) { if( SystemInfo.IS_JAVA_9_OR_LATER && isClassAvailable( substanceLightClassName ) ) {
lafModel.addElement( new LookAndFeelInfo( "Substance (F5)", substanceClassName ) ); lafModel.addElement( new LookAndFeelInfo( "Substance Business (F5)", substanceLightClassName ) );
registerSwitchToLookAndFeel( "F5", substanceClassName ); registerSwitchToLookAndFeel( "F5", substanceLightClassName );
}
String substanceDarkClassName = "org.pushingpixels.substance.api.skin.SubstanceGraphiteAquaLookAndFeel";
if( SystemInfo.IS_JAVA_9_OR_LATER && isClassAvailable( substanceDarkClassName ) ) {
lafModel.addElement( new LookAndFeelInfo( "Substance Graphite Aqua (Ctrl+F5)", substanceDarkClassName ) );
registerSwitchToLookAndFeel( "ctrl F5", substanceDarkClassName );
} }
String webLafClassName = "com.alee.laf.WebLookAndFeel"; String webLafClassName = "com.alee.laf.WebLookAndFeel";
@@ -143,6 +149,7 @@ public class FlatTestFrame
if( scaleFactor != null ) if( scaleFactor != null )
scaleFactorComboBox.setSelectedItem( scaleFactor ); scaleFactorComboBox.setSelectedItem( scaleFactor );
updateFontSizeSpinner();
updateSizeVariantComboBox(); updateSizeVariantComboBox();
// register F1, F2, ... keys to switch to Light, Dark or other LaFs // register F1, F2, ... keys to switch to Light, Dark or other LaFs
@@ -162,6 +169,21 @@ public class FlatTestFrame
registerSwitchToLookAndFeel( "F12", MetalLookAndFeel.class.getName() ); registerSwitchToLookAndFeel( "F12", MetalLookAndFeel.class.getName() );
registerSwitchToLookAndFeel( "F11", NimbusLookAndFeel.class.getName() ); registerSwitchToLookAndFeel( "F11", NimbusLookAndFeel.class.getName() );
// register Ctrl+0, Ctrl++ and Ctrl+- to change font size
int menuShortcutKeyMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
((JComponent)getContentPane()).registerKeyboardAction(
e -> restoreFont(),
KeyStroke.getKeyStroke( KeyEvent.VK_0, menuShortcutKeyMask ),
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );
((JComponent)getContentPane()).registerKeyboardAction(
e -> incrFont(),
KeyStroke.getKeyStroke( KeyEvent.VK_PLUS, menuShortcutKeyMask ),
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );
((JComponent)getContentPane()).registerKeyboardAction(
e -> decrFont(),
KeyStroke.getKeyStroke( KeyEvent.VK_MINUS, menuShortcutKeyMask ),
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );
// register ESC key to close frame // register ESC key to close frame
((JComponent)getContentPane()).registerKeyboardAction( ((JComponent)getContentPane()).registerKeyboardAction(
e -> { e -> {
@@ -201,6 +223,9 @@ public class FlatTestFrame
// enable/disable scale factor combobox // enable/disable scale factor combobox
updateScaleFactorComboBox(); updateScaleFactorComboBox();
// enable/disable font size spinner
updateFontSizeSpinner();
// show/hide size variant combobox // show/hide size variant combobox
updateSizeVariantComboBox(); updateSizeVariantComboBox();
@@ -262,7 +287,7 @@ public class FlatTestFrame
if( menuBarFactory != null ) if( menuBarFactory != null )
setJMenuBar( menuBarFactory.apply( content ) ); setJMenuBar( menuBarFactory.apply( content ) );
contentPanel.getContentPane().add( content ); contentPanel.add( content );
pack(); pack();
setLocationRelativeTo( null ); setLocationRelativeTo( null );
setVisible( true ); setVisible( true );
@@ -293,14 +318,27 @@ public class FlatTestFrame
private void applyLookAndFeel( String lafClassName, IntelliJTheme theme, boolean pack ) { private void applyLookAndFeel( String lafClassName, IntelliJTheme theme, boolean pack ) {
EventQueue.invokeLater( () -> { EventQueue.invokeLater( () -> {
try { try {
// clear custom default font before switching to other LaF
Font defaultFont = null;
if( UIManager.getLookAndFeel() instanceof FlatLaf ) {
Font font = UIManager.getFont( "defaultFont" );
if( font != UIManager.getLookAndFeelDefaults().getFont( "defaultFont" ) )
defaultFont = font;
}
UIManager.put( "defaultFont", null );
// change look and feel // change look and feel
if( theme != null ) if( theme != null )
UIManager.setLookAndFeel( IntelliJTheme.createLaf( theme ) ); UIManager.setLookAndFeel( IntelliJTheme.createLaf( theme ) );
else else
UIManager.setLookAndFeel( lafClassName ); UIManager.setLookAndFeel( lafClassName );
// restore custom default font when switched to other FlatLaf LaF
if( defaultFont != null && UIManager.getLookAndFeel() instanceof FlatLaf )
UIManager.put( "defaultFont", defaultFont );
// update all components // update all components
FlatLaf.updateUI(); updateUI2();
// increase size of frame if necessary // increase size of frame if necessary
if( pack ) if( pack )
@@ -337,18 +375,44 @@ public class FlatTestFrame
} ); } );
} }
private static void updateUI2() {
KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
Component permanentFocusOwner = keyboardFocusManager.getPermanentFocusOwner();
JSpinner spinner = (permanentFocusOwner != null)
? (JSpinner) SwingUtilities.getAncestorOfClass( JSpinner.class, permanentFocusOwner )
: null;
FlatLaf.updateUI();
if( spinner != null && keyboardFocusManager.getPermanentFocusOwner() == null ) {
JComponent editor = spinner.getEditor();
JTextField textField = (editor instanceof JSpinner.DefaultEditor)
? ((JSpinner.DefaultEditor)editor).getTextField()
: null;
if( textField != null )
textField.requestFocusInWindow();
}
}
private void explicitColorsChanged() { private void explicitColorsChanged() {
EventQueue.invokeLater( () -> { EventQueue.invokeLater( () -> {
boolean explicit = explicitColorsCheckBox.isSelected(); boolean explicit = explicitColorsCheckBox.isSelected();
ColorUIResource restoreColor = new ColorUIResource( Color.white ); ColorUIResource restoreColor = new ColorUIResource( Color.white );
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
boolean dark = (lookAndFeel instanceof FlatLaf && ((FlatLaf)lookAndFeel).isDark());
Color magenta = dark ? Color.magenta.darker() : Color.magenta;
Color orange = dark ? Color.orange.darker() : Color.orange;
Color blue = dark ? Color.blue.darker() : Color.blue;
Color green = dark ? Color.green.darker() : Color.green;
updateComponentsRecur( content, (c, type) -> { updateComponentsRecur( content, (c, type) -> {
if( type == "view" || type == "tab" ) { if( type == "view" || type == "tab" ) {
c.setForeground( explicit ? Color.magenta : restoreColor ); c.setForeground( explicit ? magenta : restoreColor );
c.setBackground( explicit ? Color.orange : restoreColor ); c.setBackground( explicit ? orange : restoreColor );
} else { } else {
c.setForeground( explicit ? Color.blue : restoreColor ); c.setForeground( explicit ? blue : restoreColor );
c.setBackground( explicit ? Color.green : restoreColor ); c.setBackground( explicit ? green : restoreColor );
} }
} ); } );
@@ -391,8 +455,12 @@ public class FlatTestFrame
} }
private void inspectChanged() { private void inspectChanged() {
if( inspector == null ) if( inspector == null ) {
inspector = new FlatInspector( contentPanel ); inspector = new FlatInspector( getRootPane() );
inspector.addPropertyChangeListener( e -> {
inspectCheckBox.setSelected( inspector.isEnabled() );
} );
}
inspector.setEnabled( inspectCheckBox.isSelected() ); inspector.setEnabled( inspectCheckBox.isSelected() );
} }
@@ -412,6 +480,9 @@ public class FlatTestFrame
DemoPrefs.getState().remove( KEY_SCALE_FACTOR ); DemoPrefs.getState().remove( KEY_SCALE_FACTOR );
} }
// always clear default font because a new font size is computed based on the scale factor
UIManager.put( "defaultFont", null );
LookAndFeel lookAndFeel = UIManager.getLookAndFeel(); LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
IntelliJTheme theme = (lookAndFeel instanceof IntelliJTheme.ThemeLaf) IntelliJTheme theme = (lookAndFeel instanceof IntelliJTheme.ThemeLaf)
? ((IntelliJTheme.ThemeLaf)lookAndFeel).getTheme() ? ((IntelliJTheme.ThemeLaf)lookAndFeel).getTheme()
@@ -423,6 +494,43 @@ public class FlatTestFrame
scaleFactorComboBox.setEnabled( UIManager.getLookAndFeel() instanceof FlatLaf ); scaleFactorComboBox.setEnabled( UIManager.getLookAndFeel() instanceof FlatLaf );
} }
private void restoreFont() {
fontSizeSpinner.setValue( 0 );
}
private void incrFont() {
fontSizeSpinner.setValue( fontSizeSpinner.getNextValue() );
}
private void decrFont() {
fontSizeSpinner.setValue( fontSizeSpinner.getPreviousValue() );
}
private void fontSizeChanged() {
if( !(UIManager.getLookAndFeel() instanceof FlatLaf) )
return;
Object value = fontSizeSpinner.getValue();
int newFontSize = (value instanceof Integer) ? (Integer) value : 0;
Font font = UIManager.getFont( "defaultFont" );
if( font == null || font.getSize() == newFontSize )
return;
Font newFont = (newFontSize >= 8) ? font.deriveFont( (float) newFontSize ) : null;
UIManager.put( "defaultFont", newFont );
if( newFont == null )
updateFontSizeSpinner();
updateUI2();
}
private void updateFontSizeSpinner() {
fontSizeSpinner.setEnabled( UIManager.getLookAndFeel() instanceof FlatLaf );
fontSizeSpinner.setValue( UIManager.getFont( "Label.font" ).getSize() );
}
private void sizeVariantChanged() { private void sizeVariantChanged() {
String sel = (String) sizeVariantComboBox.getSelectedItem(); String sel = (String) sizeVariantComboBox.getSelectedItem();
String sizeVariant = "default".equals( sel ) ? null : sel; String sizeVariant = "default".equals( sel ) ? null : sel;
@@ -482,9 +590,9 @@ public class FlatTestFrame
} }
private void recreateContent() { private void recreateContent() {
contentPanel.getContentPane().remove( content ); contentPanel.remove( content );
content = contentFactory.get(); content = contentFactory.get();
contentPanel.getContentPane().add( content ); contentPanel.add( content );
if( rightToLeftCheckBox.isSelected() ) if( rightToLeftCheckBox.isSelected() )
rightToLeftChanged(); rightToLeftChanged();
@@ -500,10 +608,11 @@ public class FlatTestFrame
private void initComponents() { private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
dialogPane = new JPanel(); dialogPane = new JPanel();
contentPanel = new JRootPane(); contentPanel = new JPanel();
buttonBar = new JPanel(); buttonBar = new JPanel();
lookAndFeelComboBox = new LookAndFeelsComboBox(); lookAndFeelComboBox = new LookAndFeelsComboBox();
scaleFactorComboBox = new JComboBox<>(); scaleFactorComboBox = new JComboBox<>();
fontSizeSpinner = new JSpinner();
rightToLeftCheckBox = new JCheckBox(); rightToLeftCheckBox = new JCheckBox();
enabledCheckBox = new JCheckBox(); enabledCheckBox = new JCheckBox();
inspectCheckBox = new JCheckBox(); inspectCheckBox = new JCheckBox();
@@ -525,8 +634,7 @@ public class FlatTestFrame
//======== contentPanel ======== //======== contentPanel ========
{ {
Container contentPanelContentPane = contentPanel.getContentPane(); contentPanel.setLayout(new MigLayout(
contentPanelContentPane.setLayout(new MigLayout(
"insets 0,hidemode 3", "insets 0,hidemode 3",
// columns // columns
"[grow,fill]", "[grow,fill]",
@@ -549,6 +657,7 @@ public class FlatTestFrame
"[fill]" + "[fill]" +
"[fill]" + "[fill]" +
"[fill]" + "[fill]" +
"[fill]" +
"[grow,fill]" + "[grow,fill]" +
"[button,fill]", "[button,fill]",
// rows // rows
@@ -577,42 +686,48 @@ public class FlatTestFrame
scaleFactorComboBox.addActionListener(e -> scaleFactorChanged()); scaleFactorComboBox.addActionListener(e -> scaleFactorChanged());
buttonBar.add(scaleFactorComboBox, "cell 1 0"); buttonBar.add(scaleFactorComboBox, "cell 1 0");
//---- fontSizeSpinner ----
fontSizeSpinner.putClientProperty("JComponent.minimumWidth", 50);
fontSizeSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1));
fontSizeSpinner.addChangeListener(e -> fontSizeChanged());
buttonBar.add(fontSizeSpinner, "cell 2 0");
//---- rightToLeftCheckBox ---- //---- rightToLeftCheckBox ----
rightToLeftCheckBox.setText("right-to-left"); rightToLeftCheckBox.setText("right-to-left");
rightToLeftCheckBox.setMnemonic('R'); rightToLeftCheckBox.setMnemonic('R');
rightToLeftCheckBox.addActionListener(e -> rightToLeftChanged()); rightToLeftCheckBox.addActionListener(e -> rightToLeftChanged());
buttonBar.add(rightToLeftCheckBox, "cell 2 0"); buttonBar.add(rightToLeftCheckBox, "cell 3 0");
//---- enabledCheckBox ---- //---- enabledCheckBox ----
enabledCheckBox.setText("enabled"); enabledCheckBox.setText("enabled");
enabledCheckBox.setMnemonic('E'); enabledCheckBox.setMnemonic('E');
enabledCheckBox.setSelected(true); enabledCheckBox.setSelected(true);
enabledCheckBox.addActionListener(e -> enabledChanged()); enabledCheckBox.addActionListener(e -> enabledChanged());
buttonBar.add(enabledCheckBox, "cell 3 0"); buttonBar.add(enabledCheckBox, "cell 4 0");
//---- inspectCheckBox ---- //---- inspectCheckBox ----
inspectCheckBox.setText("inspect"); inspectCheckBox.setText("inspect");
inspectCheckBox.setMnemonic('I'); inspectCheckBox.setMnemonic('I');
inspectCheckBox.addActionListener(e -> inspectChanged()); inspectCheckBox.addActionListener(e -> inspectChanged());
buttonBar.add(inspectCheckBox, "cell 4 0"); buttonBar.add(inspectCheckBox, "cell 5 0");
//---- explicitColorsCheckBox ---- //---- explicitColorsCheckBox ----
explicitColorsCheckBox.setText("explicit colors"); explicitColorsCheckBox.setText("explicit colors");
explicitColorsCheckBox.setMnemonic('X'); explicitColorsCheckBox.setMnemonic('X');
explicitColorsCheckBox.addActionListener(e -> explicitColorsChanged()); explicitColorsCheckBox.addActionListener(e -> explicitColorsChanged());
buttonBar.add(explicitColorsCheckBox, "cell 5 0"); buttonBar.add(explicitColorsCheckBox, "cell 6 0");
//---- backgroundCheckBox ---- //---- backgroundCheckBox ----
backgroundCheckBox.setText("background"); backgroundCheckBox.setText("background");
backgroundCheckBox.setMnemonic('B'); backgroundCheckBox.setMnemonic('B');
backgroundCheckBox.addActionListener(e -> backgroundChanged()); backgroundCheckBox.addActionListener(e -> backgroundChanged());
buttonBar.add(backgroundCheckBox, "cell 6 0"); buttonBar.add(backgroundCheckBox, "cell 7 0");
//---- opaqueTriStateCheckBox ---- //---- opaqueTriStateCheckBox ----
opaqueTriStateCheckBox.setText("opaque"); opaqueTriStateCheckBox.setText("opaque");
opaqueTriStateCheckBox.setMnemonic('O'); opaqueTriStateCheckBox.setMnemonic('O');
opaqueTriStateCheckBox.addActionListener(e -> opaqueChanged()); opaqueTriStateCheckBox.addActionListener(e -> opaqueChanged());
buttonBar.add(opaqueTriStateCheckBox, "cell 7 0"); buttonBar.add(opaqueTriStateCheckBox, "cell 8 0");
//---- sizeVariantComboBox ---- //---- sizeVariantComboBox ----
sizeVariantComboBox.setModel(new DefaultComboBoxModel<>(new String[] { sizeVariantComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
@@ -623,11 +738,11 @@ public class FlatTestFrame
})); }));
sizeVariantComboBox.setSelectedIndex(2); sizeVariantComboBox.setSelectedIndex(2);
sizeVariantComboBox.addActionListener(e -> sizeVariantChanged()); sizeVariantComboBox.addActionListener(e -> sizeVariantChanged());
buttonBar.add(sizeVariantComboBox, "cell 8 0"); buttonBar.add(sizeVariantComboBox, "cell 9 0");
//---- closeButton ---- //---- closeButton ----
closeButton.setText("Close"); closeButton.setText("Close");
buttonBar.add(closeButton, "cell 10 0"); buttonBar.add(closeButton, "cell 11 0");
} }
dialogPane.add(buttonBar, BorderLayout.SOUTH); dialogPane.add(buttonBar, BorderLayout.SOUTH);
dialogPane.add(themesPanel, BorderLayout.EAST); dialogPane.add(themesPanel, BorderLayout.EAST);
@@ -638,10 +753,11 @@ public class FlatTestFrame
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JPanel dialogPane; private JPanel dialogPane;
private JRootPane contentPanel; private JPanel contentPanel;
private JPanel buttonBar; private JPanel buttonBar;
private LookAndFeelsComboBox lookAndFeelComboBox; private LookAndFeelsComboBox lookAndFeelComboBox;
private JComboBox<String> scaleFactorComboBox; private JComboBox<String> scaleFactorComboBox;
private JSpinner fontSizeSpinner;
private JCheckBox rightToLeftCheckBox; private JCheckBox rightToLeftCheckBox;
private JCheckBox enabledCheckBox; private JCheckBox enabledCheckBox;
private JCheckBox inspectCheckBox; private JCheckBox inspectCheckBox;

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8" JFDML JFormDesigner: "7.0.2.0.298" Java: "13.0.2" encoding: "UTF-8"
new FormModel { new FormModel {
contentType: "form/swing" contentType: "form/swing"
@@ -10,7 +10,7 @@ new FormModel {
"defaultCloseOperation": 2 "defaultCloseOperation": 2
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
name: "dialogPane" name: "dialogPane"
add( new FormContainer( "javax.swing.JRootPane", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 0,hidemode 3" "$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[grow,fill]" "$columnConstraints": "[grow,fill]"
"$rowConstraints": "[grow,fill]" "$rowConstraints": "[grow,fill]"
@@ -21,7 +21,7 @@ new FormModel {
} ) } )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog" "$layoutConstraints": "insets dialog"
"$columnConstraints": "[fill][fill][fill][fill][fill][fill][fill][fill][fill][grow,fill][button,fill]" "$columnConstraints": "[fill][fill][fill][fill][fill][fill][fill][fill][fill][fill][grow,fill][button,fill]"
"$rowSpecs": "[fill]" "$rowSpecs": "[fill]"
} ) { } ) {
name: "buttonBar" name: "buttonBar"
@@ -56,13 +56,23 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0" "value": "cell 1 0"
} ) } )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "fontSizeSpinner"
"$client.JComponent.minimumWidth": 50
"model": new javax.swing.SpinnerNumberModel {
minimum: 0
}
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "fontSizeChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 0"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) { add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "rightToLeftCheckBox" name: "rightToLeftCheckBox"
"text": "right-to-left" "text": "right-to-left"
"mnemonic": 82 "mnemonic": 82
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rightToLeftChanged", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rightToLeftChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 0" "value": "cell 3 0"
} ) } )
add( new FormComponent( "javax.swing.JCheckBox" ) { add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "enabledCheckBox" name: "enabledCheckBox"
@@ -71,7 +81,7 @@ new FormModel {
"selected": true "selected": true
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "enabledChanged", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "enabledChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 0" "value": "cell 4 0"
} ) } )
add( new FormComponent( "javax.swing.JCheckBox" ) { add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "inspectCheckBox" name: "inspectCheckBox"
@@ -79,7 +89,7 @@ new FormModel {
"mnemonic": 73 "mnemonic": 73
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "inspectChanged", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "inspectChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 0" "value": "cell 5 0"
} ) } )
add( new FormComponent( "javax.swing.JCheckBox" ) { add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "explicitColorsCheckBox" name: "explicitColorsCheckBox"
@@ -87,7 +97,7 @@ new FormModel {
"mnemonic": 88 "mnemonic": 88
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "explicitColorsChanged", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "explicitColorsChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 0" "value": "cell 6 0"
} ) } )
add( new FormComponent( "javax.swing.JCheckBox" ) { add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "backgroundCheckBox" name: "backgroundCheckBox"
@@ -95,7 +105,7 @@ new FormModel {
"mnemonic": 66 "mnemonic": 66
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "backgroundChanged", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "backgroundChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 0" "value": "cell 7 0"
} ) } )
add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) { add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) {
name: "opaqueTriStateCheckBox" name: "opaqueTriStateCheckBox"
@@ -103,7 +113,7 @@ new FormModel {
"mnemonic": 79 "mnemonic": 79
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "opaqueChanged", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "opaqueChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 0" "value": "cell 8 0"
} ) } )
add( new FormComponent( "javax.swing.JComboBox" ) { add( new FormComponent( "javax.swing.JComboBox" ) {
name: "sizeVariantComboBox" name: "sizeVariantComboBox"
@@ -117,13 +127,13 @@ new FormModel {
"selectedIndex": 2 "selectedIndex": 2
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sizeVariantChanged", false ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "sizeVariantChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 0" "value": "cell 9 0"
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "closeButton" name: "closeButton"
"text": "Close" "text": "Close"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 10 0" "value": "cell 11 0"
} ) } )
}, new FormLayoutConstraints( class java.lang.String ) { }, new FormLayoutConstraints( class java.lang.String ) {
"value": "South" "value": "South"

View File

@@ -100,6 +100,8 @@ public class UIDefaultsDump
// dump( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel", dir ); // dump( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel", dir );
// else if( SystemInfo.IS_MAC ) // else if( SystemInfo.IS_MAC )
// dump( "com.apple.laf.AquaLookAndFeel", dir ); // dump( "com.apple.laf.AquaLookAndFeel", dir );
// else if( SystemInfo.IS_LINUX )
// dump( "com.sun.java.swing.plaf.gtk.GTKLookAndFeel", dir );
// //
// dump( "com.jgoodies.looks.plastic.PlasticLookAndFeel", dir ); // dump( "com.jgoodies.looks.plastic.PlasticLookAndFeel", dir );
// dump( "com.jgoodies.looks.windows.WindowsLookAndFeel", dir ); // dump( "com.jgoodies.looks.windows.WindowsLookAndFeel", dir );
@@ -146,10 +148,9 @@ public class UIDefaultsDump
LookAndFeel lookAndFeel = UIManager.getLookAndFeel(); LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
dump( dir, name, "", lookAndFeel, key -> !key.contains( "InputMap" ) ); dump( dir, name, "", lookAndFeel, key -> !key.contains( "InputMap" ) );
if( lookAndFeel.getClass() != FlatLightLaf.class )
return;
dump( dir, name, "_InputMap", lookAndFeel, key -> key.contains( "InputMap" ) ); if( lookAndFeel.getClass() == FlatLightLaf.class || !(lookAndFeel instanceof FlatLaf) )
dump( dir, name, "_InputMap", lookAndFeel, key -> key.contains( "InputMap" ) );
} }
private static void dump( File dir, String name, String nameSuffix, private static void dump( File dir, String name, String nameSuffix,
@@ -164,7 +165,11 @@ public class UIDefaultsDump
? BasicLookAndFeel.class.getSimpleName() ? BasicLookAndFeel.class.getSimpleName()
: lookAndFeel.getClass().getSimpleName(); : lookAndFeel.getClass().getSimpleName();
} }
String osSuffix = (SystemInfo.IS_MAC && lookAndFeel instanceof FlatLaf) ? "-mac" : ""; String osSuffix = (SystemInfo.IS_MAC && lookAndFeel instanceof FlatLaf)
? "-mac"
: ((SystemInfo.IS_LINUX && lookAndFeel instanceof FlatLaf)
? "-linux"
: "");
File file = new File( dir, name + nameSuffix + "_" File file = new File( dir, name + nameSuffix + "_"
+ System.getProperty( "java.version" ) + osSuffix + ".txt" ); + System.getProperty( "java.version" ) + osSuffix + ".txt" );

View File

@@ -0,0 +1,18 @@
- OS Windows 10
+ OS Linux
- Button.defaultButtonFollowsFocus true
+ Button.defaultButtonFollowsFocus false
- ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ ProgressBar.font [active] Cantarell plain 13 javax.swing.plaf.FontUIResource [UI]
- ScrollBar.thumbArc 0
+ ScrollBar.thumbArc 999
- ScrollBar.thumbInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
+ ScrollBar.thumbInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ defaultFont Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]

View File

@@ -19,6 +19,15 @@
- ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] - ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ ProgressBar.font [active] .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI] + ProgressBar.font [active] .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI]
- ScrollBar.hoverThumbWithTrack false
+ ScrollBar.hoverThumbWithTrack true
- ScrollBar.thumbArc 0
+ ScrollBar.thumbArc 999
- ScrollBar.thumbInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
+ ScrollBar.thumbInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI] - defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ defaultFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI] + defaultFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]

View File

@@ -185,9 +185,11 @@ ComboBox.buttonHoverArrowColor #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonShadow #646464 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonShadow #646464 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI] ComboBox.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI] ComboBox.disabledForeground #777777 javax.swing.plaf.ColorUIResource [UI]
ComboBox.editorColumns 0
ComboBox.font [active] $defaultFont [UI] ComboBox.font [active] $defaultFont [UI]
ComboBox.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] ComboBox.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ComboBox.isEnterSelectablePopup false ComboBox.isEnterSelectablePopup false
ComboBox.minimumWidth 72
ComboBox.noActionOnKeyNavigation false ComboBox.noActionOnKeyNavigation false
ComboBox.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI] ComboBox.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
ComboBox.selectionBackground #4b6eaf javax.swing.plaf.ColorUIResource [UI] ComboBox.selectionBackground #4b6eaf javax.swing.plaf.ColorUIResource [UI]
@@ -362,7 +364,7 @@ InternalFrame.inactiveDropShadowOpacity 0.75
InternalFrame.inactiveTitleBackground #303234 javax.swing.plaf.ColorUIResource [UI] InternalFrame.inactiveTitleBackground #303234 javax.swing.plaf.ColorUIResource [UI]
InternalFrame.inactiveTitleForeground #777777 javax.swing.plaf.ColorUIResource [UI] InternalFrame.inactiveTitleForeground #777777 javax.swing.plaf.ColorUIResource [UI]
InternalFrame.maximizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon [UI] InternalFrame.maximizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon [UI]
InternalFrame.minimizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMinimizeIcon [UI] InternalFrame.minimizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameRestoreIcon [UI]
InternalFrame.titleFont [active] $defaultFont [UI] InternalFrame.titleFont [active] $defaultFont [UI]
@@ -760,25 +762,30 @@ ScrollBar.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.buttonArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] ScrollBar.buttonArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.buttonDisabledArrowColor #585858 javax.swing.plaf.ColorUIResource [UI] ScrollBar.buttonDisabledArrowColor #585858 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] ScrollBar.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ScrollBar.hoverThumbColor #717678 javax.swing.plaf.ColorUIResource [UI] ScrollBar.hoverThumbColor #6e767a com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%)
ScrollBar.hoverTrackColor #494c4f javax.swing.plaf.ColorUIResource [UI] ScrollBar.hoverThumbWithTrack false
ScrollBar.hoverTrackColor #484c4f com.formdev.flatlaf.util.DerivedColor [UI] lighten(4%)
ScrollBar.maximumThumbSize 4096,4096 javax.swing.plaf.DimensionUIResource [UI] ScrollBar.maximumThumbSize 4096,4096 javax.swing.plaf.DimensionUIResource [UI]
ScrollBar.minimumThumbSize 8,8 javax.swing.plaf.DimensionUIResource [UI] ScrollBar.minimumThumbSize 8,8 javax.swing.plaf.DimensionUIResource [UI]
ScrollBar.showButtons false ScrollBar.showButtons false
ScrollBar.squareButtons false ScrollBar.squareButtons false
ScrollBar.thumb #585c5e javax.swing.plaf.ColorUIResource [UI] ScrollBar.thumb #565c5f com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%)
ScrollBar.thumbArc 0
ScrollBar.thumbDarkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI] ScrollBar.thumbDarkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI]
ScrollBar.thumbHighlight #242424 javax.swing.plaf.ColorUIResource [UI] ScrollBar.thumbHighlight #242424 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.thumbInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
ScrollBar.thumbShadow #646464 javax.swing.plaf.ColorUIResource [UI] ScrollBar.thumbShadow #646464 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.track #3f4244 javax.swing.plaf.ColorUIResource [UI] ScrollBar.track #3e4244 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1%)
ScrollBar.trackArc 0
ScrollBar.trackHighlight #7e7e7e javax.swing.plaf.ColorUIResource [UI] ScrollBar.trackHighlight #7e7e7e javax.swing.plaf.ColorUIResource [UI]
ScrollBar.trackInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
ScrollBar.width 10 ScrollBar.width 10
ScrollBarUI com.formdev.flatlaf.ui.FlatScrollBarUI ScrollBarUI com.formdev.flatlaf.ui.FlatScrollBarUI
#---- ScrollPane ---- #---- ScrollPane ----
ScrollPane.background #3f4244 javax.swing.plaf.ColorUIResource [UI] ScrollPane.background #3e4244 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1%)
ScrollPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI] ScrollPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI]
ScrollPane.fillUpperCorner true ScrollPane.fillUpperCorner true
ScrollPane.font [active] $defaultFont [UI] ScrollPane.font [active] $defaultFont [UI]
@@ -1215,7 +1222,7 @@ laf.scaleFactor [active] 1.0
menu #3c3f41 javax.swing.plaf.ColorUIResource [UI] menu #3c3f41 javax.swing.plaf.ColorUIResource [UI]
menuText #bbbbbb javax.swing.plaf.ColorUIResource [UI] menuText #bbbbbb javax.swing.plaf.ColorUIResource [UI]
scrollbar #3f4244 javax.swing.plaf.ColorUIResource [UI] scrollbar #3e4244 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1%)
#---- swingx/TaskPane ---- #---- swingx/TaskPane ----

View File

@@ -0,0 +1,18 @@
- OS Windows 10
+ OS Linux
- Button.defaultButtonFollowsFocus true
+ Button.defaultButtonFollowsFocus false
- ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ ProgressBar.font [active] Cantarell plain 13 javax.swing.plaf.FontUIResource [UI]
- ScrollBar.thumbArc 0
+ ScrollBar.thumbArc 999
- ScrollBar.thumbInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
+ ScrollBar.thumbInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ defaultFont Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]

View File

@@ -19,6 +19,15 @@
- ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI] - ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ ProgressBar.font [active] .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI] + ProgressBar.font [active] .SF NS Text plain 11 javax.swing.plaf.FontUIResource [UI]
- ScrollBar.hoverThumbWithTrack false
+ ScrollBar.hoverThumbWithTrack true
- ScrollBar.thumbArc 0
+ ScrollBar.thumbArc 999
- ScrollBar.thumbInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
+ ScrollBar.thumbInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI] - defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ defaultFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI] + defaultFont .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]

View File

@@ -186,9 +186,11 @@ ComboBox.buttonHoverArrowColor #999999 javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] ComboBox.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI] ComboBox.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
ComboBox.editorColumns 0
ComboBox.font [active] $defaultFont [UI] ComboBox.font [active] $defaultFont [UI]
ComboBox.foreground #000000 javax.swing.plaf.ColorUIResource [UI] ComboBox.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ComboBox.isEnterSelectablePopup false ComboBox.isEnterSelectablePopup false
ComboBox.minimumWidth 72
ComboBox.noActionOnKeyNavigation false ComboBox.noActionOnKeyNavigation false
ComboBox.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI] ComboBox.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
ComboBox.selectionBackground #2675bf javax.swing.plaf.ColorUIResource [UI] ComboBox.selectionBackground #2675bf javax.swing.plaf.ColorUIResource [UI]
@@ -364,7 +366,7 @@ InternalFrame.inactiveDropShadowOpacity 0.5
InternalFrame.inactiveTitleBackground #fafafa javax.swing.plaf.ColorUIResource [UI] InternalFrame.inactiveTitleBackground #fafafa javax.swing.plaf.ColorUIResource [UI]
InternalFrame.inactiveTitleForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI] InternalFrame.inactiveTitleForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
InternalFrame.maximizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon [UI] InternalFrame.maximizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMaximizeIcon [UI]
InternalFrame.minimizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameMinimizeIcon [UI] InternalFrame.minimizeIcon [lazy] 24,24 com.formdev.flatlaf.icons.FlatInternalFrameRestoreIcon [UI]
InternalFrame.titleFont [active] $defaultFont [UI] InternalFrame.titleFont [active] $defaultFont [UI]
@@ -762,25 +764,30 @@ ScrollBar.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] ScrollBar.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] ScrollBar.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI]
ScrollBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI] ScrollBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.hoverThumbColor #c3c3c3 javax.swing.plaf.ColorUIResource [UI] ScrollBar.hoverThumbColor #c3c3c3 com.formdev.flatlaf.util.DerivedColor [UI] darken(10%)
ScrollBar.hoverTrackColor #ededed javax.swing.plaf.ColorUIResource [UI] ScrollBar.hoverThumbWithTrack false
ScrollBar.hoverTrackColor #ededed com.formdev.flatlaf.util.DerivedColor [UI] darken(3%)
ScrollBar.maximumThumbSize 4096,4096 javax.swing.plaf.DimensionUIResource [UI] ScrollBar.maximumThumbSize 4096,4096 javax.swing.plaf.DimensionUIResource [UI]
ScrollBar.minimumThumbSize 8,8 javax.swing.plaf.DimensionUIResource [UI] ScrollBar.minimumThumbSize 8,8 javax.swing.plaf.DimensionUIResource [UI]
ScrollBar.showButtons false ScrollBar.showButtons false
ScrollBar.squareButtons false ScrollBar.squareButtons false
ScrollBar.thumb #dcdcdc javax.swing.plaf.ColorUIResource [UI] ScrollBar.thumb #dcdcdc com.formdev.flatlaf.util.DerivedColor [UI] darken(10%)
ScrollBar.thumbArc 0
ScrollBar.thumbDarkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI] ScrollBar.thumbDarkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI]
ScrollBar.thumbHighlight #ffffff javax.swing.plaf.ColorUIResource [UI] ScrollBar.thumbHighlight #ffffff javax.swing.plaf.ColorUIResource [UI]
ScrollBar.thumbInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
ScrollBar.thumbShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI] ScrollBar.thumbShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.track #f5f5f5 javax.swing.plaf.ColorUIResource [UI] ScrollBar.track #f5f5f5 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1%)
ScrollBar.trackArc 0
ScrollBar.trackHighlight #9e9e9e javax.swing.plaf.ColorUIResource [UI] ScrollBar.trackHighlight #9e9e9e javax.swing.plaf.ColorUIResource [UI]
ScrollBar.trackInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
ScrollBar.width 10 ScrollBar.width 10
ScrollBarUI com.formdev.flatlaf.ui.FlatScrollBarUI ScrollBarUI com.formdev.flatlaf.ui.FlatScrollBarUI
#---- ScrollPane ---- #---- ScrollPane ----
ScrollPane.background #f5f5f5 javax.swing.plaf.ColorUIResource [UI] ScrollPane.background #f5f5f5 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1%)
ScrollPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI] ScrollPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatBorder [UI]
ScrollPane.fillUpperCorner true ScrollPane.fillUpperCorner true
ScrollPane.font [active] $defaultFont [UI] ScrollPane.font [active] $defaultFont [UI]
@@ -1217,7 +1224,7 @@ laf.scaleFactor [active] 1.0
menu #f2f2f2 javax.swing.plaf.ColorUIResource [UI] menu #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
menuText #000000 javax.swing.plaf.ColorUIResource [UI] menuText #000000 javax.swing.plaf.ColorUIResource [UI]
scrollbar #f5f5f5 javax.swing.plaf.ColorUIResource [UI] scrollbar #f5f5f5 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1%)
#---- swingx/TaskPane ---- #---- swingx/TaskPane ----

View File

@@ -0,0 +1,860 @@
Class com.sun.java.swing.plaf.gtk.GTKLookAndFeel
ID GTK
Name GTK look and feel
Java 1.8.0_202
OS Linux
#---- ----
AATextInfoPropertyKey [unknown type] sun.swing.SwingUtilities2$AATextInfo
#---- ArrowButton ----
ArrowButton.size 13
ArrowButtonUI javax.swing.plaf.synth.SynthLookAndFeel
#---- AuditoryCues ----
AuditoryCues.allAuditoryCues length=13 [Ljava.lang.Object;
[0] CheckBoxMenuItem.commandSound
[1] InternalFrame.closeSound
[2] InternalFrame.maximizeSound
[3] InternalFrame.minimizeSound
[4] InternalFrame.restoreDownSound
[5] InternalFrame.restoreUpSound
[6] MenuItem.commandSound
[7] OptionPane.errorSound
[8] OptionPane.informationSound
[9] OptionPane.questionSound
[10] OptionPane.warningSound
[11] PopupMenu.popupSound
[12] RadioButtonMenuItem.commandSound
AuditoryCues.cueList length=13 [Ljava.lang.Object;
[0] CheckBoxMenuItem.commandSound
[1] InternalFrame.closeSound
[2] InternalFrame.maximizeSound
[3] InternalFrame.minimizeSound
[4] InternalFrame.restoreDownSound
[5] InternalFrame.restoreUpSound
[6] MenuItem.commandSound
[7] OptionPane.errorSound
[8] OptionPane.informationSound
[9] OptionPane.questionSound
[10] OptionPane.warningSound
[11] PopupMenu.popupSound
[12] RadioButtonMenuItem.commandSound
AuditoryCues.noAuditoryCues length=1 [Ljava.lang.Object;
[0] mute
#---- Button ----
Button.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Button.border [lazy] javax.swing.plaf.BorderUIResource$CompoundBorderUIResource [UI]
2,3,3,3 false javax.swing.plaf.basic.BasicBorders$ButtonBorder [UI]
0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
Button.darkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
Button.defaultButtonFollowsFocus false
Button.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
Button.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Button.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Button.light #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Button.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
Button.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
Button.textIconGap 4
Button.textShiftOffset 0
ButtonUI javax.swing.plaf.synth.SynthLookAndFeel
#---- CheckBox ----
CheckBox.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
CheckBox.border [lazy] javax.swing.plaf.BorderUIResource$CompoundBorderUIResource [UI]
2,2,2,2 false javax.swing.plaf.basic.BasicBorders$RadioButtonBorder [UI]
0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
CheckBox.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
CheckBox.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon [lazy] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$DelegatingIcon [UI]
CheckBox.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
CheckBox.textIconGap 4
CheckBox.textShiftOffset 0
#---- CheckBoxMenuItem ----
CheckBoxMenuItem.acceleratorFont [lazy] Dialog plain 12 javax.swing.plaf.FontUIResource [UI]
CheckBoxMenuItem.acceleratorForeground #2e3436 javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.alignAcceleratorText false
CheckBoxMenuItem.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.border [lazy] 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
CheckBoxMenuItem.borderPainted false
CheckBoxMenuItem.checkIcon [lazy] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$DelegatingIcon [UI]
CheckBoxMenuItem.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
CheckBoxMenuItem.foreground #2e3436 javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
CheckBoxMenuItem.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItem.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
CheckBoxMenuItemUI javax.swing.plaf.synth.SynthLookAndFeel
#---- CheckBox ----
CheckBoxUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ColorChooser ----
ColorChooser.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
ColorChooser.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.panels [active] length=1 [Ljavax.swing.colorchooser.AbstractColorChooserPanel;
[0] [unknown type] com.sun.java.swing.plaf.gtk.GTKColorChooserPanel
ColorChooser.showPreviewPanelText false
ColorChooser.swatchesDefaultRecentColor #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ColorChooser.swatchesRecentSwatchSize 10,10 java.awt.Dimension
ColorChooser.swatchesSwatchSize 10,10 java.awt.Dimension
ColorChooserUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ComboBox ----
ComboBox.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonBackground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonDarkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonHighlight #ffffff javax.swing.plaf.ColorUIResource [UI]
ComboBox.buttonShadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledBackground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ComboBox.disabledForeground #8b8e8f javax.swing.plaf.ColorUIResource [UI]
ComboBox.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
ComboBox.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ComboBox.isEnterSelectablePopup true
ComboBox.noActionOnKeyNavigation false
ComboBox.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
ComboBox.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
ComboBox.timeFactor 1000
ComboBoxUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Desktop ----
Desktop.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Desktop.minOnScreenInsets 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
#---- DesktopIcon ----
DesktopIcon.border [lazy] javax.swing.plaf.BorderUIResource$CompoundBorderUIResource [UI]
2,2,2,2 true javax.swing.border.BevelBorder
line: #e8e8e7 javax.swing.plaf.ColorUIResource [UI] 1 false 1,1,1,1 true javax.swing.border.LineBorder
DesktopIconUI javax.swing.plaf.synth.SynthLookAndFeel
#---- DesktopPane ----
DesktopPaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- EditorPane ----
EditorPane.background #ffffff javax.swing.plaf.ColorUIResource [UI]
EditorPane.border [lazy] 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
EditorPane.caretAspectRatio 0.025
EditorPane.caretBlinkRate 1200
EditorPane.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
EditorPane.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
EditorPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
EditorPane.inactiveForeground #8b8e8f javax.swing.plaf.ColorUIResource [UI]
EditorPane.margin 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
EditorPane.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
EditorPane.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
EditorPaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- FileChooser ----
FileChooser.detailsViewIcon [lazy] null
FileChooser.homeFolderIcon [lazy] null
FileChooser.listViewIcon [lazy] null
FileChooser.newFolderIcon [lazy] null
FileChooser.readOnly false
FileChooser.upFolderIcon [lazy] null
FileChooser.useSystemExtensionHiding false
FileChooser.usesSingleFilePane false
FileChooserUI com.sun.java.swing.plaf.gtk.GTKLookAndFeel
#---- FileView ----
FileView.computerIcon [lazy] null
FileView.directoryIcon [lazy] 16,18 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
FileView.fileIcon [lazy] 16,20 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
FileView.floppyDriveIcon [lazy] null
FileView.hardDriveIcon [lazy] null
#---- FormattedTextField ----
FormattedTextField.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.border [lazy] 2,2,2,2 false javax.swing.plaf.basic.BasicBorders$FieldBorder [UI]
FormattedTextField.caretAspectRatio 0.025
FormattedTextField.caretBlinkRate 1200
FormattedTextField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
FormattedTextField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveBackground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.inactiveForeground #8b8e8f javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
FormattedTextField.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
FormattedTextField.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
FormattedTextFieldUI javax.swing.plaf.synth.SynthLookAndFeel
#---- InternalFrame ----
InternalFrame.border [lazy] javax.swing.plaf.BorderUIResource$CompoundBorderUIResource [UI]
2,2,2,2 true javax.swing.border.BevelBorder
line: #e8e8e7 javax.swing.plaf.ColorUIResource [UI] 1 false 1,1,1,1 true javax.swing.border.LineBorder
InternalFrame.borderColor #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
InternalFrame.borderDarkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
InternalFrame.borderHighlight #ffffff javax.swing.plaf.ColorUIResource [UI]
InternalFrame.borderLight #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
InternalFrame.borderShadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
InternalFrame.closeIcon [lazy] 14,16 javax.swing.plaf.basic.BasicIconFactory$EmptyFrameIcon
InternalFrame.icon [lazy] 16,16 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
InternalFrame.iconifyIcon [lazy] 14,16 javax.swing.plaf.basic.BasicIconFactory$EmptyFrameIcon
InternalFrame.layoutTitlePaneAtOrigin true
InternalFrame.maximizeIcon [lazy] 14,16 javax.swing.plaf.basic.BasicIconFactory$EmptyFrameIcon
InternalFrame.minimizeIcon [lazy] 14,16 javax.swing.plaf.basic.BasicIconFactory$EmptyFrameIcon
InternalFrame.titleFont [lazy] Dialog bold 12 javax.swing.plaf.FontUIResource [UI]
InternalFrame.useTaskBar true
InternalFrame.windowBindings length=6 [Ljava.lang.Object;
[0] shift ESCAPE
[1] showSystemMenu
[2] ctrl SPACE
[3] showSystemMenu
[4] ESCAPE
[5] hideSystemMenu
#---- InternalFrameTitlePane ----
InternalFrameTitlePane.titlePaneLayout [lazy] [unknown type] com.sun.java.swing.plaf.gtk.Metacity$TitlePaneLayout
InternalFrameTitlePaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- InternalFrame ----
InternalFrameUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Label ----
Label.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Label.disabledForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
Label.disabledShadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
Label.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
Label.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
LabelUI javax.swing.plaf.synth.SynthLookAndFeel
#---- List ----
List.background #ffffff javax.swing.plaf.ColorUIResource [UI]
List.cellRenderer [active] javax.swing.DefaultListCellRenderer$UIResource [UI]
List.dropLineColor #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
List.focusCellHighlightBorder [lazy] 0,0,0,0 true com.sun.java.swing.plaf.gtk.GTKPainter$ListTableFocusBorder [UI]
List.focusSelectedCellHighlightBorder [lazy] 0,0,0,0 true com.sun.java.swing.plaf.gtk.GTKPainter$ListTableFocusBorder [UI]
List.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
List.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
List.noFocusBorder [lazy] 0,0,0,0 true com.sun.java.swing.plaf.gtk.GTKPainter$ListTableFocusBorder [UI]
List.rendererUseUIBorder false
List.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
List.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
List.timeFactor 1000
ListUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Menu ----
Menu.acceleratorFont [lazy] Dialog plain 12 javax.swing.plaf.FontUIResource [UI]
Menu.acceleratorForeground #2e3436 javax.swing.plaf.ColorUIResource [UI]
Menu.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
Menu.alignAcceleratorText false
Menu.arrowIcon [lazy] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$MenuArrowIcon [UI]
Menu.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Menu.border [lazy] 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
Menu.borderPainted false
Menu.cancelMode hideMenuTree
Menu.crossMenuMnemonic true
Menu.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
Menu.foreground #2e3436 javax.swing.plaf.ColorUIResource [UI]
Menu.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
Menu.menuPopupOffsetX 0
Menu.menuPopupOffsetY 0
Menu.preserveTopLevelSelection false
Menu.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
Menu.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
Menu.shortcutKeys length=1 [I
[0] 8
Menu.submenuPopupOffsetX 0
Menu.submenuPopupOffsetY 0
Menu.useMenuBarForTopLevelMenus true
#---- MenuBar ----
MenuBar.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
MenuBar.border [lazy] 0,0,2,0 false javax.swing.plaf.basic.BasicBorders$MenuBarBorder [UI]
MenuBar.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
MenuBar.foreground #2e3436 javax.swing.plaf.ColorUIResource [UI]
MenuBar.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuBar.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
MenuBar.windowBindings length=2 [Ljava.lang.Object;
[0] F10
[1] takeFocus
MenuBarUI javax.swing.plaf.synth.SynthLookAndFeel
#---- MenuItem ----
MenuItem.acceleratorDelimiter +
MenuItem.acceleratorFont [lazy] Dialog plain 12 javax.swing.plaf.FontUIResource [UI]
MenuItem.acceleratorForeground #2e3436 javax.swing.plaf.ColorUIResource [UI]
MenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuItem.alignAcceleratorText false
MenuItem.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
MenuItem.border [lazy] 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
MenuItem.borderPainted false
MenuItem.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
MenuItem.foreground #2e3436 javax.swing.plaf.ColorUIResource [UI]
MenuItem.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
MenuItem.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
MenuItem.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
MenuItemUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Menu ----
MenuUI javax.swing.plaf.synth.SynthLookAndFeel
#---- OptionPane ----
OptionPane.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
OptionPane.border [lazy] 10,10,12,10 false javax.swing.plaf.BorderUIResource$EmptyBorderUIResource [UI]
OptionPane.buttonAreaBorder [lazy] 6,0,0,0 false javax.swing.plaf.BorderUIResource$EmptyBorderUIResource [UI]
OptionPane.buttonClickThreshhold 500
OptionPane.buttonOrientation 4
OptionPane.buttonPadding 10
OptionPane.errorIcon [lazy] null
OptionPane.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
OptionPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
OptionPane.informationIcon [lazy] null
OptionPane.isYesLast true
OptionPane.messageAreaBorder [lazy] 0,0,0,0 false javax.swing.plaf.BorderUIResource$EmptyBorderUIResource [UI]
OptionPane.messageForeground #000000 javax.swing.plaf.ColorUIResource [UI]
OptionPane.minimumSize 262,90 javax.swing.plaf.DimensionUIResource [UI]
OptionPane.questionIcon [lazy] null
OptionPane.sameSizeButtons true
OptionPane.setButtonMargin false
OptionPane.warningIcon [lazy] null
OptionPane.windowBindings length=2 [Ljava.lang.Object;
[0] ESCAPE
[1] close
OptionPaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Panel ----
Panel.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Panel.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
Panel.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
PanelUI javax.swing.plaf.synth.SynthLookAndFeel
#---- PasswordField ----
PasswordField.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
PasswordField.border [lazy] 2,2,2,2 false javax.swing.plaf.basic.BasicBorders$FieldBorder [UI]
PasswordField.caretAspectRatio 0.025
PasswordField.caretBlinkRate 1200
PasswordField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
PasswordField.echoChar '*'
PasswordField.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
PasswordField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveBackground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
PasswordField.inactiveForeground #8b8e8f javax.swing.plaf.ColorUIResource [UI]
PasswordField.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
PasswordField.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
PasswordField.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
PasswordFieldUI javax.swing.plaf.synth.SynthLookAndFeel
#---- PopupMenu ----
PopupMenu.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
PopupMenu.border [lazy] javax.swing.plaf.BorderUIResource$CompoundBorderUIResource [UI]
2,2,2,2 true javax.swing.border.BevelBorder
line: #e8e8e7 javax.swing.plaf.ColorUIResource [UI] 1 false 1,1,1,1 true javax.swing.border.LineBorder
PopupMenu.consumeEventOnClose true
PopupMenu.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
PopupMenu.foreground #2e3436 javax.swing.plaf.ColorUIResource [UI]
#---- PopupMenuSeparator ----
PopupMenuSeparatorUI javax.swing.plaf.synth.SynthLookAndFeel
#---- PopupMenu ----
PopupMenuUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ProgressBar ----
ProgressBar.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ProgressBar.border [lazy] line: #00ff00 java.awt.Color 2 false 2,2,2,2 true javax.swing.plaf.BorderUIResource$LineBorderUIResource [UI]
ProgressBar.cellLength 1
ProgressBar.cellSpacing 0
ProgressBar.cycleTime 3000
ProgressBar.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
ProgressBar.foreground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
ProgressBar.horizontalSize 148,18 javax.swing.plaf.DimensionUIResource [UI]
ProgressBar.repaintInterval 50
ProgressBar.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
ProgressBar.selectionForeground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ProgressBar.verticalSize 20,78 javax.swing.plaf.DimensionUIResource [UI]
ProgressBarUI javax.swing.plaf.synth.SynthLookAndFeel
#---- RadioButton ----
RadioButton.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
RadioButton.border [lazy] javax.swing.plaf.BorderUIResource$CompoundBorderUIResource [UI]
2,2,2,2 false javax.swing.plaf.basic.BasicBorders$RadioButtonBorder [UI]
0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
RadioButton.darkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
RadioButton.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
RadioButton.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
RadioButton.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
RadioButton.icon [lazy] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$DelegatingIcon [UI]
RadioButton.light #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
RadioButton.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
RadioButton.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
RadioButton.textIconGap 4
RadioButton.textShiftOffset 0
#---- RadioButtonMenuItem ----
RadioButtonMenuItem.acceleratorFont [lazy] Dialog plain 12 javax.swing.plaf.FontUIResource [UI]
RadioButtonMenuItem.acceleratorForeground #2e3436 javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.acceleratorSelectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.alignAcceleratorText false
RadioButtonMenuItem.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.border [lazy] 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
RadioButtonMenuItem.borderPainted false
RadioButtonMenuItem.checkIcon [lazy] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$DelegatingIcon [UI]
RadioButtonMenuItem.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
RadioButtonMenuItem.foreground #2e3436 javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
RadioButtonMenuItem.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItem.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
RadioButtonMenuItemUI javax.swing.plaf.synth.SynthLookAndFeel
#---- RadioButton ----
RadioButtonUI javax.swing.plaf.synth.SynthLookAndFeel
#---- RootPane ----
RootPane.defaultButtonWindowKeyBindings length=8 [Ljava.lang.Object;
[0] ENTER
[1] press
[2] released ENTER
[3] release
[4] ctrl ENTER
[5] press
[6] ctrl released ENTER
[7] release
RootPaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ScrollBar ----
ScrollBar.allowsAbsolutePositioning true
ScrollBar.alwaysShowThumb true
ScrollBar.background #e0e0e0 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.foreground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.maximumThumbSize 4096,4096 java.awt.Dimension
ScrollBar.minimumThumbSize 8,8 java.awt.Dimension
ScrollBar.squareButtons false
ScrollBar.thumb #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.thumbDarkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.thumbHeight 14
ScrollBar.thumbHighlight #ffffff javax.swing.plaf.ColorUIResource [UI]
ScrollBar.thumbShadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.track #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.trackHighlight #000000 javax.swing.plaf.ColorUIResource [UI]
ScrollBar.width 16
ScrollBarUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ScrollPane ----
ScrollPane.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ScrollPane.border [lazy] 2,2,2,2 false javax.swing.plaf.basic.BasicBorders$FieldBorder [UI]
ScrollPane.fillLowerCorner true
ScrollPane.fillUpperCorner true
ScrollPane.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
ScrollPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ScrollPaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Separator ----
Separator.background #ffffff javax.swing.plaf.ColorUIResource [UI]
Separator.foreground #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
Separator.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Separator.insets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
Separator.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
Separator.thickness 2
SeparatorUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Slider ----
Slider.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Slider.focus #000000 javax.swing.plaf.ColorUIResource [UI]
Slider.focusInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
Slider.font [lazy] Dialog plain 12 javax.swing.plaf.FontUIResource [UI]
Slider.foreground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Slider.horizontalSize 200,21 java.awt.Dimension
Slider.minimumHorizontalSize 36,21 java.awt.Dimension
Slider.minimumVerticalSize 21,36 java.awt.Dimension
Slider.onlyLeftMouseButtonDrag false
Slider.paintValue true
Slider.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
Slider.thumbHeight 14
Slider.thumbWidth 30
Slider.tickColor #000000 java.awt.Color
Slider.verticalSize 21,200 java.awt.Dimension
SliderUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Spinner ----
Spinner.arrowButtonSize 16,5 java.awt.Dimension
Spinner.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Spinner.border [lazy] 2,2,2,2 false javax.swing.plaf.basic.BasicBorders$FieldBorder [UI]
Spinner.disableOnBoundaryValues true
Spinner.editorAlignment 10
Spinner.editorBorderPainted false
Spinner.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
Spinner.foreground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
SpinnerUI javax.swing.plaf.synth.SynthLookAndFeel
#---- SplitPane ----
SplitPane.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
SplitPane.border [lazy] 1,1,1,1 true javax.swing.plaf.basic.BasicBorders$SplitPaneBorder [UI]
SplitPane.darkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
SplitPane.dividerSize 7
SplitPane.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
SplitPane.oneTouchButtonSize 5
SplitPane.oneTouchOffset 2
SplitPane.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
SplitPane.size 7
SplitPane.supportsOneTouchButtons false
#---- SplitPaneDivider ----
SplitPaneDivider.border [lazy] 1,1,1,1 true javax.swing.plaf.basic.BasicBorders$SplitPaneDividerBorder [UI]
SplitPaneDivider.draggingColor #404040 javax.swing.plaf.ColorUIResource [UI]
#---- SplitPane ----
SplitPaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Synth ----
Synth.doNotSetTextAA true
#---- TabbedPane ----
TabbedPane.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.contentBorderInsets 2,2,3,3 javax.swing.plaf.InsetsUIResource [UI]
TabbedPane.contentOpaque true
TabbedPane.darkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.focus #000000 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
TabbedPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
TabbedPane.isTabRollover false
TabbedPane.labelShift 3
TabbedPane.light #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.selectedLabelShift 3
TabbedPane.selectedTabPadInsets 2,2,0,1 javax.swing.plaf.InsetsUIResource [UI]
TabbedPane.selectionFollowsFocus true
TabbedPane.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
TabbedPane.tabAreaInsets 3,2,0,2 javax.swing.plaf.InsetsUIResource [UI]
TabbedPane.tabInsets 0,4,1,4 javax.swing.plaf.InsetsUIResource [UI]
TabbedPane.tabRunOverlay 2
TabbedPane.tabsOpaque true
TabbedPane.tabsOverlapBorder false
TabbedPane.textIconGap 4
TabbedPaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Table ----
Table.ascendingSortIcon [lazy] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$DelegatingIcon [UI]
Table.background #ffffff javax.swing.plaf.ColorUIResource [UI]
Table.descendingSortIcon [lazy] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$DelegatingIcon [UI]
Table.dropLineColor #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
Table.dropLineShortColor #000000 javax.swing.plaf.ColorUIResource [UI]
Table.focusCellBackground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Table.focusCellForeground #2e3436 javax.swing.plaf.ColorUIResource [UI]
Table.focusCellHighlightBorder [lazy] 0,0,0,0 true com.sun.java.swing.plaf.gtk.GTKPainter$ListTableFocusBorder [UI]
Table.focusSelectedCellHighlightBorder [lazy] 0,0,0,0 true com.sun.java.swing.plaf.gtk.GTKPainter$ListTableFocusBorder [UI]
Table.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
Table.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Table.gridColor #808080 javax.swing.plaf.ColorUIResource [UI]
Table.scrollPaneBorder [lazy] 0,0,0,0 false javax.swing.plaf.BorderUIResource$EmptyBorderUIResource [UI]
Table.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
Table.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
Table.sortIconColor #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
#---- TableHeader ----
TableHeader.alignSorterArrow true
TableHeader.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
TableHeader.cellBorder [lazy] 2,2,2,2 true javax.swing.plaf.BorderUIResource$BevelBorderUIResource [UI]
TableHeader.focusCellBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
TableHeader.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
TableHeader.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TableHeaderUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Table ----
TableUI javax.swing.plaf.synth.SynthLookAndFeel
#---- TextArea ----
TextArea.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
TextArea.border [lazy] 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
TextArea.caretAspectRatio 0.025
TextArea.caretBlinkRate 1200
TextArea.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextArea.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
TextArea.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextArea.inactiveForeground #8b8e8f javax.swing.plaf.ColorUIResource [UI]
TextArea.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TextArea.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
TextArea.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
TextAreaUI javax.swing.plaf.synth.SynthLookAndFeel
#---- TextField ----
TextField.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
TextField.border [lazy] 2,2,2,2 false javax.swing.plaf.basic.BasicBorders$FieldBorder [UI]
TextField.caretAspectRatio 0.025
TextField.caretBlinkRate 1200
TextField.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextField.darkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
TextField.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
TextField.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextField.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
TextField.inactiveBackground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
TextField.inactiveForeground #8b8e8f javax.swing.plaf.ColorUIResource [UI]
TextField.light #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
TextField.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TextField.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
TextField.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
TextField.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
TextFieldUI javax.swing.plaf.synth.SynthLookAndFeel
#---- TextPane ----
TextPane.background #ffffff javax.swing.plaf.ColorUIResource [UI]
TextPane.border [lazy] 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
TextPane.caretAspectRatio 0.025
TextPane.caretBlinkRate 1200
TextPane.caretForeground #000000 javax.swing.plaf.ColorUIResource [UI]
TextPane.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
TextPane.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
TextPane.inactiveForeground #8b8e8f javax.swing.plaf.ColorUIResource [UI]
TextPane.margin 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
TextPane.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
TextPane.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
TextPaneUI javax.swing.plaf.synth.SynthLookAndFeel
#---- TitledBorder ----
TitledBorder.border [lazy] 1,1,1,1 true com.sun.java.swing.plaf.gtk.GTKPainter$TitledBorder [UI]
TitledBorder.font Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
TitledBorder.titleColor #000000 javax.swing.plaf.ColorUIResource [UI]
#---- ToggleButton ----
ToggleButton.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.border [lazy] javax.swing.plaf.BorderUIResource$CompoundBorderUIResource [UI]
2,2,2,2 false javax.swing.plaf.basic.BasicBorders$ToggleButtonBorder [UI]
0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
ToggleButton.darkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
ToggleButton.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
ToggleButton.light #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.margin 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
ToggleButton.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
ToggleButton.textIconGap 4
ToggleButton.textShiftOffset 0
ToggleButtonUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ToolBar ----
ToolBar.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ToolBar.border [lazy] 2,2,2,2 true javax.swing.plaf.BorderUIResource$EtchedBorderUIResource [UI]
ToolBar.darkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
ToolBar.dockingBackground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ToolBar.dockingForeground #ff0000 javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingBackground #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ToolBar.floatingForeground #404040 javax.swing.plaf.ColorUIResource [UI]
ToolBar.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
ToolBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ToolBar.handleIcon [active] 10,10 com.sun.java.swing.plaf.gtk.GTKIconFactory$ToolBarHandleIcon [UI]
ToolBar.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
ToolBar.light #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ToolBar.separatorSize 10,10 javax.swing.plaf.DimensionUIResource [UI]
ToolBar.shadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
#---- ToolBarSeparator ----
ToolBarSeparatorUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ToolBar ----
ToolBarUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ToolTip ----
ToolTip.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
ToolTip.border [lazy] line: #000000 java.awt.Color 1 false 1,1,1,1 true javax.swing.plaf.BorderUIResource$LineBorderUIResource [UI]
ToolTip.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
ToolTip.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
#---- ToolTipManager ----
ToolTipManager.enableToolTipMode allWindows
#---- ToolTip ----
ToolTipUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Tree ----
Tree.background #ffffff javax.swing.plaf.ColorUIResource [UI]
Tree.changeSelectionWithFocus true
Tree.collapsedIcon [lazy] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$SynthExpanderIcon [UI]
Tree.drawHorizontalLines false
Tree.drawVerticalLines false
Tree.drawsFocusBorder true
Tree.drawsFocusBorderAroundIcon false
Tree.dropLineColor #a4a4a1 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] 13,13 com.sun.java.swing.plaf.gtk.GTKIconFactory$SynthExpanderIcon [UI]
Tree.expanderSize 10
Tree.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
Tree.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
Tree.hash #808080 javax.swing.plaf.ColorUIResource [UI]
Tree.leftChildIndent 2
Tree.lineTypeDashed false
Tree.padding 4
Tree.paintLines true
Tree.repaintWholeRow true
Tree.rightChildIndent 12
Tree.rowHeight -1
Tree.scrollsHorizontallyAndVertically false
Tree.scrollsOnExpand false
Tree.selectionBackground #4a90d9 javax.swing.plaf.ColorUIResource [UI]
Tree.selectionBorderColor #000000 javax.swing.plaf.ColorUIResource [UI]
Tree.selectionForeground #ffffff javax.swing.plaf.ColorUIResource [UI]
Tree.textBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
Tree.textForeground #000000 javax.swing.plaf.ColorUIResource [UI]
Tree.timeFactor 1000
TreeUI javax.swing.plaf.synth.SynthLookAndFeel
#---- Viewport ----
Viewport.background #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
Viewport.font [lazy] Cantarell plain 15 javax.swing.plaf.FontUIResource [UI]
Viewport.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
ViewportUI javax.swing.plaf.synth.SynthLookAndFeel
#---- ----
black #000000 javax.swing.plaf.ColorUIResource [UI]
caretColor #000000 javax.swing.plaf.ColorUIResource [UI]
control #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
controlDkShadow #000000 javax.swing.plaf.ColorUIResource [UI]
controlHighlight #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
controlLtHighlight #ffffff javax.swing.plaf.ColorUIResource [UI]
controlShadow #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
controlText #000000 javax.swing.plaf.ColorUIResource [UI]
dark #a4a4a1 javax.swing.plaf.ColorUIResource [UI]
desktop #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
#---- html ----
html.missingImage [lazy] 38,38 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
html.pendingImage [lazy] 38,38 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
#---- ----
info #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
infoText #000000 javax.swing.plaf.ColorUIResource [UI]
light #ffffff javax.swing.plaf.ColorUIResource [UI]
menu #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
menuText #2e3436 javax.swing.plaf.ColorUIResource [UI]
mid #d2d2d0 javax.swing.plaf.ColorUIResource [UI]
scrollbar #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
text #ffffff javax.swing.plaf.ColorUIResource [UI]
textHighlight #4a90d9 javax.swing.plaf.ColorUIResource [UI]
textHighlightText #ffffff javax.swing.plaf.ColorUIResource [UI]
textInactiveText #8b8e8f javax.swing.plaf.ColorUIResource [UI]
textText #000000 javax.swing.plaf.ColorUIResource [UI]
white #ffffff javax.swing.plaf.ColorUIResource [UI]
window #e8e8e7 javax.swing.plaf.ColorUIResource [UI]
windowText #000000 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -0,0 +1,874 @@
Class com.sun.java.swing.plaf.gtk.GTKLookAndFeel
ID GTK
Name GTK look and feel
Java 1.8.0_202
OS Linux
#---- Button ----
Button.focusInputMap [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
ENTER pressed
SPACE pressed
released ENTER released
released SPACE released
#---- CheckBox ----
CheckBox.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- ComboBox ----
ComboBox.ancestorInputMap [lazy] 15 javax.swing.plaf.InputMapUIResource [UI]
alt DOWN togglePopup
alt KP_DOWN togglePopup
alt KP_UP togglePopup
alt UP togglePopup
DOWN selectNext
END endPassThrough
ENTER enterPressed
ESCAPE hidePopup
HOME homePassThrough
KP_DOWN selectNext
KP_UP selectPrevious
PAGE_DOWN pageDownPassThrough
PAGE_UP pageUpPassThrough
SPACE spacePopup
UP selectPrevious
#---- Desktop ----
Desktop.ancestorInputMap [lazy] 29 javax.swing.plaf.InputMapUIResource [UI]
ctrl alt F6 selectNextFrame
ctrl F10 maximize
ctrl F12 navigateNext
ctrl F4 close
ctrl F5 restore
ctrl F6 selectNextFrame
ctrl F7 move
ctrl F8 resize
ctrl F9 minimize
ctrl TAB selectNextFrame
DOWN down
ESCAPE escape
KP_DOWN down
KP_LEFT left
KP_RIGHT right
KP_UP up
LEFT left
RIGHT right
UP up
shift ctrl alt F6 selectPreviousFrame
shift ctrl F12 navigatePrevious
shift DOWN shrinkDown
shift KP_DOWN shrinkDown
shift KP_LEFT shrinkLeft
shift KP_RIGHT shrinkRight
shift KP_UP shrinkUp
shift LEFT shrinkLeft
shift RIGHT shrinkRight
shift UP shrinkUp
#---- EditorPane ----
EditorPane.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- FileChooser ----
FileChooser.ancestorInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
ctrl ENTER approveSelection
ESCAPE cancelSelection
#---- FormattedTextField ----
FormattedTextField.focusInputMap [lazy] 44 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN decrement
END caret-end-line
ENTER notify-field-accept
ESCAPE reset-field-edit
HOME caret-begin-line
KP_DOWN decrement
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP increment
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
UP increment
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-next-word
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- 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
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] 64 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextRowChangeLead
ctrl END selectLastRowChangeLead
ctrl HOME selectFirstRowChangeLead
ctrl INSERT copy
ctrl KP_DOWN selectNextRowChangeLead
ctrl KP_LEFT selectPreviousColumnChangeLead
ctrl KP_RIGHT selectNextColumnChangeLead
ctrl KP_UP selectPreviousRowChangeLead
ctrl LEFT selectPreviousColumnChangeLead
ctrl PAGE_DOWN scrollDownChangeLead
ctrl PAGE_UP scrollUpChangeLead
ctrl RIGHT selectNextColumnChangeLead
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousRowChangeLead
ctrl V paste
ctrl X cut
COPY copy
CUT cut
DOWN selectNextRow
END selectLastRow
HOME selectFirstRow
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
KP_UP selectPreviousRow
LEFT selectPreviousColumn
PAGE_DOWN scrollDown
PAGE_UP scrollUp
PASTE paste
RIGHT selectNextColumn
SPACE addToSelection
UP selectPreviousRow
shift ctrl DOWN selectNextRowExtendSelection
shift ctrl END selectLastRowExtendSelection
shift ctrl HOME selectFirstRowExtendSelection
shift ctrl KP_DOWN selectNextRowExtendSelection
shift ctrl KP_LEFT selectPreviousColumnExtendSelection
shift ctrl KP_RIGHT selectNextColumnExtendSelection
shift ctrl KP_UP selectPreviousRowExtendSelection
shift ctrl LEFT selectPreviousColumnExtendSelection
shift ctrl PAGE_DOWN scrollDownExtendSelection
shift ctrl PAGE_UP scrollUpExtendSelection
shift ctrl RIGHT selectNextColumnExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousRowExtendSelection
shift DELETE cut
shift DOWN selectNextRowExtendSelection
shift END selectLastRowExtendSelection
shift HOME selectFirstRowExtendSelection
shift INSERT paste
shift KP_DOWN selectNextRowExtendSelection
shift KP_LEFT selectPreviousColumnExtendSelection
shift KP_RIGHT selectNextColumnExtendSelection
shift KP_UP selectPreviousRowExtendSelection
shift LEFT selectPreviousColumnExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift RIGHT selectNextColumnExtendSelection
shift SPACE extendTo
shift UP selectPreviousRowExtendSelection
#---- PasswordField ----
PasswordField.focusInputMap [lazy] 37 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl C copy-to-clipboard
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-begin-line
ctrl KP_RIGHT caret-end-line
ctrl LEFT caret-begin-line
ctrl RIGHT caret-end-line
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
END caret-end-line
ENTER notify-field-accept
HOME caret-begin-line
KP_LEFT caret-backward
KP_RIGHT caret-forward
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
shift ctrl KP_LEFT selection-begin-line
shift ctrl KP_RIGHT selection-end-line
shift ctrl LEFT selection-begin-line
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-end-line
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- 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 length=22 [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] SPACE
[21] return
#---- RadioButton ----
RadioButton.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- RootPane ----
RootPane.ancestorInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
CONTEXT_MENU postPopup
shift F10 postPopup
#---- ScrollBar ----
ScrollBar.ancestorInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT positiveUnitIncrement
KP_RIGHT negativeUnitIncrement
LEFT positiveUnitIncrement
RIGHT negativeUnitIncrement
ScrollBar.ancestorInputMap [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 ----
ScrollPane.ancestorInputMap.RightToLeft [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
ctrl PAGE_DOWN scrollLeft
ctrl PAGE_UP scrollRight
ScrollPane.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
ctrl END scrollEnd
ctrl HOME scrollHome
ctrl PAGE_DOWN scrollRight
ctrl PAGE_UP scrollLeft
DOWN unitScrollDown
KP_DOWN unitScrollDown
KP_LEFT unitScrollLeft
KP_RIGHT unitScrollRight
KP_UP unitScrollUp
LEFT unitScrollLeft
PAGE_DOWN scrollDown
PAGE_UP scrollUp
RIGHT unitScrollRight
UP unitScrollUp
#---- Slider ----
Slider.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT positiveUnitIncrement
KP_RIGHT negativeUnitIncrement
LEFT positiveUnitIncrement
RIGHT negativeUnitIncrement
Slider.focusInputMap [lazy] 12 javax.swing.plaf.InputMapUIResource [UI]
DOWN negativeUnitIncrement
END maxScroll
HOME minScroll
KP_DOWN negativeUnitIncrement
KP_LEFT negativeUnitIncrement
KP_RIGHT positiveUnitIncrement
KP_UP positiveUnitIncrement
LEFT negativeUnitIncrement
PAGE_DOWN negativeBlockIncrement
PAGE_UP positiveBlockIncrement
RIGHT positiveUnitIncrement
UP positiveUnitIncrement
#---- Spinner ----
Spinner.ancestorInputMap [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
DOWN decrement
KP_DOWN decrement
KP_UP increment
UP increment
#---- SplitPane ----
SplitPane.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
ctrl TAB focusOutForward
DOWN positiveIncrement
END selectMax
F6 toggleFocus
F8 startResize
HOME selectMin
KP_DOWN positiveIncrement
KP_LEFT negativeIncrement
KP_RIGHT positiveIncrement
KP_UP negativeIncrement
LEFT negativeIncrement
RIGHT positiveIncrement
UP negativeIncrement
shift ctrl TAB focusOutBackward
#---- TabbedPane ----
TabbedPane.ancestorInputMap [lazy] 6 javax.swing.plaf.InputMapUIResource [UI]
ctrl KP_UP requestFocus
ctrl PAGE_DOWN navigatePageDown
ctrl PAGE_UP navigatePageUp
ctrl TAB navigateNext
ctrl UP requestFocus
shift ctrl TAB navigatePrevious
TabbedPane.focusInputMap [lazy] 11 javax.swing.plaf.InputMapUIResource [UI]
ctrl DOWN requestFocusForVisibleComponent
ctrl KP_DOWN requestFocusForVisibleComponent
DOWN navigateDown
KP_DOWN navigateDown
KP_LEFT navigateLeft
KP_RIGHT navigateRight
KP_UP navigateUp
LEFT navigateLeft
RIGHT navigateRight
SPACE selectTabWithFocus
UP navigateUp
#---- Table ----
Table.ancestorInputMap.RightToLeft [lazy] 18 javax.swing.plaf.InputMapUIResource [UI]
ctrl KP_LEFT selectNextColumnChangeLead
ctrl LEFT selectNextColumnChangeLead
ctrl PAGE_DOWN scrollLeftChangeSelection
ctrl PAGE_UP scrollRightChangeSelection
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 PAGE_DOWN scrollLeftExtendSelection
shift ctrl PAGE_UP scrollRightExtendSelection
shift ctrl RIGHT selectPreviousColumnExtendSelection
shift KP_LEFT selectNextColumnExtendSelection
shift KP_RIGHT selectPreviousColumnChangeLead
shift LEFT selectNextColumnExtendSelection
shift RIGHT selectPreviousColumnChangeLead
Table.ancestorInputMap [lazy] 71 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextRowChangeLead
ctrl END selectLastRow
ctrl HOME selectFirstRow
ctrl INSERT copy
ctrl KP_DOWN selectNextRowChangeLead
ctrl KP_LEFT selectPreviousColumnChangeLead
ctrl KP_RIGHT selectNextColumnChangeLead
ctrl KP_UP selectPreviousRowChangeLead
ctrl LEFT selectPreviousColumnChangeLead
ctrl PAGE_DOWN scrollRightChangeSelection
ctrl PAGE_UP scrollLeftChangeSelection
ctrl RIGHT selectNextColumnChangeLead
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousRowChangeLead
ctrl V paste
ctrl X cut
COPY copy
CUT cut
DOWN selectNextRow
END selectLastColumn
ENTER selectNextRowCell
ESCAPE cancel
F2 startEditing
F8 focusHeader
HOME selectFirstColumn
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
KP_UP selectPreviousRow
LEFT selectPreviousColumn
PAGE_DOWN scrollDownChangeSelection
PAGE_UP scrollUpChangeSelection
PASTE paste
RIGHT selectNextColumn
SPACE addToSelection
TAB selectNextColumnCell
UP selectPreviousRow
shift ctrl DOWN selectNextRowExtendSelection
shift ctrl END selectLastRowExtendSelection
shift ctrl HOME selectFirstRowExtendSelection
shift ctrl KP_DOWN selectNextRowExtendSelection
shift ctrl KP_LEFT selectPreviousColumnExtendSelection
shift ctrl KP_RIGHT selectNextColumnExtendSelection
shift ctrl KP_UP selectPreviousRowExtendSelection
shift ctrl LEFT selectPreviousColumnExtendSelection
shift ctrl PAGE_DOWN scrollRightExtendSelection
shift ctrl PAGE_UP scrollLeftExtendSelection
shift ctrl RIGHT selectNextColumnExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousRowExtendSelection
shift DELETE cut
shift DOWN selectNextRowExtendSelection
shift END selectLastColumnExtendSelection
shift ENTER selectPreviousRowCell
shift HOME selectFirstColumnExtendSelection
shift INSERT paste
shift KP_DOWN selectNextRowExtendSelection
shift KP_LEFT selectPreviousColumnExtendSelection
shift KP_RIGHT selectNextColumnExtendSelection
shift KP_UP selectPreviousRowExtendSelection
shift LEFT selectPreviousColumnExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift RIGHT selectNextColumnExtendSelection
shift SPACE extendTo
shift TAB selectPreviousColumnCell
shift UP selectPreviousRowExtendSelection
#---- TableHeader ----
TableHeader.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
alt KP_LEFT moveColumnLeft
alt KP_RIGHT moveColumnRight
alt LEFT moveColumnLeft
alt RIGHT moveColumnRight
ESCAPE focusTable
KP_LEFT selectColumnToLeft
KP_RIGHT selectColumnToRight
LEFT selectColumnToLeft
RIGHT selectColumnToRight
SPACE toggleSortOrder
shift alt KP_LEFT resizeLeft
shift alt KP_RIGHT resizeRight
shift alt LEFT resizeLeft
shift alt RIGHT resizeRight
#---- TextArea ----
TextArea.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- TextField ----
TextField.focusInputMap [lazy] 39 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
END caret-end-line
ENTER notify-field-accept
HOME caret-begin-line
KP_LEFT caret-backward
KP_RIGHT caret-forward
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-next-word
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- TextPane ----
TextPane.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- ToggleButton ----
ToggleButton.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- ToolBar ----
ToolBar.ancestorInputMap [lazy] 8 javax.swing.plaf.InputMapUIResource [UI]
DOWN navigateDown
KP_DOWN navigateDown
KP_LEFT navigateLeft
KP_RIGHT navigateRight
KP_UP navigateUp
LEFT navigateLeft
RIGHT navigateRight
UP navigateUp
#---- Tree ----
Tree.ancestorInputMap [lazy] 1 javax.swing.plaf.InputMapUIResource [UI]
ESCAPE cancel
Tree.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT selectChild
KP_RIGHT selectParent
LEFT selectChild
RIGHT selectParent
Tree.focusInputMap [lazy] 60 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextChangeLead
ctrl END selectLastChangeLead
ctrl HOME selectFirstChangeLead
ctrl INSERT copy
ctrl KP_DOWN selectNextChangeLead
ctrl KP_LEFT scrollLeft
ctrl KP_RIGHT scrollRight
ctrl KP_UP selectPreviousChangeLead
ctrl LEFT scrollLeft
ctrl PAGE_DOWN scrollDownChangeLead
ctrl PAGE_UP scrollUpChangeLead
ctrl RIGHT scrollRight
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousChangeLead
ctrl V paste
ctrl X cut
BACK_SPACE moveSelectionToParent
COPY copy
CUT cut
DOWN selectNext
END selectLast
F2 startEditing
HOME selectFirst
KP_DOWN selectNext
KP_LEFT selectParent
KP_RIGHT selectChild
KP_UP selectPrevious
LEFT selectParent
PAGE_DOWN scrollDownChangeSelection
PAGE_UP scrollUpChangeSelection
PASTE paste
RIGHT selectChild
SPACE addToSelection
UP selectPrevious
shift ctrl DOWN selectNextExtendSelection
shift ctrl END selectLastExtendSelection
shift ctrl HOME selectFirstExtendSelection
shift ctrl KP_DOWN selectNextExtendSelection
shift ctrl KP_UP selectPreviousExtendSelection
shift ctrl PAGE_DOWN scrollDownExtendSelection
shift ctrl PAGE_UP scrollUpExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousExtendSelection
shift DELETE cut
shift DOWN selectNextExtendSelection
shift END selectLastExtendSelection
shift HOME selectFirstExtendSelection
shift INSERT paste
shift KP_DOWN selectNextExtendSelection
shift KP_UP selectPreviousExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift SPACE extendTo
shift UP selectPreviousExtendSelection
typed + expand
typed - collapse

View File

@@ -58,11 +58,15 @@ public class FlatThemeTokenMaker
tokenMap.put( "hsla", TOKEN_FUNCTION ); tokenMap.put( "hsla", TOKEN_FUNCTION );
tokenMap.put( "lighten", TOKEN_FUNCTION ); tokenMap.put( "lighten", TOKEN_FUNCTION );
tokenMap.put( "darken", TOKEN_FUNCTION ); tokenMap.put( "darken", TOKEN_FUNCTION );
tokenMap.put( "saturate", TOKEN_FUNCTION );
tokenMap.put( "desaturate", TOKEN_FUNCTION );
tokenMap.put( "lazy", TOKEN_FUNCTION ); tokenMap.put( "lazy", TOKEN_FUNCTION );
// function options // function options
tokenMap.put( "relative", Token.RESERVED_WORD ); tokenMap.put( "relative", Token.RESERVED_WORD );
tokenMap.put( "derived", Token.RESERVED_WORD );
tokenMap.put( "autoInverse", Token.RESERVED_WORD ); tokenMap.put( "autoInverse", Token.RESERVED_WORD );
tokenMap.put( "noAutoInverse", Token.RESERVED_WORD );
} }
/** /**