Merge PR #396: Typography

This commit is contained in:
Karl Tauber
2021-11-19 14:57:36 +01:00
33 changed files with 4151 additions and 210 deletions

View File

@@ -12,6 +12,9 @@ FlatLaf Change Log
- Style classes allow defining style rules at a single place (in UI defaults)
and use them in any component. (PR #388)\
E.g.: `mySlider.putClientProperty( "FlatLaf.styleClass", "myclass" );`
- Typography defines several font styles for headers and various text sizes,
which makes it easy to use consistent font styles across the application. (PR
#396)
- Native window decorations: Show Windows 11 snap layouts menu when hovering the
mouse over the maximize button. (issues #397 and #407)
- TextField, FormattedTextField and PasswordField: Support leading and trailing

View File

@@ -534,7 +534,7 @@ public abstract class FlatLaf
// use active value for all fonts to allow changing fonts in all components with:
// UIManager.put( "defaultFont", myFont );
// (this is similar as in Nimbus L&F)
Object activeFont = new ActiveFont( null, -1, 0, 0, 0, 0 );
Object activeFont = new ActiveFont( null, null, -1, 0, 0, 0, 0 );
// override fonts
for( Object key : defaults.keySet() ) {
@@ -618,7 +618,7 @@ public abstract class FlatLaf
/** @since 1.1 */
public static ActiveValue createActiveFontValue( float scaleFactor ) {
return new ActiveFont( null, -1, 0, 0, 0, scaleFactor );
return new ActiveFont( null, null, -1, 0, 0, 0, scaleFactor );
}
/**
@@ -1221,6 +1221,7 @@ public abstract class FlatLaf
static class ActiveFont
implements ActiveValue
{
private final String baseFontKey;
private final List<String> families;
private final int style;
private final int styleChange;
@@ -1230,7 +1231,9 @@ public abstract class FlatLaf
// cache (scaled/derived) font
private FontUIResource font;
private Font lastDefaultFont;
private Font lastBaseFont;
private boolean inCreateValue;
/**
* @param families list of font families, or {@code null}
@@ -1241,9 +1244,10 @@ public abstract class FlatLaf
* @param relativeSize added to size of base font, or {@code 0}
* @param scaleSize multiply size of base font, or {@code 0}
*/
ActiveFont( List<String> families, int style, int styleChange,
ActiveFont( String baseFontKey, List<String> families, int style, int styleChange,
int absoluteSize, int relativeSize, float scaleSize )
{
this.baseFontKey = baseFontKey;
this.families = families;
this.style = style;
this.styleChange = styleChange;
@@ -1254,16 +1258,30 @@ public abstract class FlatLaf
@Override
public Object createValue( UIDefaults table ) {
Font defaultFont = UIManager.getFont( "defaultFont" );
if( inCreateValue )
throw new IllegalStateException( "FlatLaf: endless recursion in font" );
// fallback (to avoid NPE in case that this is used in another Laf)
if( defaultFont == null )
defaultFont = UIManager.getFont( "Label.font" );
Font baseFont = null;
if( lastDefaultFont != defaultFont ) {
lastDefaultFont = defaultFont;
inCreateValue = true;
try {
if( baseFontKey != null )
baseFont = (Font) UIDefaultsLoader.lazyUIManagerGet( baseFontKey );
font = derive( defaultFont, fontSize -> UIScale.scale( fontSize ) );
if( baseFont == null )
baseFont = UIManager.getFont( "defaultFont" );
// fallback (to avoid NPE in case that this is used in another Laf)
if( baseFont == null )
baseFont = UIManager.getFont( "Label.font" );
} finally {
inCreateValue = false;
}
if( lastBaseFont != baseFont ) {
lastBaseFont = baseFont;
font = derive( baseFont, fontSize -> UIScale.scale( fontSize ) );
}
return font;

View File

@@ -441,10 +441,7 @@ class UIDefaultsLoader
// check whether value type is specified in the value
if( value.startsWith( "#" ) )
valueType = ValueType.COLOR;
else if( value.startsWith( "\"" ) && value.indexOf( '"', 1 ) == value.length() - 1 ) {
valueType = ValueType.STRING;
value = value.substring( 1, value.length() - 1 );
} else if( value.startsWith( TYPE_PREFIX ) ) {
else if( value.startsWith( TYPE_PREFIX ) ) {
int end = value.indexOf( TYPE_PREFIX_END );
if( end != -1 ) {
try {
@@ -536,6 +533,12 @@ class UIDefaultsLoader
case GRAYFILTER: return parseGrayFilter( value );
case UNKNOWN:
default:
// string
if( value.startsWith( "\"" ) && value.endsWith( "\"" ) ) {
resultValueType[0] = ValueType.STRING;
return value.substring( 1, value.length() - 1 );
}
// colors
Object color = parseColorOrFunction( value, resolver, false );
if( color != null ) {
@@ -1051,7 +1054,7 @@ class UIDefaultsLoader
}
/**
* Syntax: [normal] [bold|+bold|-bold] [italic|+italic|-italic] [<size>|+<incr>|-<decr>|<percent>%] [family[, family]]
* Syntax: [normal] [bold|+bold|-bold] [italic|+italic|-italic] [<size>|+<incr>|-<decr>|<percent>%] [family[, family]] [$baseFontKey]
*/
private static Object parseFont( String value ) {
Object font = fontCache.get( value );
@@ -1064,6 +1067,7 @@ class UIDefaultsLoader
int relativeSize = 0;
float scaleSize = 0;
List<String> families = null;
String baseFontKey = null;
// use StreamTokenizer to split string because it supports quoted strings
StreamTokenizer st = new StreamTokenizer( new StringReader( value ) );
@@ -1113,6 +1117,12 @@ class UIDefaultsLoader
scaleSize = parseInteger( param.substring( 0, param.length() - 1 ), true ) / 100f;
else
absoluteSize = parseInteger( param, true );
} else if( firstChar == '$' ) {
// reference to base font
if( baseFontKey != null )
throw new IllegalArgumentException( "baseFontKey specified more than once in '" + value + "'" );
baseFontKey = param.substring( 1 );
} else {
// font family
if( families == null )
@@ -1139,7 +1149,7 @@ class UIDefaultsLoader
throw new IllegalArgumentException( "can not use '+italic' and '-italic' in '" + value + "'" );
}
font = new FlatLaf.ActiveFont( families, style, styleChange, absoluteSize, relativeSize, scaleSize );
font = new FlatLaf.ActiveFont( baseFontKey, families, style, styleChange, absoluteSize, relativeSize, scaleSize );
fontCache.put( value, font );
return font;
}
@@ -1292,7 +1302,7 @@ class UIDefaultsLoader
* For use in LazyValue to get value for given key from UIManager and report error
* if not found. If key is prefixed by '?', then no error is reported.
*/
private static Object lazyUIManagerGet( String uiKey ) {
static Object lazyUIManagerGet( String uiKey ) {
boolean optional = false;
if( uiKey.startsWith( OPTIONAL_PREFIX ) ) {
uiKey = uiKey.substring( OPTIONAL_PREFIX.length() );

View File

@@ -26,6 +26,68 @@
# Instead copy and modify only those properties that you need to alter.
#
#---- typography / fonts ----
# headings
h00.font = +24
h0.font = +18
h1.font = +12 $semibold.font
h2.font = +6 $semibold.font
h3.font = +3 $semibold.font
h4.font = bold
h1.regular.font = +12
h2.regular.font = +6
h3.regular.font = +3
# text
large.font = +2
medium.font = -1
small.font = -2
mini.font = -3
# default font
#defaultFont = ...
# font weights
# Windows
[win]light.font = "Segoe UI Light"
[win]semibold.font = "Segoe UI Semibold"
# macOS
[mac]light.font = "HelveticaNeue-Thin"
[mac]semibold.font = "HelveticaNeue-Medium"
# Linux
[linux]light.font = "Lato Light", "Ubuntu Light", "Cantarell Light"
[linux]semibold.font = "Lato Semibold", "Ubuntu Medium"
# fallback for unknown platform
light.font = +0
semibold.font = +0
# monospaced
[win]monospaced.font = Consolas, "Courier New", Monospaced
[mac]monospaced.font = Menlo, Monospaced
[linux]monospaced.font = "Liberation Mono", "Ubuntu Mono", Monospaced
monospaced.font = Monospaced
# styles
[style].h00 = font: $h00.font
[style].h0 = font: $h0.font
[style].h1 = font: $h1.font
[style].h2 = font: $h2.font
[style].h3 = font: $h3.font
[style].h4 = font: $h4.font
[style].h1.regular = font: $h1.regular.font
[style].h2.regular = font: $h2.regular.font
[style].h3.regular = font: $h3.regular.font
[style].large = font: $large.font
[style].medium = font: $medium.font
[style].small = font: $small.font
[style].mini = font: $mini.font
[style].light = font: $light.font
[style].semibold = font: $semibold.font
[style].monospaced = font: $monospaced.font
#---- UI delegates ----
ButtonUI = com.formdev.flatlaf.ui.FlatButtonUI

View File

@@ -22,6 +22,10 @@ import javax.swing.text.DefaultEditorKit;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import com.formdev.flatlaf.icons.FlatSearchIcon;
import net.miginfocom.layout.AC;
import net.miginfocom.layout.BoundSize;
import net.miginfocom.layout.ConstraintParser;
import net.miginfocom.layout.DimConstraint;
import net.miginfocom.swing.*;
/**
@@ -130,6 +134,22 @@ class BasicComponentsPanel
JTextField leadingIconTextField = new JTextField();
JTextField trailingIconTextField = new JTextField();
JTextField iconsTextField = new JTextField();
JLabel fontsLabel = new JLabel();
JLabel h00Label = new JLabel();
JLabel h0Label = new JLabel();
JLabel h1Label = new JLabel();
JLabel h2Label = new JLabel();
JLabel h3Label = new JLabel();
JLabel h4Label = new JLabel();
JLabel lightLabel = new JLabel();
JLabel semiboldLabel = new JLabel();
JLabel fontZoomLabel = new JLabel();
JLabel largeLabel = new JLabel();
JLabel defaultLabel = new JLabel();
JLabel mediumLabel = new JLabel();
JLabel smallLabel = new JLabel();
JLabel miniLabel = new JLabel();
JLabel monospacedLabel = new JLabel();
JPopupMenu popupMenu1 = new JPopupMenu();
JMenuItem cutMenuItem = new JMenuItem();
JMenuItem copyMenuItem = new JMenuItem();
@@ -160,6 +180,8 @@ class BasicComponentsPanel
"[]para" +
"[]" +
"[]" +
"[]" +
"[]0" +
"[]"));
//---- labelLabel ----
@@ -667,6 +689,85 @@ class BasicComponentsPanel
iconsTextField.setText("text");
add(iconsTextField, "cell 3 14,growx");
//---- fontsLabel ----
fontsLabel.setText("Typography / Fonts:");
add(fontsLabel, "cell 0 15");
//---- h00Label ----
h00Label.setText("H00");
h00Label.putClientProperty("FlatLaf.styleClass", "h00");
add(h00Label, "cell 1 15 5 1");
//---- h0Label ----
h0Label.setText("H0");
h0Label.putClientProperty("FlatLaf.styleClass", "h0");
add(h0Label, "cell 1 15 5 1");
//---- h1Label ----
h1Label.setText("H1");
h1Label.putClientProperty("FlatLaf.styleClass", "h1");
add(h1Label, "cell 1 15 5 1");
//---- h2Label ----
h2Label.setText("H2");
h2Label.putClientProperty("FlatLaf.styleClass", "h2");
add(h2Label, "cell 1 15 5 1");
//---- h3Label ----
h3Label.setText("H3");
h3Label.putClientProperty("FlatLaf.styleClass", "h3");
add(h3Label, "cell 1 15 5 1");
//---- h4Label ----
h4Label.setText("H4");
h4Label.putClientProperty("FlatLaf.styleClass", "h4");
add(h4Label, "cell 1 15 5 1");
//---- lightLabel ----
lightLabel.setText("light");
lightLabel.putClientProperty("FlatLaf.style", "font: 200% $light.font");
add(lightLabel, "cell 1 15 5 1,gapx 30");
//---- semiboldLabel ----
semiboldLabel.setText("semibold");
semiboldLabel.putClientProperty("FlatLaf.style", "font: 200% $semibold.font");
add(semiboldLabel, "cell 1 15 5 1");
//---- fontZoomLabel ----
fontZoomLabel.setText("(200%)");
fontZoomLabel.putClientProperty("FlatLaf.styleClass", "small");
fontZoomLabel.setEnabled(false);
add(fontZoomLabel, "cell 1 15 5 1");
//---- largeLabel ----
largeLabel.setText("large");
largeLabel.putClientProperty("FlatLaf.styleClass", "large");
add(largeLabel, "cell 1 16 5 1");
//---- defaultLabel ----
defaultLabel.setText("default");
add(defaultLabel, "cell 1 16 5 1");
//---- mediumLabel ----
mediumLabel.setText("medium");
mediumLabel.putClientProperty("FlatLaf.styleClass", "medium");
add(mediumLabel, "cell 1 16 5 1");
//---- smallLabel ----
smallLabel.setText("small");
smallLabel.putClientProperty("FlatLaf.styleClass", "small");
add(smallLabel, "cell 1 16 5 1");
//---- miniLabel ----
miniLabel.setText("mini");
miniLabel.putClientProperty("FlatLaf.styleClass", "mini");
add(miniLabel, "cell 1 16 5 1");
//---- monospacedLabel ----
monospacedLabel.setText("monospaced");
monospacedLabel.putClientProperty("FlatLaf.styleClass", "monospaced");
add(monospacedLabel, "cell 1 16 5 1,gapx 30");
//======== popupMenu1 ========
{
@@ -705,37 +806,55 @@ class BasicComponentsPanel
if( FlatLafDemo.screenshotsMode ) {
// hide some components
Component[] hiddenComponents = {
labelLabel, label1, label2,
button13, button14, button15, button16, comboBox5, comboBox6,
textField6, passwordField5,
textFieldLabel, textField2, textField4, textField6,
formattedTextFieldLabel, formattedTextField1, formattedTextField2, formattedTextField3, formattedTextField4, formattedTextField5,
passwordFieldLabel, passwordField1, passwordField2, passwordField3, passwordField4, passwordField5,
textAreaLabel, scrollPane1, scrollPane2, scrollPane3, scrollPane4, textArea5,
editorPaneLabel, scrollPane5, scrollPane6, scrollPane7, scrollPane8, editorPane5,
textPaneLabel, scrollPane9, scrollPane10, scrollPane11, scrollPane12, textPane5,
errorHintsLabel, errorHintsTextField, errorHintsComboBox, errorHintsSpinner,
warningHintsLabel, warningHintsTextField, warningHintsComboBox, warningHintsSpinner,
fontZoomLabel,
};
for( Component c : hiddenComponents )
c.setVisible( false );
// move leading/trailing icon fields and password fields some rows up
Component[] formattedTextFields = { formattedTextFieldLabel, formattedTextField1, formattedTextField2, formattedTextField3, formattedTextField4 };
Component[] passwordFields = { passwordFieldLabel, passwordField1, passwordField2, passwordField3, passwordField4 };
Component[] iconsFields = { iconsLabel, leadingIconTextField, trailingIconTextField, iconsTextField };
// update layout (change row gaps to zero)
MigLayout layout = (MigLayout) getLayout();
for( int i = 0; i < iconsFields.length; i++ ) {
Object cons = layout.getComponentConstraints( passwordFields[i] );
layout.setComponentConstraints( iconsFields[i], cons );
}
for( int i = 0; i < passwordFields.length; i++ ) {
Object cons = layout.getComponentConstraints( formattedTextFields[i] );
layout.setComponentConstraints( passwordFields[i], cons );
}
Object rowCons = layout.getRowConstraints();
AC ac = (rowCons instanceof String)
? ConstraintParser.parseColumnConstraints( (String) rowCons )
: (AC) rowCons;
BoundSize zeroGap = ConstraintParser.parseBoundSize( "0", true, true );
DimConstraint[] rows = ac.getConstaints();
rows[6].setGapBefore( zeroGap );
rows[7].setGapBefore( zeroGap );
rows[8].setGapBefore( zeroGap );
rows[9].setGapBefore( zeroGap );
rows[10].setGapBefore( zeroGap );
rows[11].setGapBefore( zeroGap );
rows[11].setGapAfter( zeroGap );
rows[12].setGapBefore( zeroGap );
rows[13].setGapBefore( zeroGap );
rows[15].setGapBefore( zeroGap );
layout.setRowConstraints( ac );
// move two text field into same row as spinners
spinnerLabel.setText( "JSpinner / JTextField:" );
layout.setComponentConstraints( textField1, "cell 3 5,growx" );
layout.setComponentConstraints( textField3, "cell 4 5,growx" );
// make "Not editable disabled" combobox smaller
Object cons = layout.getComponentConstraints( comboBox4 );
layout.setComponentConstraints( comboBox4, cons + ",width 50:50" );
revalidate();
repaint();
}
}

View File

@@ -9,7 +9,7 @@ new FormModel {
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog,hidemode 3"
"$columnConstraints": "[][sizegroup 1][sizegroup 1][sizegroup 1][][]"
"$rowConstraints": "[][][][][][][][][][][][]para[][][]"
"$rowConstraints": "[][][][][][][][][][][][]para[][][][]0[]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
@@ -671,9 +671,120 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 14,growx"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "fontsLabel"
"text": "Typography / Fonts:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 15"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "h00Label"
"text": "H00"
"$client.FlatLaf.styleClass": "h00"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "h0Label"
"text": "H0"
"$client.FlatLaf.styleClass": "h0"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "h1Label"
"text": "H1"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "h2Label"
"text": "H2"
"$client.FlatLaf.styleClass": "h2"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "h3Label"
"text": "H3"
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "h4Label"
"text": "H4"
"$client.FlatLaf.styleClass": "h4"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "lightLabel"
"text": "light"
"$client.FlatLaf.style": "font: 200% $light.font"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1,gapx 30"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "semiboldLabel"
"text": "semibold"
"$client.FlatLaf.style": "font: 200% $semibold.font"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "fontZoomLabel"
"text": "(200%)"
"$client.FlatLaf.styleClass": "small"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "largeLabel"
"text": "large"
"$client.FlatLaf.styleClass": "large"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 16 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "defaultLabel"
"text": "default"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 16 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "mediumLabel"
"text": "medium"
"$client.FlatLaf.styleClass": "medium"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 16 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "smallLabel"
"text": "small"
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 16 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "miniLabel"
"text": "mini"
"$client.FlatLaf.styleClass": "mini"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 16 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "monospacedLabel"
"text": "monospaced"
"$client.FlatLaf.styleClass": "monospaced"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 16 5 1,gapx 30"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 920, 480 )
"size": new java.awt.Dimension( 920, 550 )
} )
add( new FormContainer( "javax.swing.JPopupMenu", new FormLayoutManager( class javax.swing.JPopupMenu ) ) {
name: "popupMenu1"
@@ -693,7 +804,7 @@ new FormModel {
"mnemonic": 80
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 500 )
"location": new java.awt.Point( 0, 570 )
"size": new java.awt.Dimension( 91, 87 )
} )
}

View File

@@ -29,6 +29,7 @@ import java.util.prefs.Preferences;
import javax.swing.*;
import javax.swing.text.DefaultEditorKit;
import javax.swing.text.StyleContext;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatDarculaLaf;
import com.formdev.flatlaf.FlatDarkLaf;
import com.formdev.flatlaf.FlatIntelliJLaf;
@@ -50,7 +51,6 @@ import com.formdev.flatlaf.ui.JBRCustomDecorations;
import com.formdev.flatlaf.util.ColorFunctions;
import com.formdev.flatlaf.util.LoggingFacade;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.layout.ConstraintParser;
import net.miginfocom.layout.LC;
import net.miginfocom.layout.UnitValue;
@@ -160,8 +160,7 @@ class DemoFrame
private void aboutActionPerformed() {
JLabel titleLabel = new JLabel( "FlatLaf Demo" );
Font titleFont = titleLabel.getFont();
titleLabel.setFont( titleFont.deriveFont( (float) titleFont.getSize() + UIScale.scale( 6 ) ) );
titleLabel.putClientProperty( FlatClientProperties.STYLE_CLASS, "h1" );
String link = "https://www.formdev.com/flatlaf/";
JLabel linkLabel = new JLabel( "<html><a href=\"#\">" + link + "</a></html>" );

View File

@@ -444,7 +444,7 @@ class TabsPanel
//---- tabPlacementLabel ----
tabPlacementLabel.setText("Tab placement");
tabPlacementLabel.setFont(tabPlacementLabel.getFont().deriveFont(tabPlacementLabel.getFont().getSize() + 4f));
tabPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabPlacementLabel.setName("tabPlacementLabel");
panel1.add(tabPlacementLabel, "cell 0 0");
@@ -457,28 +457,28 @@ class TabsPanel
//---- topPlacementButton ----
topPlacementButton.setText("top");
topPlacementButton.setSelected(true);
topPlacementButton.setFont(topPlacementButton.getFont().deriveFont(topPlacementButton.getFont().getSize() - 2f));
topPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
topPlacementButton.setName("topPlacementButton");
topPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(topPlacementButton);
//---- bottomPlacementButton ----
bottomPlacementButton.setText("bottom");
bottomPlacementButton.setFont(bottomPlacementButton.getFont().deriveFont(bottomPlacementButton.getFont().getSize() - 2f));
bottomPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
bottomPlacementButton.setName("bottomPlacementButton");
bottomPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(bottomPlacementButton);
//---- leftPlacementButton ----
leftPlacementButton.setText("left");
leftPlacementButton.setFont(leftPlacementButton.getFont().deriveFont(leftPlacementButton.getFont().getSize() - 2f));
leftPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
leftPlacementButton.setName("leftPlacementButton");
leftPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(leftPlacementButton);
//---- rightPlacementButton ----
rightPlacementButton.setText("right");
rightPlacementButton.setFont(rightPlacementButton.getFont().deriveFont(rightPlacementButton.getFont().getSize() - 2f));
rightPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
rightPlacementButton.setName("rightPlacementButton");
rightPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(rightPlacementButton);
@@ -486,14 +486,14 @@ class TabsPanel
//---- scrollButton ----
scrollButton.setText("scroll");
scrollButton.setFont(scrollButton.getFont().deriveFont(scrollButton.getFont().getSize() - 2f));
scrollButton.putClientProperty("FlatLaf.styleClass", "small");
scrollButton.setName("scrollButton");
scrollButton.addActionListener(e -> scrollChanged());
tabPlacementToolBar.add(scrollButton);
//---- borderButton ----
borderButton.setText("border");
borderButton.setFont(borderButton.getFont().deriveFont(borderButton.getFont().getSize() - 2f));
borderButton.putClientProperty("FlatLaf.styleClass", "small");
borderButton.setName("borderButton");
borderButton.addActionListener(e -> borderChanged());
tabPlacementToolBar.add(borderButton);
@@ -508,7 +508,7 @@ class TabsPanel
//---- tabLayoutLabel ----
tabLayoutLabel.setText("Tab layout");
tabLayoutLabel.setFont(tabLayoutLabel.getFont().deriveFont(tabLayoutLabel.getFont().getSize() + 4f));
tabLayoutLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabLayoutLabel.setName("tabLayoutLabel");
panel1.add(tabLayoutLabel, "cell 0 2");
@@ -520,15 +520,15 @@ class TabsPanel
//---- scrollTabLayoutButton ----
scrollTabLayoutButton.setText("scroll");
scrollTabLayoutButton.setFont(scrollTabLayoutButton.getFont().deriveFont(scrollTabLayoutButton.getFont().getSize() - 2f));
scrollTabLayoutButton.setSelected(true);
scrollTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
scrollTabLayoutButton.setName("scrollTabLayoutButton");
scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged());
tabLayoutToolBar.add(scrollTabLayoutButton);
//---- wrapTabLayoutButton ----
wrapTabLayoutButton.setText("wrap");
wrapTabLayoutButton.setFont(wrapTabLayoutButton.getFont().deriveFont(wrapTabLayoutButton.getFont().getSize() - 2f));
wrapTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
wrapTabLayoutButton.setName("wrapTabLayoutButton");
wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged());
tabLayoutToolBar.add(wrapTabLayoutButton);
@@ -538,14 +538,14 @@ class TabsPanel
//---- scrollLayoutNoteLabel ----
scrollLayoutNoteLabel.setText("(use mouse wheel to scroll; arrow button shows hidden tabs)");
scrollLayoutNoteLabel.setEnabled(false);
scrollLayoutNoteLabel.setFont(scrollLayoutNoteLabel.getFont().deriveFont(scrollLayoutNoteLabel.getFont().getSize() - 2f));
scrollLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
scrollLayoutNoteLabel.setName("scrollLayoutNoteLabel");
panel1.add(scrollLayoutNoteLabel, "cell 0 3");
//---- wrapLayoutNoteLabel ----
wrapLayoutNoteLabel.setText("(probably better to use scroll layout?)");
wrapLayoutNoteLabel.setEnabled(false);
wrapLayoutNoteLabel.setFont(wrapLayoutNoteLabel.getFont().deriveFont(wrapLayoutNoteLabel.getFont().getSize() - 2f));
wrapLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
wrapLayoutNoteLabel.setName("wrapLayoutNoteLabel");
panel1.add(wrapLayoutNoteLabel, "cell 0 3");
@@ -563,7 +563,7 @@ class TabsPanel
//---- closableTabsLabel ----
closableTabsLabel.setText("Closable tabs");
closableTabsLabel.setFont(closableTabsLabel.getFont().deriveFont(closableTabsLabel.getFont().getSize() + 4f));
closableTabsLabel.putClientProperty("FlatLaf.styleClass", "h3");
closableTabsLabel.setName("closableTabsLabel");
panel1.add(closableTabsLabel, "cell 0 5");
@@ -575,22 +575,22 @@ class TabsPanel
//---- squareCloseButton ----
squareCloseButton.setText("square");
squareCloseButton.setFont(squareCloseButton.getFont().deriveFont(squareCloseButton.getFont().getSize() - 2f));
squareCloseButton.setSelected(true);
squareCloseButton.putClientProperty("FlatLaf.styleClass", "small");
squareCloseButton.setName("squareCloseButton");
squareCloseButton.addActionListener(e -> closeButtonStyleChanged());
closableTabsToolBar.add(squareCloseButton);
//---- circleCloseButton ----
circleCloseButton.setText("circle");
circleCloseButton.setFont(circleCloseButton.getFont().deriveFont(circleCloseButton.getFont().getSize() - 2f));
circleCloseButton.putClientProperty("FlatLaf.styleClass", "small");
circleCloseButton.setName("circleCloseButton");
circleCloseButton.addActionListener(e -> closeButtonStyleChanged());
closableTabsToolBar.add(circleCloseButton);
//---- redCrossCloseButton ----
redCrossCloseButton.setText("red cross");
redCrossCloseButton.setFont(redCrossCloseButton.getFont().deriveFont(redCrossCloseButton.getFont().getSize() - 2f));
redCrossCloseButton.putClientProperty("FlatLaf.styleClass", "small");
redCrossCloseButton.setName("redCrossCloseButton");
redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged());
closableTabsToolBar.add(redCrossCloseButton);
@@ -605,7 +605,7 @@ class TabsPanel
//---- tabAreaComponentsLabel ----
tabAreaComponentsLabel.setText("Custom tab area components");
tabAreaComponentsLabel.setFont(tabAreaComponentsLabel.getFont().deriveFont(tabAreaComponentsLabel.getFont().getSize() + 4f));
tabAreaComponentsLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabAreaComponentsLabel.setName("tabAreaComponentsLabel");
panel1.add(tabAreaComponentsLabel, "cell 0 7");
@@ -617,16 +617,16 @@ class TabsPanel
//---- leadingComponentButton ----
leadingComponentButton.setText("leading");
leadingComponentButton.setFont(leadingComponentButton.getFont().deriveFont(leadingComponentButton.getFont().getSize() - 2f));
leadingComponentButton.setSelected(true);
leadingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
leadingComponentButton.setName("leadingComponentButton");
leadingComponentButton.addActionListener(e -> customComponentsChanged());
tabAreaComponentsToolBar.add(leadingComponentButton);
//---- trailingComponentButton ----
trailingComponentButton.setText("trailing");
trailingComponentButton.setFont(trailingComponentButton.getFont().deriveFont(trailingComponentButton.getFont().getSize() - 2f));
trailingComponentButton.setSelected(true);
trailingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
trailingComponentButton.setName("trailingComponentButton");
trailingComponentButton.addActionListener(e -> customComponentsChanged());
tabAreaComponentsToolBar.add(trailingComponentButton);
@@ -664,14 +664,14 @@ class TabsPanel
//---- tabIconPlacementLabel ----
tabIconPlacementLabel.setText("Tab icon placement");
tabIconPlacementLabel.setFont(tabIconPlacementLabel.getFont().deriveFont(tabIconPlacementLabel.getFont().getSize() + 4f));
tabIconPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabIconPlacementLabel.setName("tabIconPlacementLabel");
panel2.add(tabIconPlacementLabel, "cell 0 0");
//---- tabIconPlacementNodeLabel ----
tabIconPlacementNodeLabel.setText("(top/bottom/leading/trailing)");
tabIconPlacementNodeLabel.setEnabled(false);
tabIconPlacementNodeLabel.setFont(tabIconPlacementNodeLabel.getFont().deriveFont(tabIconPlacementNodeLabel.getFont().getSize() - 2f));
tabIconPlacementNodeLabel.putClientProperty("FlatLaf.styleClass", "small");
tabIconPlacementNodeLabel.setName("tabIconPlacementNodeLabel");
panel2.add(tabIconPlacementNodeLabel, "cell 0 1");
@@ -701,14 +701,14 @@ class TabsPanel
//---- tabAreaAlignmentLabel ----
tabAreaAlignmentLabel.setText("Tab area alignment");
tabAreaAlignmentLabel.setFont(tabAreaAlignmentLabel.getFont().deriveFont(tabAreaAlignmentLabel.getFont().getSize() + 4f));
tabAreaAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabAreaAlignmentLabel.setName("tabAreaAlignmentLabel");
panel2.add(tabAreaAlignmentLabel, "cell 0 6");
//---- tabAreaAlignmentNoteLabel ----
tabAreaAlignmentNoteLabel.setText("(leading/center/trailing/fill)");
tabAreaAlignmentNoteLabel.setEnabled(false);
tabAreaAlignmentNoteLabel.setFont(tabAreaAlignmentNoteLabel.getFont().deriveFont(tabAreaAlignmentNoteLabel.getFont().getSize() - 2f));
tabAreaAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
tabAreaAlignmentNoteLabel.setName("tabAreaAlignmentNoteLabel");
panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7");
@@ -759,14 +759,14 @@ class TabsPanel
//---- tabWidthModeLabel ----
tabWidthModeLabel.setText("Tab width mode");
tabWidthModeLabel.setFont(tabWidthModeLabel.getFont().deriveFont(tabWidthModeLabel.getFont().getSize() + 4f));
tabWidthModeLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabWidthModeLabel.setName("tabWidthModeLabel");
panel3.add(tabWidthModeLabel, "cell 0 0");
//---- tabWidthModeNoteLabel ----
tabWidthModeNoteLabel.setText("(preferred/equal/compact)");
tabWidthModeNoteLabel.setFont(tabWidthModeNoteLabel.getFont().deriveFont(tabWidthModeNoteLabel.getFont().getSize() - 2f));
tabWidthModeNoteLabel.setEnabled(false);
tabWidthModeNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
tabWidthModeNoteLabel.setName("tabWidthModeNoteLabel");
panel3.add(tabWidthModeNoteLabel, "cell 0 1");
@@ -790,7 +790,7 @@ class TabsPanel
//---- minMaxTabWidthLabel ----
minMaxTabWidthLabel.setText("Minimum/maximum tab width");
minMaxTabWidthLabel.setFont(minMaxTabWidthLabel.getFont().deriveFont(minMaxTabWidthLabel.getFont().getSize() + 4f));
minMaxTabWidthLabel.putClientProperty("FlatLaf.styleClass", "h3");
minMaxTabWidthLabel.setName("minMaxTabWidthLabel");
panel3.add(minMaxTabWidthLabel, "cell 0 5");
@@ -808,7 +808,7 @@ class TabsPanel
//---- tabAlignmentLabel ----
tabAlignmentLabel.setText("Tab title alignment");
tabAlignmentLabel.setFont(tabAlignmentLabel.getFont().deriveFont(tabAlignmentLabel.getFont().getSize() + 4f));
tabAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabAlignmentLabel.setName("tabAlignmentLabel");
panel3.add(tabAlignmentLabel, "cell 0 8");
@@ -829,14 +829,14 @@ class TabsPanel
//---- tabAlignmentNoteLabel ----
tabAlignmentNoteLabel.setText("(leading/center/trailing)");
tabAlignmentNoteLabel.setEnabled(false);
tabAlignmentNoteLabel.setFont(tabAlignmentNoteLabel.getFont().deriveFont(tabAlignmentNoteLabel.getFont().getSize() - 2f));
tabAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
tabAlignmentNoteLabel.setName("tabAlignmentNoteLabel");
panel5.add(tabAlignmentNoteLabel, "cell 0 0");
//---- tabAlignmentNoteLabel2 ----
tabAlignmentNoteLabel2.setText("(trailing)");
tabAlignmentNoteLabel2.setEnabled(false);
tabAlignmentNoteLabel2.setFont(tabAlignmentNoteLabel2.getFont().deriveFont(tabAlignmentNoteLabel2.getFont().getSize() - 2f));
tabAlignmentNoteLabel2.putClientProperty("FlatLaf.styleClass", "small");
tabAlignmentNoteLabel2.setName("tabAlignmentNoteLabel2");
panel5.add(tabAlignmentNoteLabel2, "cell 1 0,alignx right,growx 0");
@@ -901,22 +901,22 @@ class TabsPanel
//---- scrollAsNeededSingleButton ----
scrollAsNeededSingleButton.setText("asNeededSingle");
scrollAsNeededSingleButton.setFont(scrollAsNeededSingleButton.getFont().deriveFont(scrollAsNeededSingleButton.getFont().getSize() - 2f));
scrollAsNeededSingleButton.setSelected(true);
scrollAsNeededSingleButton.putClientProperty("FlatLaf.styleClass", "small");
scrollAsNeededSingleButton.setName("scrollAsNeededSingleButton");
scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton);
//---- scrollAsNeededButton ----
scrollAsNeededButton.setText("asNeeded");
scrollAsNeededButton.setFont(scrollAsNeededButton.getFont().deriveFont(scrollAsNeededButton.getFont().getSize() - 2f));
scrollAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
scrollAsNeededButton.setName("scrollAsNeededButton");
scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollAsNeededButton);
//---- scrollNeverButton ----
scrollNeverButton.setText("never");
scrollNeverButton.setFont(scrollNeverButton.getFont().deriveFont(scrollNeverButton.getFont().getSize() - 2f));
scrollNeverButton.putClientProperty("FlatLaf.styleClass", "small");
scrollNeverButton.setName("scrollNeverButton");
scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollNeverButton);
@@ -936,15 +936,15 @@ class TabsPanel
//---- scrollBothButton ----
scrollBothButton.setText("both");
scrollBothButton.setFont(scrollBothButton.getFont().deriveFont(scrollBothButton.getFont().getSize() - 2f));
scrollBothButton.setSelected(true);
scrollBothButton.putClientProperty("FlatLaf.styleClass", "small");
scrollBothButton.setName("scrollBothButton");
scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged());
scrollButtonsPlacementToolBar.add(scrollBothButton);
//---- scrollTrailingButton ----
scrollTrailingButton.setText("trailing");
scrollTrailingButton.setFont(scrollTrailingButton.getFont().deriveFont(scrollTrailingButton.getFont().getSize() - 2f));
scrollTrailingButton.putClientProperty("FlatLaf.styleClass", "small");
scrollTrailingButton.setName("scrollTrailingButton");
scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged());
scrollButtonsPlacementToolBar.add(scrollTrailingButton);
@@ -970,15 +970,15 @@ class TabsPanel
//---- popupAsNeededButton ----
popupAsNeededButton.setText("asNeeded");
popupAsNeededButton.setFont(popupAsNeededButton.getFont().deriveFont(popupAsNeededButton.getFont().getSize() - 2f));
popupAsNeededButton.setSelected(true);
popupAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
popupAsNeededButton.setName("popupAsNeededButton");
popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged());
tabsPopupPolicyToolBar.add(popupAsNeededButton);
//---- popupNeverButton ----
popupNeverButton.setText("never");
popupNeverButton.setFont(popupNeverButton.getFont().deriveFont(popupNeverButton.getFont().getSize() - 2f));
popupNeverButton.putClientProperty("FlatLaf.styleClass", "small");
popupNeverButton.setName("popupNeverButton");
popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged());
tabsPopupPolicyToolBar.add(popupNeverButton);
@@ -997,15 +997,15 @@ class TabsPanel
//---- underlinedTabTypeButton ----
underlinedTabTypeButton.setText("underlined");
underlinedTabTypeButton.setFont(underlinedTabTypeButton.getFont().deriveFont(underlinedTabTypeButton.getFont().getSize() - 2f));
underlinedTabTypeButton.setSelected(true);
underlinedTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
underlinedTabTypeButton.setName("underlinedTabTypeButton");
underlinedTabTypeButton.addActionListener(e -> tabTypeChanged());
tabTypeToolBar.add(underlinedTabTypeButton);
//---- cardTabTypeButton ----
cardTabTypeButton.setText("card");
cardTabTypeButton.setFont(cardTabTypeButton.getFont().deriveFont(cardTabTypeButton.getFont().getSize() - 2f));
cardTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
cardTabTypeButton.setName("cardTabTypeButton");
cardTabTypeButton.addActionListener(e -> tabTypeChanged());
tabTypeToolBar.add(cardTabTypeButton);

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.5.0.382" Java: "16" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -22,7 +22,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "tabPlacementLabel"
"text": "Tab placement"
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -38,28 +38,28 @@ new FormModel {
"text": "top"
"selected": true
"$buttonGroup": new FormReference( "tabPlacementButtonGroup" )
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "bottomPlacementButton"
"text": "bottom"
"$buttonGroup": new FormReference( "tabPlacementButtonGroup" )
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "leftPlacementButton"
"text": "left"
"$buttonGroup": new FormReference( "tabPlacementButtonGroup" )
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "rightPlacementButton"
"text": "right"
"$buttonGroup": new FormReference( "tabPlacementButtonGroup" )
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToolBar$Separator" ) {
@@ -68,13 +68,13 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "scrollButton"
"text": "scroll"
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "borderButton"
"text": "border"
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "borderChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
@@ -88,7 +88,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "tabLayoutLabel"
"text": "Tab layout"
"font": &SwingDerivedFont1 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -103,15 +103,15 @@ new FormModel {
name: "scrollTabLayoutButton"
"text": "scroll"
"$buttonGroup": new FormReference( "tabLayoutButtonGroup" )
"font": &SwingDerivedFont2 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"selected": true
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabLayoutChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "wrapTabLayoutButton"
"text": "wrap"
"$buttonGroup": new FormReference( "tabLayoutButtonGroup" )
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabLayoutChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
@@ -121,7 +121,7 @@ new FormModel {
name: "scrollLayoutNoteLabel"
"text": "(use mouse wheel to scroll; arrow button shows hidden tabs)"
"enabled": false
"font": &SwingDerivedFont3 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
@@ -129,7 +129,7 @@ new FormModel {
name: "wrapLayoutNoteLabel"
"text": "(probably better to use scroll layout?)"
"enabled": false
"font": #SwingDerivedFont3
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
@@ -146,7 +146,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "closableTabsLabel"
"text": "Closable tabs"
"font": #SwingDerivedFont1
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -160,23 +160,23 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "squareCloseButton"
"text": "square"
"font": &SwingDerivedFont4 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$buttonGroup": new FormReference( "closableTabsButtonGroup" )
"selected": true
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "closeButtonStyleChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "circleCloseButton"
"text": "circle"
"font": #SwingDerivedFont4
"$buttonGroup": new FormReference( "closableTabsButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "closeButtonStyleChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "redCrossCloseButton"
"text": "red cross"
"font": #SwingDerivedFont4
"$buttonGroup": new FormReference( "closableTabsButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "closeButtonStyleChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
@@ -190,7 +190,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "tabAreaComponentsLabel"
"text": "Custom tab area components"
"font": #SwingDerivedFont1
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -204,15 +204,15 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "leadingComponentButton"
"text": "leading"
"font": &SwingDerivedFont5 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"selected": true
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customComponentsChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "trailingComponentButton"
"text": "trailing"
"font": #SwingDerivedFont5
"selected": true
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customComponentsChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
@@ -238,7 +238,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "tabIconPlacementLabel"
"text": "Tab icon placement"
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -249,7 +249,7 @@ new FormModel {
name: "tabIconPlacementNodeLabel"
"text": "(top/bottom/leading/trailing)"
"enabled": false
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -279,7 +279,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "tabAreaAlignmentLabel"
"text": "Tab area alignment"
"font": &SwingDerivedFont6 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -290,7 +290,7 @@ new FormModel {
name: "tabAreaAlignmentNoteLabel"
"text": "(leading/center/trailing/fill)"
"enabled": false
"font": &SwingDerivedFont7 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -332,7 +332,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "tabWidthModeLabel"
"text": "Tab width mode"
"font": #SwingDerivedFont6
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -342,8 +342,8 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "tabWidthModeNoteLabel"
"text": "(preferred/equal/compact)"
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"enabled": false
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -368,7 +368,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "minMaxTabWidthLabel"
"text": "Minimum/maximum tab width"
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -388,7 +388,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "tabAlignmentLabel"
"text": "Tab title alignment"
"font": #SwingDerivedFont6
"$client.FlatLaf.styleClass": "h3"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -405,7 +405,7 @@ new FormModel {
name: "tabAlignmentNoteLabel"
"text": "(leading/center/trailing)"
"enabled": false
"font": #SwingDerivedFont7
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -416,7 +416,7 @@ new FormModel {
name: "tabAlignmentNoteLabel2"
"text": "(trailing)"
"enabled": false
"font": #SwingDerivedFont7
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": true
}
@@ -477,23 +477,23 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "scrollAsNeededSingleButton"
"text": "asNeededSingle"
"font": #SwingDerivedFont2
"selected": true
"$buttonGroup": new FormReference( "scrollButtonsPolicyButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPolicyChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "scrollAsNeededButton"
"text": "asNeeded"
"font": #SwingDerivedFont2
"$buttonGroup": new FormReference( "scrollButtonsPolicyButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPolicyChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "scrollNeverButton"
"text": "never"
"font": #SwingDerivedFont2
"$buttonGroup": new FormReference( "scrollButtonsPolicyButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPolicyChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
@@ -512,16 +512,16 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "scrollBothButton"
"text": "both"
"font": #SwingDerivedFont2
"selected": true
"$buttonGroup": new FormReference( "scrollButtonsPlacementButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPlacementChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "scrollTrailingButton"
"text": "trailing"
"font": #SwingDerivedFont2
"$buttonGroup": new FormReference( "scrollButtonsPlacementButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPlacementChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
@@ -550,16 +550,16 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "popupAsNeededButton"
"text": "asNeeded"
"font": #SwingDerivedFont2
"selected": true
"$buttonGroup": new FormReference( "tabsPopupPolicyButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabsPopupPolicyChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "popupNeverButton"
"text": "never"
"font": #SwingDerivedFont2
"$buttonGroup": new FormReference( "tabsPopupPolicyButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabsPopupPolicyChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
@@ -577,16 +577,16 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "underlinedTabTypeButton"
"text": "underlined"
"font": &SwingDerivedFont8 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"selected": true
"$buttonGroup": new FormReference( "tabTypeButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabTypeChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "cardTabTypeButton"
"text": "card"
"font": #SwingDerivedFont8
"$buttonGroup": new FormReference( "tabTypeButtonGroup" )
"$client.FlatLaf.styleClass": "small"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabTypeChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
@@ -597,7 +597,7 @@ new FormModel {
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 1075, 895 )
"size": new java.awt.Dimension( 1145, 895 )
} )
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
name: "tabPlacementButtonGroup"

View File

@@ -16,6 +16,7 @@
package com.formdev.flatlaf.extras.components;
import static com.formdev.flatlaf.FlatClientProperties.STYLE_CLASS;
import javax.swing.JLabel;
/**
@@ -26,6 +27,24 @@ import javax.swing.JLabel;
*/
public class FlatLabel
extends JLabel
implements FlatStyleableComponent
implements FlatComponentExtension, FlatStyleableComponent
{
// NOTE: enum names must be equal to typography/font styles
public enum LabelType { h00, h0, h1, h2, h3, h4, large, regular, medium, small, mini, monospaced }
/**
* Returns type of the label.
*/
public LabelType getLabelType() {
return getClientPropertyEnumString( STYLE_CLASS, LabelType.class, null, LabelType.regular );
}
/**
* Specifies type of the label.
*/
public void setLabelType( LabelType labelType ) {
if( labelType == LabelType.regular )
labelType = null;
putClientPropertyEnumString( STYLE_CLASS, labelType );
}
}

View File

@@ -1,20 +1,46 @@
- Java 1.8.0_202
+ Java 1.8.0_292
- OS Windows 10
+ OS Mac OS X
#---- ComboBox ----
+ ComboBox.showPopupOnNavigation true
#---- FileChooser ----
- FileChooser.useSystemExtensionHiding true
+ FileChooser.useSystemExtensionHiding false
#---- Menu ----
- Menu.shortcutKeys length=1 [I
[0] 8
+ Menu.shortcutKeys length=1 [I
[0] 10
#---- MenuItem ----
- MenuItem.acceleratorDelimiter -
+ MenuItem.acceleratorDelimiter
#---- OptionPane ----
+ OptionPane.isYesLast true
#---- ProgressBar ----
- 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] Helvetica Neue plain 11 javax.swing.plaf.FontUIResource [UI]
#---- ScrollBar ----
- ScrollBar.hoverThumbWithTrack false
+ ScrollBar.hoverThumbWithTrack true
@@ -27,7 +53,93 @@
- 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 .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ defaultFont Helvetica Neue plain 13 javax.swing.plaf.FontUIResource [UI]
#---- h0 ----
- h0.font [active] Segoe UI plain 30 javax.swing.plaf.FontUIResource [UI]
+ h0.font [active] Helvetica Neue plain 31 javax.swing.plaf.FontUIResource [UI]
#---- h00 ----
- h00.font [active] Segoe UI plain 36 javax.swing.plaf.FontUIResource [UI]
+ h00.font [active] Helvetica Neue plain 37 javax.swing.plaf.FontUIResource [UI]
#---- h1 ----
- h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
+ h1.font [active] HelveticaNeue-Medium plain 25 javax.swing.plaf.FontUIResource [UI]
- h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
+ h1.regular.font [active] Helvetica Neue plain 25 javax.swing.plaf.FontUIResource [UI]
#---- h2 ----
- h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
+ h2.font [active] HelveticaNeue-Medium plain 19 javax.swing.plaf.FontUIResource [UI]
- h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
+ h2.regular.font [active] Helvetica Neue plain 19 javax.swing.plaf.FontUIResource [UI]
#---- h3 ----
- h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
+ h3.font [active] HelveticaNeue-Medium plain 16 javax.swing.plaf.FontUIResource [UI]
- h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
+ h3.regular.font [active] Helvetica Neue plain 16 javax.swing.plaf.FontUIResource [UI]
#---- h4 ----
- h4.font [active] Segoe UI bold 12 javax.swing.plaf.FontUIResource [UI]
+ h4.font [active] Helvetica Neue bold 13 javax.swing.plaf.FontUIResource [UI]
#---- large ----
- large.font [active] Segoe UI plain 14 javax.swing.plaf.FontUIResource [UI]
+ large.font [active] Helvetica Neue plain 15 javax.swing.plaf.FontUIResource [UI]
#---- light ----
- light.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
+ light.font [active] HelveticaNeue-Thin plain 13 javax.swing.plaf.FontUIResource [UI]
#---- medium ----
- medium.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
+ medium.font [active] Helvetica Neue plain 12 javax.swing.plaf.FontUIResource [UI]
#---- mini ----
- mini.font [active] Segoe UI plain 9 javax.swing.plaf.FontUIResource [UI]
+ mini.font [active] Helvetica Neue plain 10 javax.swing.plaf.FontUIResource [UI]
#---- monospaced ----
- monospaced.font [active] Consolas plain 12 javax.swing.plaf.FontUIResource [UI]
+ monospaced.font [active] Menlo plain 13 javax.swing.plaf.FontUIResource [UI]
#---- semibold ----
- semibold.font [active] Segoe UI Semibold plain 12 javax.swing.plaf.FontUIResource [UI]
+ semibold.font [active] HelveticaNeue-Medium plain 13 javax.swing.plaf.FontUIResource [UI]
#---- small ----
- small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ small.font [active] Helvetica Neue plain 11 javax.swing.plaf.FontUIResource [UI]

View File

@@ -1386,6 +1386,26 @@ Viewport.foreground #bbbbbb HSL 0 0 73 javax.swing.plaf.Colo
ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
#---- [style] ----
[style].h00 font: $h00.font
[style].h0 font: $h0.font
[style].h1.regular font: $h1.regular.font
[style].h1 font: $h1.font
[style].h2.regular font: $h2.regular.font
[style].h2 font: $h2.font
[style].h3.regular font: $h3.regular.font
[style].h3 font: $h3.font
[style].h4 font: $h4.font
[style].large font: $large.font
[style].light font: $light.font
[style].medium font: $medium.font
[style].mini font: $mini.font
[style].monospaced font: $monospaced.font
[style].semibold font: $semibold.font
[style].small font: $small.font
#---- ----
activeCaption #434e60 HSL 217 18 32 javax.swing.plaf.ColorUIResource [UI]
@@ -1401,6 +1421,39 @@ defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResou
desktop #46494b HSL 204 3 28 javax.swing.plaf.ColorUIResource [UI]
#---- h0 ----
h0.font [active] Segoe UI plain 30 javax.swing.plaf.FontUIResource [UI]
#---- h00 ----
h00.font [active] Segoe UI plain 36 javax.swing.plaf.FontUIResource [UI]
#---- h1 ----
h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
#---- h2 ----
h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
#---- h3 ----
h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
#---- h4 ----
h4.font [active] Segoe UI bold 12 javax.swing.plaf.FontUIResource [UI]
#---- html ----
html.missingImage [lazy] 38,38 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
@@ -1422,13 +1475,52 @@ laf.dark true
laf.scaleFactor [active] 1.0
#---- large ----
large.font [active] Segoe UI plain 14 javax.swing.plaf.FontUIResource [UI]
#---- light ----
light.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
#---- medium ----
medium.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
#---- ----
menu #3c3f41 HSL 204 4 25 javax.swing.plaf.ColorUIResource [UI]
menuText #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
#---- mini ----
mini.font [active] Segoe UI plain 9 javax.swing.plaf.FontUIResource [UI]
#---- monospaced ----
monospaced.font [active] Consolas plain 12 javax.swing.plaf.FontUIResource [UI]
#---- ----
scrollbar #3e4244 HSL 200 5 25 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1%)
#---- semibold ----
semibold.font [active] Segoe UI Semibold plain 12 javax.swing.plaf.FontUIResource [UI]
#---- small ----
small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
#---- swingx/TaskPane ----
swingx/TaskPaneUI com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI

View File

@@ -1,20 +1,46 @@
- Java 1.8.0_202
+ Java 1.8.0_292
- OS Windows 10
+ OS Mac OS X
#---- ComboBox ----
+ ComboBox.showPopupOnNavigation true
#---- FileChooser ----
- FileChooser.useSystemExtensionHiding true
+ FileChooser.useSystemExtensionHiding false
#---- Menu ----
- Menu.shortcutKeys length=1 [I
[0] 8
+ Menu.shortcutKeys length=1 [I
[0] 10
#---- MenuItem ----
- MenuItem.acceleratorDelimiter -
+ MenuItem.acceleratorDelimiter
#---- OptionPane ----
+ OptionPane.isYesLast true
#---- ProgressBar ----
- 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] Helvetica Neue plain 11 javax.swing.plaf.FontUIResource [UI]
#---- ScrollBar ----
- ScrollBar.hoverThumbWithTrack false
+ ScrollBar.hoverThumbWithTrack true
@@ -27,7 +53,93 @@
- 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 .SF NS Text plain 13 javax.swing.plaf.FontUIResource [UI]
+ defaultFont Helvetica Neue plain 13 javax.swing.plaf.FontUIResource [UI]
#---- h0 ----
- h0.font [active] Segoe UI plain 30 javax.swing.plaf.FontUIResource [UI]
+ h0.font [active] Helvetica Neue plain 31 javax.swing.plaf.FontUIResource [UI]
#---- h00 ----
- h00.font [active] Segoe UI plain 36 javax.swing.plaf.FontUIResource [UI]
+ h00.font [active] Helvetica Neue plain 37 javax.swing.plaf.FontUIResource [UI]
#---- h1 ----
- h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
+ h1.font [active] HelveticaNeue-Medium plain 25 javax.swing.plaf.FontUIResource [UI]
- h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
+ h1.regular.font [active] Helvetica Neue plain 25 javax.swing.plaf.FontUIResource [UI]
#---- h2 ----
- h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
+ h2.font [active] HelveticaNeue-Medium plain 19 javax.swing.plaf.FontUIResource [UI]
- h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
+ h2.regular.font [active] Helvetica Neue plain 19 javax.swing.plaf.FontUIResource [UI]
#---- h3 ----
- h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
+ h3.font [active] HelveticaNeue-Medium plain 16 javax.swing.plaf.FontUIResource [UI]
- h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
+ h3.regular.font [active] Helvetica Neue plain 16 javax.swing.plaf.FontUIResource [UI]
#---- h4 ----
- h4.font [active] Segoe UI bold 12 javax.swing.plaf.FontUIResource [UI]
+ h4.font [active] Helvetica Neue bold 13 javax.swing.plaf.FontUIResource [UI]
#---- large ----
- large.font [active] Segoe UI plain 14 javax.swing.plaf.FontUIResource [UI]
+ large.font [active] Helvetica Neue plain 15 javax.swing.plaf.FontUIResource [UI]
#---- light ----
- light.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
+ light.font [active] HelveticaNeue-Thin plain 13 javax.swing.plaf.FontUIResource [UI]
#---- medium ----
- medium.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
+ medium.font [active] Helvetica Neue plain 12 javax.swing.plaf.FontUIResource [UI]
#---- mini ----
- mini.font [active] Segoe UI plain 9 javax.swing.plaf.FontUIResource [UI]
+ mini.font [active] Helvetica Neue plain 10 javax.swing.plaf.FontUIResource [UI]
#---- monospaced ----
- monospaced.font [active] Consolas plain 12 javax.swing.plaf.FontUIResource [UI]
+ monospaced.font [active] Menlo plain 13 javax.swing.plaf.FontUIResource [UI]
#---- semibold ----
- semibold.font [active] Segoe UI Semibold plain 12 javax.swing.plaf.FontUIResource [UI]
+ semibold.font [active] HelveticaNeue-Medium plain 13 javax.swing.plaf.FontUIResource [UI]
#---- small ----
- small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ small.font [active] Helvetica Neue plain 11 javax.swing.plaf.FontUIResource [UI]

View File

@@ -1391,6 +1391,26 @@ Viewport.foreground #000000 HSL 0 0 0 javax.swing.plaf.Colo
ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
#---- [style] ----
[style].h00 font: $h00.font
[style].h0 font: $h0.font
[style].h1.regular font: $h1.regular.font
[style].h1 font: $h1.font
[style].h2.regular font: $h2.regular.font
[style].h2 font: $h2.font
[style].h3.regular font: $h3.regular.font
[style].h3 font: $h3.font
[style].h4 font: $h4.font
[style].large font: $large.font
[style].light font: $light.font
[style].medium font: $medium.font
[style].mini font: $mini.font
[style].monospaced font: $monospaced.font
[style].semibold font: $semibold.font
[style].small font: $small.font
#---- ----
activeCaption #99b4d1 HSL 211 38 71 javax.swing.plaf.ColorUIResource [UI]
@@ -1406,6 +1426,39 @@ defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResou
desktop #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
#---- h0 ----
h0.font [active] Segoe UI plain 30 javax.swing.plaf.FontUIResource [UI]
#---- h00 ----
h00.font [active] Segoe UI plain 36 javax.swing.plaf.FontUIResource [UI]
#---- h1 ----
h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
#---- h2 ----
h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
#---- h3 ----
h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
#---- h4 ----
h4.font [active] Segoe UI bold 12 javax.swing.plaf.FontUIResource [UI]
#---- html ----
html.missingImage [lazy] 38,38 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
@@ -1427,13 +1480,52 @@ laf.dark false
laf.scaleFactor [active] 1.0
#---- large ----
large.font [active] Segoe UI plain 14 javax.swing.plaf.FontUIResource [UI]
#---- light ----
light.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
#---- medium ----
medium.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
#---- ----
menu #f2f2f2 HSL 0 0 95 javax.swing.plaf.ColorUIResource [UI]
menuText #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
#---- mini ----
mini.font [active] Segoe UI plain 9 javax.swing.plaf.FontUIResource [UI]
#---- monospaced ----
monospaced.font [active] Consolas plain 12 javax.swing.plaf.FontUIResource [UI]
#---- ----
scrollbar #f5f5f5 HSL 0 0 96 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1%)
#---- semibold ----
semibold.font [active] Segoe UI Semibold plain 12 javax.swing.plaf.FontUIResource [UI]
#---- small ----
small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
#---- swingx/TaskPane ----
swingx/TaskPaneUI com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI

View File

@@ -1405,6 +1405,26 @@ Viewport.foreground #ff0000 HSL 0 100 50 javax.swing.plaf.Colo
ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
#---- [style] ----
[style].h00 font: $h00.font
[style].h0 font: $h0.font
[style].h1.regular font: $h1.regular.font
[style].h1 font: $h1.font
[style].h2.regular font: $h2.regular.font
[style].h2 font: $h2.font
[style].h3.regular font: $h3.regular.font
[style].h3 font: $h3.font
[style].h4 font: $h4.font
[style].large font: $large.font
[style].light font: $light.font
[style].medium font: $medium.font
[style].mini font: $mini.font
[style].monospaced font: $monospaced.font
[style].semibold font: $semibold.font
[style].small font: $small.font
#---- ----
activeCaption #99b4d1 HSL 211 38 71 javax.swing.plaf.ColorUIResource [UI]
@@ -1420,6 +1440,39 @@ defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResou
desktop #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
#---- h0 ----
h0.font [active] Segoe UI plain 30 javax.swing.plaf.FontUIResource [UI]
#---- h00 ----
h00.font [active] Segoe UI plain 36 javax.swing.plaf.FontUIResource [UI]
#---- h1 ----
h1.font [active] Segoe UI Semibold plain 24 javax.swing.plaf.FontUIResource [UI]
h1.regular.font [active] Segoe UI plain 24 javax.swing.plaf.FontUIResource [UI]
#---- h2 ----
h2.font [active] Segoe UI Semibold plain 18 javax.swing.plaf.FontUIResource [UI]
h2.regular.font [active] Segoe UI plain 18 javax.swing.plaf.FontUIResource [UI]
#---- h3 ----
h3.font [active] Segoe UI Semibold plain 15 javax.swing.plaf.FontUIResource [UI]
h3.regular.font [active] Segoe UI plain 15 javax.swing.plaf.FontUIResource [UI]
#---- h4 ----
h4.font [active] Segoe UI bold 12 javax.swing.plaf.FontUIResource [UI]
#---- html ----
html.missingImage [lazy] 38,38 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
@@ -1441,13 +1494,52 @@ laf.dark false
laf.scaleFactor [active] 1.0
#---- large ----
large.font [active] Segoe UI plain 14 javax.swing.plaf.FontUIResource [UI]
#---- light ----
light.font [active] Segoe UI Light plain 12 javax.swing.plaf.FontUIResource [UI]
#---- medium ----
medium.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
#---- ----
menu #ccffcc HSL 120 100 90 javax.swing.plaf.ColorUIResource [UI]
menuText #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
#---- mini ----
mini.font [active] Segoe UI plain 9 javax.swing.plaf.FontUIResource [UI]
#---- monospaced ----
monospaced.font [active] Consolas plain 12 javax.swing.plaf.FontUIResource [UI]
#---- ----
scrollbar #88ff88 HSL 120 100 77 javax.swing.plaf.ColorUIResource [UI]
#---- semibold ----
semibold.font [active] Segoe UI Semibold plain 12 javax.swing.plaf.FontUIResource [UI]
#---- small ----
small.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
#---- swingx/TaskPane ----
swingx/TaskPaneUI com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI

View File

@@ -198,17 +198,17 @@ public class FlatComponentStateTest
//---- label11 ----
label11.setText("JButton");
label11.setFont(label11.getFont().deriveFont(label11.getFont().getSize() + 4f));
label11.putClientProperty("FlatLaf.styleClass", "h3");
add(label11, "cell 1 0 2 1");
//---- label12 ----
label12.setText("JToggleButton");
label12.setFont(label12.getFont().deriveFont(label12.getFont().getSize() + 4f));
label12.putClientProperty("FlatLaf.styleClass", "h3");
add(label12, "cell 5 0 3 1");
//---- label32 ----
label32.setText("Help Button");
label32.setFont(label32.getFont().deriveFont(label32.getFont().getSize() + 4f));
label32.putClientProperty("FlatLaf.styleClass", "h3");
add(label32, "cell 9 0 2 1");
//---- label5 ----
@@ -513,12 +513,12 @@ public class FlatComponentStateTest
//---- label22 ----
label22.setText("JCheckBox");
label22.setFont(label22.getFont().deriveFont(label22.getFont().getSize() + 4f));
label22.putClientProperty("FlatLaf.styleClass", "h3");
add(label22, "cell 1 8 2 1");
//---- label27 ----
label27.setText("JRadioButton");
label27.setFont(label27.getFont().deriveFont(label27.getFont().getSize() + 4f));
label27.putClientProperty("FlatLaf.styleClass", "h3");
add(label27, "cell 5 8 2 1");
//---- label23 ----

View File

@@ -12,21 +12,21 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label11"
"text": "JButton"
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label12"
"text": "JToggleButton"
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 0 3 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label32"
"text": "Help Button"
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 0 2 1"
} )
@@ -447,14 +447,14 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label22"
"text": "JCheckBox"
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 8 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label27"
"text": "JRadioButton"
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 8 2 1"
} )

View File

@@ -0,0 +1,242 @@
/*
* Copyright 2021 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.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.GraphicsEnvironment;
import java.util.Map;
import java.util.TreeMap;
import javax.swing.*;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.swing.*;
/**
* @author Karl Tauber
*/
public class FlatFontsTest
extends JPanel
{
public static void main( String[] args ) {
SwingUtilities.invokeLater( () -> {
FlatTestFrame frame = FlatTestFrame.create( args, "FlatFontsTest" );
frame.showFrame( FlatFontsTest::new );
} );
}
FlatFontsTest() {
initComponents();
Font[] allFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
TreeMap<String, TreeMap<String, Font>> familiesMap = new TreeMap<>();
for( Font font : allFonts ) {
TreeMap<String, Font> familyFontsMap = familiesMap.computeIfAbsent( font.getFamily(), key -> new TreeMap<>() );
Font old = familyFontsMap.put( font.getName(), font );
if( old != null ) {
System.err.println( "Duplicate font name '" + font.getName() + "'" );
System.err.println( " " + old );
System.err.println( " " + font );
}
}
DefaultListModel<FontFamilyInfo> model = new DefaultListModel<>();
for( Map.Entry<String, TreeMap<String, Font>> e : familiesMap.entrySet() ) {
FontFamilyInfo info = new FontFamilyInfo();
info.name = e.getKey();
info.fonts = e.getValue();
model.addElement( info );
}
familiesList.setModel( model );
familiesList.setCellRenderer( new FontFamilyRenderer() );
familiesList.setSelectedIndex( 0 );
SwingUtilities.invokeLater( () -> {
SwingUtilities.invokeLater( () -> {
familiesList.requestFocusInWindow();
} );
} );
}
private void familyChanged() {
previewFamilyNameLabel.setText( "" );
previewPanel.removeAll();
FontFamilyInfo info = familiesList.getSelectedValue();
if( info == null )
return;
previewFamilyNameLabel.setText( info.name );
for( Map.Entry<String, Font> e : info.fonts.entrySet() ) {
JLabel label = new JLabel( e.getKey() );
label.setFont( e.getValue().deriveFont( (float) UIScale.scale( 36 ) ) );
previewPanel.add( label, "wrap" );
}
previewPanel.revalidate();
previewPanel.repaint();
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
JLabel familiesLabel = new JLabel();
previewFamilyNameLabel = new JLabel();
JScrollPane familiesScrollPane = new JScrollPane();
familiesList = new JList<>();
JSeparator separator1 = new JSeparator();
JScrollPane scrollPane1 = new JScrollPane();
previewPanel = new JPanel();
//======== this ========
setBorder(null);
setLayout(new MigLayout(
"insets dialog,hidemode 3",
// columns
"[230:230,fill]para" +
"[grow,fill]",
// rows
"[top]" +
"[]" +
"[]" +
"[800,grow,fill]"));
//---- familiesLabel ----
familiesLabel.setText("Families:");
add(familiesLabel, "cell 0 0");
//---- previewFamilyNameLabel ----
previewFamilyNameLabel.setText("name");
previewFamilyNameLabel.putClientProperty("FlatLaf.styleClass", "h1");
add(previewFamilyNameLabel, "cell 1 1");
//======== familiesScrollPane ========
{
//---- familiesList ----
familiesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
familiesList.addListSelectionListener(e -> familyChanged());
familiesScrollPane.setViewportView(familiesList);
}
add(familiesScrollPane, "cell 0 1 1 3,growy");
add(separator1, "cell 1 2");
//======== scrollPane1 ========
{
scrollPane1.setBorder(BorderFactory.createEmptyBorder());
//======== previewPanel ========
{
previewPanel.setLayout(new MigLayout(
"insets dialog,hidemode 3",
// columns
"[fill]",
// rows
"[]"));
}
scrollPane1.setViewportView(previewPanel);
}
add(scrollPane1, "cell 1 3");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JLabel previewFamilyNameLabel;
private JList<FontFamilyInfo> familiesList;
private JPanel previewPanel;
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class FontFamilyInfo -----------------------------------------------
private static class FontFamilyInfo
{
String name;
TreeMap<String, Font> fonts;
}
//---- class FontFamilyRenderer -------------------------------------------
private static class FontFamilyRenderer
extends JPanel
implements ListCellRenderer<FontFamilyInfo>
{
private FontFamilyRenderer() {
initComponents();
}
@Override
public Component getListCellRendererComponent( JList<? extends FontFamilyInfo> list,
FontFamilyInfo value, int index, boolean isSelected, boolean cellHasFocus )
{
String family = value.name;
StringBuilder buf = new StringBuilder();
for( String key : value.fonts.keySet() ) {
if( key.startsWith( family ) ) {
key = key.substring( family.length() ).trim();
if( key.isEmpty() )
key = "Regular";
}
if( buf.length() > 0 )
buf.append( ", " );
buf.append( key );
}
familyNameLabel.setText( family );
familyDescriptionLabel.setText( buf.toString() );
familyNameLabel.setFont( UIManager.getFont( "large.font" ) );
familyDescriptionLabel.setFont( UIManager.getFont( "small.font" ) );
familyDescriptionLabel.setEnabled( isSelected );
setBackground( isSelected ? list.getSelectionBackground() : list.getBackground() );
Color fg = isSelected ? list.getSelectionForeground() : list.getForeground();
familyNameLabel.setForeground( fg );
familyDescriptionLabel.setForeground( fg );
return this;
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
familyNameLabel = new JLabel();
familyDescriptionLabel = new JLabel();
//======== this ========
setLayout(new MigLayout(
"insets 2 6 2 6,hidemode 3",
// columns
"[fill]",
// rows
"[]0" +
"[]"));
//---- familyNameLabel ----
familyNameLabel.setText("text");
add(familyNameLabel, "cell 0 0");
//---- familyDescriptionLabel ----
familyDescriptionLabel.setText("text");
add(familyDescriptionLabel, "cell 0 1");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JLabel familyNameLabel;
private JLabel familyDescriptionLabel;
// JFormDesigner - End of variables declaration //GEN-END:variables
}
}

View File

@@ -0,0 +1,103 @@
JFDML JFormDesigner: "7.0.5.0.382" Java: "16" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
auxiliary() {
"JavaCodeGenerator.defaultVariableLocal": true
}
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog,hidemode 3"
"$columnConstraints": "[230:230,fill]para[grow,fill]"
"$rowConstraints": "[top][][][800,grow,fill]"
} ) {
name: "this"
"border": sfield com.jformdesigner.model.FormObject NULL_VALUE
add( new FormComponent( "javax.swing.JLabel" ) {
name: "familiesLabel"
"text": "Families:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "previewFamilyNameLabel"
"text": "name"
"$client.FlatLaf.styleClass": "h1"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "familiesScrollPane"
add( new FormComponent( "javax.swing.JList" ) {
name: "familiesList"
"selectionMode": 0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
"JavaCodeGenerator.typeParameters": "FontFamilyInfo"
}
addEvent( new FormEvent( "javax.swing.event.ListSelectionListener", "valueChanged", "familyChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1 1 3,growy"
} )
add( new FormComponent( "javax.swing.JSeparator" ) {
name: "separator1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane1"
"border": new javax.swing.border.EmptyBorder( 0, 0, 0, 0 )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog,hidemode 3"
"$columnConstraints": "[fill]"
"$rowConstraints": "[]"
} ) {
name: "previewPanel"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 450, 300 )
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 2 6 2 6,hidemode 3"
"$columnConstraints": "[fill]"
"$rowConstraints": "[]0[]"
} ) {
name: "panel1"
auxiliary() {
"JavaCodeGenerator.className": "FontFamilyRenderer"
}
add( new FormComponent( "javax.swing.JLabel" ) {
name: "familyNameLabel"
"text": "text"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "familyDescriptionLabel"
"text": "text"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 330 )
"size": new java.awt.Dimension( 255, 105 )
} )
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,6 @@ import java.awt.Cursor;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.Insets;
@@ -52,6 +51,7 @@ import java.util.prefs.Preferences;
import javax.lang.model.SourceVersion;
import javax.swing.*;
import net.miginfocom.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatDarculaLaf;
import com.formdev.flatlaf.FlatDarkLaf;
import com.formdev.flatlaf.FlatIntelliJLaf;
@@ -754,8 +754,7 @@ class FlatThemeFileEditor
private void about() {
JLabel titleLabel = new JLabel( "FlatLaf Theme Editor" );
Font titleFont = titleLabel.getFont();
titleLabel.setFont( titleFont.deriveFont( (float) titleFont.getSize() + UIScale.scale( 6 ) ) );
titleLabel.putClientProperty( FlatClientProperties.STYLE_CLASS, "h1" );
String link = "https://www.formdev.com/flatlaf/";
JLabel linkLabel = new JLabel( "<html><a href=\"#\">" + link + "</a></html>" );

View File

@@ -46,6 +46,7 @@ class FlatThemePreview
private final FlatThemePreviewAll allTab;
private final FlatThemePreviewButtons buttonsTab;
private final FlatThemePreviewSwitches switchesTab;
private final FlatThemePreviewFonts fontsTab;
private final Map<LazyValue, Object> lazyValueCache = new WeakHashMap<>();
private int runWithUIDefaultsGetterLevel;
@@ -61,9 +62,11 @@ class FlatThemePreview
allTab = new FlatThemePreviewAll( this );
buttonsTab = new FlatThemePreviewButtons( this );
switchesTab = new FlatThemePreviewSwitches( this );
fontsTab = new FlatThemePreviewFonts();
tabbedPane.addTab( "All", createPreviewTab( allTab ) );
tabbedPane.addTab( "Buttons", createPreviewTab( buttonsTab ) );
tabbedPane.addTab( "Switches", createPreviewTab( switchesTab ) );
tabbedPane.addTab( "Fonts", createPreviewTab( fontsTab ) );
selectRecentTab();
tabbedPane.addChangeListener( e -> selectedTabChanged() );
@@ -175,7 +178,8 @@ class FlatThemePreview
Object value = textArea.propertiesSupport.getParsedProperty( (String) key );
inGetDefaultFont = "defaultFont".equals( key );
boolean isDefaultFont = "defaultFont".equals( key );
inGetDefaultFont = isDefaultFont;
try {
if( value instanceof LazyValue ) {
value = lazyValueCache.computeIfAbsent( (LazyValue) value, k -> {
@@ -189,6 +193,12 @@ class FlatThemePreview
// System.out.println( key + " = " + value );
// for "defaultFont" never return a value that is not a font
// (e.g. a color for "defaultFont = #fff") to avoid StackOverflowError
// in Active.createValue()
if( isDefaultFont && !(value instanceof Font) )
return null;
// If value is null and is a property that is defined in a core theme,
// then force the value to null.
// This is necessary for cases where the current application Laf defines a property
@@ -196,7 +206,7 @@ class FlatThemePreview
// E.g. FlatLightLaf defines Button.focusedBackground, but in FlatDarkLaf
// it is not defined. Without this code, the preview for FlatDarkLaf would use
// Button.focusedBackground from FlatLightLaf if FlatLightLaf is the current application Laf.
if( value == null && FlatThemePropertiesBaseManager.getDefindedCoreKeys().contains( key ) && !"defaultFont".equals( key ) )
if( value == null && FlatThemePropertiesBaseManager.getDefindedCoreKeys().contains( key ) && !isDefaultFont )
return FlatLaf.NULL_VALUE;
return value;
@@ -215,6 +225,7 @@ class FlatThemePreview
{
tabbedPane.setLeadingComponent(previewLabel);
tabbedPane.setTabAreaAlignment(FlatTabbedPane.TabAreaAlignment.trailing);
tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
}
add(tabbedPane, BorderLayout.CENTER);
@@ -223,8 +234,8 @@ class FlatThemePreview
add(previewSeparator, BorderLayout.LINE_START);
//---- previewLabel ----
previewLabel.setText(" Preview ");
previewLabel.setFont(previewLabel.getFont().deriveFont(previewLabel.getFont().getSize() + 6f));
previewLabel.setText(" Preview ");
previewLabel.putClientProperty("FlatLaf.styleClass", "h2");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}

View File

@@ -9,6 +9,7 @@ new FormModel {
name: "tabbedPane"
"leadingComponent": new FormReference( "previewLabel" )
"tabAreaAlignment": enum com.formdev.flatlaf.extras.components.FlatTabbedPane$TabAreaAlignment trailing
"tabLayoutPolicy": 1
}, new FormLayoutConstraints( class java.lang.String ) {
"value": "Center"
} )
@@ -24,8 +25,8 @@ new FormModel {
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "previewLabel"
"text": " Preview "
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, 6, false )
"text": " Preview "
"$client.FlatLaf.styleClass": "h2"
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 235 )
"size": new java.awt.Dimension( 176, 24 )

View File

@@ -560,7 +560,7 @@ class FlatThemePreviewAll
menuUnderlineSelectionButton.setButtonType(FlatButton.ButtonType.toolBarButton);
menuUnderlineSelectionButton.setToolTipText("menu underline selection");
menuUnderlineSelectionButton.setFocusable(false);
menuUnderlineSelectionButton.setFont(menuUnderlineSelectionButton.getFont().deriveFont(menuUnderlineSelectionButton.getFont().getSize() - 2f));
menuUnderlineSelectionButton.putClientProperty("FlatLaf.styleClass", "small");
menuUnderlineSelectionButton.addActionListener(e -> menuUnderlineSelectionChanged());
add(menuUnderlineSelectionButton, "cell 0 11");

View File

@@ -307,7 +307,7 @@ new FormModel {
"buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType toolBarButton
"toolTipText": "menu underline selection"
"focusable": false
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}

View File

@@ -232,25 +232,25 @@ class FlatThemePreviewButtons
//---- noneButton ----
noneButton.setText("none");
noneButton.setSelected(true);
noneButton.setFont(noneButton.getFont().deriveFont(noneButton.getFont().getSize() - 2f));
noneButton.putClientProperty("FlatLaf.styleClass", "small");
noneButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(noneButton);
//---- squareButton ----
squareButton.setText("square");
squareButton.setFont(squareButton.getFont().deriveFont(squareButton.getFont().getSize() - 2f));
squareButton.putClientProperty("FlatLaf.styleClass", "small");
squareButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(squareButton);
//---- roundRectButton ----
roundRectButton.setText("roundRect");
roundRectButton.setFont(roundRectButton.getFont().deriveFont(roundRectButton.getFont().getSize() - 2f));
roundRectButton.putClientProperty("FlatLaf.styleClass", "small");
roundRectButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(roundRectButton);
//---- tabButton ----
tabButton.setText("tab");
tabButton.setFont(tabButton.getFont().deriveFont(tabButton.getFont().getSize() - 2f));
tabButton.putClientProperty("FlatLaf.styleClass", "small");
tabButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(tabButton);
}
@@ -263,13 +263,13 @@ class FlatThemePreviewButtons
//---- toolBarButtonButton ----
toolBarButtonButton.setText("toolBarButton");
toolBarButtonButton.setFont(toolBarButtonButton.getFont().deriveFont(toolBarButtonButton.getFont().getSize() - 2f));
toolBarButtonButton.putClientProperty("FlatLaf.styleClass", "small");
toolBarButtonButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar2.add(toolBarButtonButton);
//---- borderlessButton ----
borderlessButton.setText("borderless");
borderlessButton.setFont(borderlessButton.getFont().deriveFont(borderlessButton.getFont().getSize() - 2f));
borderlessButton.putClientProperty("FlatLaf.styleClass", "small");
borderlessButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar2.add(borderlessButton);
}
@@ -279,7 +279,7 @@ class FlatThemePreviewButtons
//---- label11 ----
label11.setText("JButton");
label11.setFont(label11.getFont().deriveFont(label11.getFont().getSize() + 4f));
label11.putClientProperty("FlatLaf.styleClass", "h3");
add(label11, "cell 0 1 3 1");
//---- label27 ----
@@ -292,22 +292,22 @@ class FlatThemePreviewButtons
//---- label5 ----
label5.setText("regular");
label5.setFont(label5.getFont().deriveFont(label5.getFont().getSize() - 2f));
label5.putClientProperty("FlatLaf.styleClass", "small");
add(label5, "cell 1 3,alignx center,growx 0");
//---- label7 ----
label7.setText("default");
label7.setFont(label7.getFont().deriveFont(label7.getFont().getSize() - 2f));
label7.putClientProperty("FlatLaf.styleClass", "small");
add(label7, "cell 2 3,alignx center,growx 0");
//---- label6 ----
label6.setText("regular");
label6.setFont(label6.getFont().deriveFont(label6.getFont().getSize() - 2f));
label6.putClientProperty("FlatLaf.styleClass", "small");
add(label6, "cell 3 3,alignx center,growx 0");
//---- label8 ----
label8.setText("default");
label8.setFont(label8.getFont().deriveFont(label8.getFont().getSize() - 2f));
label8.putClientProperty("FlatLaf.styleClass", "small");
add(label8, "cell 4 3,alignx center,growx 0");
//---- label1 ----
@@ -435,7 +435,7 @@ class FlatThemePreviewButtons
//---- label12 ----
label12.setText("JToggleButton");
label12.setFont(label12.getFont().deriveFont(label12.getFont().getSize() + 4f));
label12.putClientProperty("FlatLaf.styleClass", "h3");
add(label12, "cell 0 9 3 1");
//---- label29 ----
@@ -448,22 +448,22 @@ class FlatThemePreviewButtons
//---- label13 ----
label13.setText("unsel.");
label13.setFont(label13.getFont().deriveFont(label13.getFont().getSize() - 2f));
label13.putClientProperty("FlatLaf.styleClass", "small");
add(label13, "cell 1 11,alignx center,growx 0");
//---- label14 ----
label14.setText("selected");
label14.setFont(label14.getFont().deriveFont(label14.getFont().getSize() - 2f));
label14.putClientProperty("FlatLaf.styleClass", "small");
add(label14, "cell 2 11,alignx center,growx 0");
//---- label15 ----
label15.setText("unsel.");
label15.setFont(label15.getFont().deriveFont(label15.getFont().getSize() - 2f));
label15.putClientProperty("FlatLaf.styleClass", "small");
add(label15, "cell 3 11,alignx center,growx 0");
//---- label16 ----
label16.setText("selected");
label16.setFont(label16.getFont().deriveFont(label16.getFont().getSize() - 2f));
label16.putClientProperty("FlatLaf.styleClass", "small");
add(label16, "cell 4 11,alignx center,growx 0");
//---- label17 ----
@@ -576,7 +576,7 @@ class FlatThemePreviewButtons
//---- label32 ----
label32.setText("Help Button");
label32.setFont(label32.getFont().deriveFont(label32.getFont().getSize() + 4f));
label32.putClientProperty("FlatLaf.styleClass", "h3");
add(label32, "cell 0 17 2 1");
//---- label9 ----

View File

@@ -33,7 +33,7 @@ new FormModel {
"text": "none"
"$buttonGroup": new FormReference( "buttonGroup1" )
"selected": true
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -43,7 +43,7 @@ new FormModel {
name: "squareButton"
"text": "square"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -53,7 +53,7 @@ new FormModel {
name: "roundRectButton"
"text": "roundRect"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -63,7 +63,7 @@ new FormModel {
name: "tabButton"
"text": "tab"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -80,7 +80,7 @@ new FormModel {
name: "toolBarButtonButton"
"text": "toolBarButton"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -90,7 +90,7 @@ new FormModel {
name: "borderlessButton"
"text": "borderless"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -105,7 +105,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label11"
"text": "JButton"
"font": &SwingDerivedFont1 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1 3 1"
} )
@@ -124,28 +124,28 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label5"
"text": "regular"
"font": &SwingDerivedFont2 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label7"
"text": "default"
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 3,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label6"
"text": "regular"
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 3,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label8"
"text": "default"
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 3,alignx center,growx 0"
} )
@@ -317,7 +317,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label12"
"text": "JToggleButton"
"font": #SwingDerivedFont1
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 9 3 1"
} )
@@ -336,28 +336,28 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label13"
"text": "unsel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 11,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label14"
"text": "selected"
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 11,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label15"
"text": "unsel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 11,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label16"
"text": "selected"
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 11,alignx center,growx 0"
} )
@@ -514,7 +514,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label32"
"text": "Help Button"
"font": #SwingDerivedFont1
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 17 2 1"
} )

View File

@@ -0,0 +1,289 @@
/*
/*
* Copyright 2021 FormDev Software GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.formdev.flatlaf.themeeditor;
import java.awt.*;
import java.text.DecimalFormat;
import javax.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.swing.*;
/**
* @author Karl Tauber
*/
public class FlatThemePreviewFonts
extends JPanel
{
private static final DecimalFormat SCALE_FORMAT = new DecimalFormat( "0.##x" );
public FlatThemePreviewFonts() {
initComponents();
scaleValueLabel.setText( SCALE_FORMAT.format( UIScale.getUserScaleFactor() ) );
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
JLabel headingsLabel = new JLabel();
FlatThemePreviewFonts.FontPreview h00Preview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview h0Preview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview h1Preview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview h2Preview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview h3Preview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview h4Preview = new FlatThemePreviewFonts.FontPreview();
JLabel textLabel = new JLabel();
FlatThemePreviewFonts.FontPreview largePreview = new FlatThemePreviewFonts.FontPreview();
defaultPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview mediumPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview smallPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview miniPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview lightPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview semiboldPreview = new FlatThemePreviewFonts.FontPreview();
FlatThemePreviewFonts.FontPreview monospacedPreview = new FlatThemePreviewFonts.FontPreview();
JLabel scaleLabel = new JLabel();
scaleValueLabel = new JLabel();
//======== this ========
setLayout(new MigLayout(
"ltr,insets dialog,hidemode 3",
// columns
"[left]unrel",
// rows
"[]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[bottom]para" +
"[]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[bottom]para" +
"[]" +
"[]para" +
"[]para" +
"[]"));
//---- headingsLabel ----
headingsLabel.setText("Headings");
headingsLabel.putClientProperty("FlatLaf.styleClass", "h3");
add(headingsLabel, "cell 0 0");
//---- h00Preview ----
h00Preview.setFontType("H00");
h00Preview.setFontStyle("h00");
add(h00Preview, "cell 0 1,gapx 12");
//---- h0Preview ----
h0Preview.setFontType("H0");
h0Preview.setFontStyle("h0");
add(h0Preview, "cell 0 2,gapx 12");
//---- h1Preview ----
h1Preview.setFontType("H1");
h1Preview.setFontStyle("h1");
h1Preview.setFontStyleRegular("h1.regular");
add(h1Preview, "cell 0 3,gapx 12");
//---- h2Preview ----
h2Preview.setFontType("H2");
h2Preview.setFontStyle("h2");
h2Preview.setFontStyleRegular("h2.regular");
add(h2Preview, "cell 0 4,gapx 12");
//---- h3Preview ----
h3Preview.setFontType("H3");
h3Preview.setFontStyle("h3");
h3Preview.setFontStyleRegular("h3.regular");
add(h3Preview, "cell 0 5,gapx 12");
//---- h4Preview ----
h4Preview.setFontType("H4");
h4Preview.setFontStyle("h4");
add(h4Preview, "cell 0 6,gapx 12");
//---- textLabel ----
textLabel.setText("Text");
textLabel.putClientProperty("FlatLaf.styleClass", "h3");
add(textLabel, "cell 0 7");
//---- largePreview ----
largePreview.setFontType("Large");
largePreview.setFontStyle("large");
add(largePreview, "cell 0 8,gapx 12");
//---- defaultPreview ----
defaultPreview.setFontType("Default");
add(defaultPreview, "cell 0 9,gapx 12");
//---- mediumPreview ----
mediumPreview.setFontType("Medium");
mediumPreview.setFontStyle("medium");
add(mediumPreview, "cell 0 10,gapx 12");
//---- smallPreview ----
smallPreview.setFontType("Small");
smallPreview.setFontStyle("small");
add(smallPreview, "cell 0 11,gapx 12");
//---- miniPreview ----
miniPreview.setFontType("Mini");
miniPreview.setFontStyle("mini");
add(miniPreview, "cell 0 12,gapx 12");
//---- lightPreview ----
lightPreview.setFontType("Light");
lightPreview.setFontStyle("light");
add(lightPreview, "cell 0 13,gapx 12");
//---- semiboldPreview ----
semiboldPreview.setFontType("Semibold");
semiboldPreview.setFontStyle("semibold");
add(semiboldPreview, "cell 0 14,gapx 12");
//---- monospacedPreview ----
monospacedPreview.setFontType("Monospaced");
monospacedPreview.setFontStyle("monospaced");
add(monospacedPreview, "cell 0 15,gapx 12");
//---- scaleLabel ----
scaleLabel.setText("Fonts in preview are scaled by:");
add(scaleLabel, "cell 0 16,gapx 12");
//---- scaleValueLabel ----
scaleValueLabel.setText("1x");
scaleValueLabel.putClientProperty("FlatLaf.styleClass", "h2");
add(scaleValueLabel, "cell 0 16");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private FlatThemePreviewFonts.FontPreview defaultPreview;
private JLabel scaleValueLabel;
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class FontPreview --------------------------------------------------
static class FontPreview
extends JPanel
{
private String fontType;
private String fontStyle;
private String fontStyleRegular;
private FontPreview() {
initComponents();
updateDescription( previewLabel.getFont() );
previewLabel.addPropertyChangeListener( "font", e -> {
updateDescription( previewLabel.getFont() );
} );
preview2Label.setVisible( false );
}
public String getFontType() {
return fontType;
}
public void setFontType( String fontType ) {
this.fontType = fontType;
previewLabel.setText( fontType );
preview2Label.setText( " / " + fontType );
}
public String getFontStyle() {
return fontStyle;
}
public void setFontStyle( String fontStyle ) {
this.fontStyle = fontStyle;
previewLabel.putClientProperty( FlatClientProperties.STYLE_CLASS, fontStyle );
}
public String getFontStyleRegular() {
return fontStyleRegular;
}
public void setFontStyleRegular( String fontStyleRegular ) {
this.fontStyleRegular = fontStyleRegular;
preview2Label.putClientProperty( FlatClientProperties.STYLE_CLASS, fontStyleRegular );
preview2Label.setVisible( fontStyleRegular != null );
}
private void updateDescription( Font font ) {
int baseSize = getDefaultFont().getSize();
int fontSize = font.getSize();
descLabel.setText( String.format( "%s %d %s%s (%+d %s)",
font.getFamily(),
fontSize,
(font.getStyle() & Font.BOLD) != 0 ? " bold" : "",
(font.getStyle() & Font.ITALIC) != 0 ? " italic" : "",
fontSize - baseSize,
SCALE_FORMAT.format( (float) fontSize / baseSize ) ) );
}
private Font getDefaultFont() {
Font font = UIManager.getFont( "defaultFont" );
if( font == null )
font = UIManager.getFont( "Label.font" );
return font;
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
previewLabel = new JLabel();
preview2Label = new JLabel();
descLabel = new JLabel();
//======== this ========
setLayout(new MigLayout(
"insets 0,hidemode 3",
// columns
"[90,left]" +
"[fill]",
// rows
"[]0"));
//---- previewLabel ----
previewLabel.setText("preview");
add(previewLabel, "cell 0 0");
//---- preview2Label ----
preview2Label.setText("preview");
add(preview2Label, "cell 0 0,gapx 0");
//---- descLabel ----
descLabel.setText("description");
descLabel.putClientProperty("FlatLaf.styleClass", "medium");
add(descLabel, "cell 1 0");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JLabel previewLabel;
private JLabel preview2Label;
private JLabel descLabel;
// JFormDesigner - End of variables declaration //GEN-END:variables
}
}

View File

@@ -0,0 +1,195 @@
JFDML JFormDesigner: "7.0.5.0.382" Java: "16" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
auxiliary() {
"JavaCodeGenerator.defaultVariableLocal": true
}
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[left]unrel"
"$rowConstraints": "[][bottom][bottom][bottom][bottom][bottom][bottom]para[][bottom][bottom][bottom][bottom][bottom]para[][]para[]para[]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "headingsLabel"
"text": "Headings"
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "h00Preview"
"fontType": "H00"
"fontStyle": "h00"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "h0Preview"
"fontType": "H0"
"fontStyle": "h0"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "h1Preview"
"fontType": "H1"
"fontStyle": "h1"
"fontStyleRegular": "h1.regular"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "h2Preview"
"fontType": "H2"
"fontStyle": "h2"
"fontStyleRegular": "h2.regular"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 4,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "h3Preview"
"fontType": "H3"
"fontStyle": "h3"
"fontStyleRegular": "h3.regular"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 5,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "h4Preview"
"fontType": "H4"
"fontStyle": "h4"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 6,gapx 12"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "textLabel"
"text": "Text"
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "largePreview"
"fontType": "Large"
"fontStyle": "large"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 8,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "defaultPreview"
"fontType": "Default"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 9,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "mediumPreview"
"fontType": "Medium"
"fontStyle": "medium"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 10,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "smallPreview"
"fontType": "Small"
"fontStyle": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 11,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "miniPreview"
"fontType": "Mini"
"fontStyle": "mini"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 12,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "lightPreview"
"fontType": "Light"
"fontStyle": "light"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 13,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "semiboldPreview"
"fontType": "Semibold"
"fontStyle": "semibold"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 14,gapx 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewFonts$FontPreview" ) {
name: "monospacedPreview"
"fontType": "Monospaced"
"fontStyle": "monospaced"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 15,gapx 12"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "scaleLabel"
"text": "Fonts in preview are scaled by:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 16,gapx 12"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "scaleValueLabel"
"text": "1x"
"$client.FlatLaf.styleClass": "h2"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 16"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 5, 0 )
"size": new java.awt.Dimension( 335, 495 )
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[90,left][fill]"
"$rowConstraints": "[]0"
} ) {
name: "panel1"
auxiliary() {
"JavaCodeGenerator.className": "FontPreview"
"JavaCodeGenerator.variableName": "fontPreview"
}
add( new FormComponent( "javax.swing.JLabel" ) {
name: "previewLabel"
"text": "preview"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "preview2Label"
"text": "preview"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0,gapx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "descLabel"
"text": "description"
"$client.FlatLaf.styleClass": "medium"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 5, 545 )
"size": new java.awt.Dimension( 235, 65 )
} )
}
}

View File

@@ -262,25 +262,25 @@ class FlatThemePreviewSwitches
//---- zoom1xButton ----
zoom1xButton.setText("1x");
zoom1xButton.setSelected(true);
zoom1xButton.setFont(zoom1xButton.getFont().deriveFont(zoom1xButton.getFont().getSize() - 2f));
zoom1xButton.putClientProperty("FlatLaf.styleClass", "small");
zoom1xButton.addActionListener(e -> zoomChanged());
zoomToolBar.add(zoom1xButton);
//---- zoom2xButton ----
zoom2xButton.setText("2x");
zoom2xButton.setFont(zoom2xButton.getFont().deriveFont(zoom2xButton.getFont().getSize() - 2f));
zoom2xButton.putClientProperty("FlatLaf.styleClass", "small");
zoom2xButton.addActionListener(e -> zoomChanged());
zoomToolBar.add(zoom2xButton);
//---- zoom3xButton ----
zoom3xButton.setText("3x");
zoom3xButton.setFont(zoom3xButton.getFont().deriveFont(zoom3xButton.getFont().getSize() - 2f));
zoom3xButton.putClientProperty("FlatLaf.styleClass", "small");
zoom3xButton.addActionListener(e -> zoomChanged());
zoomToolBar.add(zoom3xButton);
//---- zoom4xButton ----
zoom4xButton.setText("4x");
zoom4xButton.setFont(zoom4xButton.getFont().deriveFont(zoom4xButton.getFont().getSize() - 2f));
zoom4xButton.putClientProperty("FlatLaf.styleClass", "small");
zoom4xButton.addActionListener(e -> zoomChanged());
zoomToolBar.add(zoom4xButton);
zoomToolBar.addSeparator();
@@ -288,6 +288,7 @@ class FlatThemePreviewSwitches
//---- indeterminateButton ----
indeterminateButton.setText("indeterminate");
indeterminateButton.setSelected(true);
indeterminateButton.putClientProperty("FlatLaf.styleClass", "small");
indeterminateButton.addActionListener(e -> indeterminateChanged());
zoomToolBar.add(indeterminateButton);
}
@@ -297,7 +298,7 @@ class FlatThemePreviewSwitches
//---- label22 ----
label22.setText("JCheckBox");
label22.setFont(label22.getFont().deriveFont(label22.getFont().getSize() + 4f));
label22.putClientProperty("FlatLaf.styleClass", "h3");
add(label22, "cell 0 1 3 1");
//---- label1 ----
@@ -310,32 +311,32 @@ class FlatThemePreviewSwitches
//---- label23 ----
label23.setText("unsel.");
label23.setFont(label23.getFont().deriveFont(label23.getFont().getSize() - 2f));
label23.putClientProperty("FlatLaf.styleClass", "small");
add(label23, "cell 1 3,alignx center,growx 0");
//---- label28 ----
label28.setText("sel.");
label28.setFont(label28.getFont().deriveFont(label28.getFont().getSize() - 2f));
label28.putClientProperty("FlatLaf.styleClass", "small");
add(label28, "cell 2 3,alignx center,growx 0");
//---- label37 ----
label37.setText("ind.");
label37.setFont(label37.getFont().deriveFont(label37.getFont().getSize() - 2f));
label37.putClientProperty("FlatLaf.styleClass", "small");
add(label37, "cell 3 3,alignx center,growx 0");
//---- label24 ----
label24.setText("unsel.");
label24.setFont(label24.getFont().deriveFont(label24.getFont().getSize() - 2f));
label24.putClientProperty("FlatLaf.styleClass", "small");
add(label24, "cell 4 3,alignx center,growx 0");
//---- label29 ----
label29.setText("sel.");
label29.setFont(label29.getFont().deriveFont(label29.getFont().getSize() - 2f));
label29.putClientProperty("FlatLaf.styleClass", "small");
add(label29, "cell 5 3,alignx center,growx 0");
//---- label38 ----
label38.setText("ind.");
label38.setFont(label38.getFont().deriveFont(label38.getFont().getSize() - 2f));
label38.putClientProperty("FlatLaf.styleClass", "small");
add(label38, "cell 6 3,alignx center,growx 0");
//---- label17 ----
@@ -465,7 +466,7 @@ class FlatThemePreviewSwitches
//---- label27 ----
label27.setText("JRadioButton");
label27.setFont(label27.getFont().deriveFont(label27.getFont().getSize() + 4f));
label27.putClientProperty("FlatLaf.styleClass", "h3");
add(label27, "cell 0 9 3 1");
//---- label3 ----
@@ -478,22 +479,22 @@ class FlatThemePreviewSwitches
//---- label25 ----
label25.setText("unsel.");
label25.setFont(label25.getFont().deriveFont(label25.getFont().getSize() - 2f));
label25.putClientProperty("FlatLaf.styleClass", "small");
add(label25, "cell 1 11,alignx center,growx 0");
//---- label30 ----
label30.setText("sel.");
label30.setFont(label30.getFont().deriveFont(label30.getFont().getSize() - 2f));
label30.putClientProperty("FlatLaf.styleClass", "small");
add(label30, "cell 2 11,alignx center,growx 0");
//---- label26 ----
label26.setText("unsel.");
label26.setFont(label26.getFont().deriveFont(label26.getFont().getSize() - 2f));
label26.putClientProperty("FlatLaf.styleClass", "small");
add(label26, "cell 4 11,alignx center,growx 0");
//---- label31 ----
label31.setText("sel.");
label31.setFont(label31.getFont().deriveFont(label31.getFont().getSize() - 2f));
label31.putClientProperty("FlatLaf.styleClass", "small");
add(label31, "cell 5 11,alignx center,growx 0");
//---- label36 ----

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.4.0.360" Java: "17" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.5.0.382" Java: "16" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -32,7 +32,7 @@ new FormModel {
name: "zoom1xButton"
"text": "1x"
"selected": true
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
"$buttonGroup": new FormReference( "buttonGroup1" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
@@ -42,7 +42,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "zoom2xButton"
"text": "2x"
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
"$buttonGroup": &FormReference0 new FormReference( "buttonGroup1" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
@@ -52,7 +52,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "zoom3xButton"
"text": "3x"
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
"$buttonGroup": #FormReference0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
@@ -62,7 +62,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "zoom4xButton"
"text": "4x"
"font": #SwingDerivedFont0
"$client.FlatLaf.styleClass": "small"
"$buttonGroup": #FormReference0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
@@ -76,6 +76,7 @@ new FormModel {
name: "indeterminateButton"
"text": "indeterminate"
"selected": true
"$client.FlatLaf.styleClass": "small"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -90,7 +91,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label22"
"text": "JCheckBox"
"font": &SwingDerivedFont1 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1 3 1"
} )
@@ -109,42 +110,42 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label23"
"text": "unsel."
"font": &SwingDerivedFont2 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label28"
"text": "sel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 3,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label37"
"text": "ind."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 3,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label24"
"text": "unsel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 3,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label29"
"text": "sel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 3,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label38"
"text": "ind."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 3,alignx center,growx 0"
} )
@@ -340,7 +341,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label27"
"text": "JRadioButton"
"font": #SwingDerivedFont1
"$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 9 3 1"
} )
@@ -359,28 +360,28 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label25"
"text": "unsel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 11,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label30"
"text": "sel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 11,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label26"
"text": "unsel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 11,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label31"
"text": "sel."
"font": #SwingDerivedFont2
"$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 11,alignx center,growx 0"
} )

View File

@@ -1093,6 +1093,22 @@ Viewport.background
Viewport.font
Viewport.foreground
ViewportUI
[style].h0
[style].h00
[style].h1
[style].h1.regular
[style].h2
[style].h2.regular
[style].h3
[style].h3.regular
[style].h4
[style].large
[style].light
[style].medium
[style].mini
[style].monospaced
[style].semibold
[style].small
activeCaption
activeCaptionBorder
activeCaptionText
@@ -1104,6 +1120,15 @@ controlShadow
controlText
defaultFont
desktop
h0.font
h00.font
h1.font
h1.regular.font
h2.font
h2.regular.font
h3.font
h3.regular.font
h4.font
html.missingImage
html.pendingImage
inactiveCaption
@@ -1113,9 +1138,16 @@ info
infoText
laf.dark
laf.scaleFactor
large.font
light.font
medium.font
menu
menuText
mini.font
monospaced.font
scrollbar
semibold.font
small.font
swingx/TaskPaneUI
text
textHighlight