Typography: added FlatTypographyTest, which was used to compare various typography systems

This commit is contained in:
Karl Tauber
2021-10-13 14:29:57 +02:00
parent 892b9a732e
commit 80235d53f4
2 changed files with 1871 additions and 0 deletions

View File

@@ -0,0 +1,974 @@
/*
/*
* 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.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.*;
import net.miginfocom.swing.*;
/**
* @author Karl Tauber
*/
public class FlatTypographyTest
extends FlatTestPanel
{
public static void main( String[] args ) {
SwingUtilities.invokeLater( () -> {
FlatTestFrame frame = FlatTestFrame.create( args, "FlatTypographyTest" );
frame.showFrame( FlatTypographyTest::new );
} );
}
public FlatTypographyTest() {
initComponents();
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
JLabel label54 = new JLabel();
JLabel label68 = new JLabel();
JLabel label69 = new JLabel();
JLabel label10 = new JLabel();
JLabel label11 = new JLabel();
JLabel label72 = new JLabel();
JLabel label28 = new JLabel();
JLabel label1 = new JLabel();
JLabel label37 = new JLabel();
JLabel label46 = new JLabel();
FlatTypographyTest.LinkLabel linkLabel9 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.LinkLabel linkLabel1 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.LinkLabel linkLabel2 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.LinkLabel linkLabel3 = new FlatTypographyTest.LinkLabel();
JLabel label2 = new JLabel();
FlatTypographyTest.LinkLabel linkLabel4 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.LinkLabel linkLabel10 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.LinkLabel linkLabel8 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.LinkLabel linkLabel5 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.LinkLabel linkLabel6 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.LinkLabel linkLabel7 = new FlatTypographyTest.LinkLabel();
FlatTypographyTest.FontPreview fontPreview69 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview93 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview40 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview85 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview70 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview51 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview1 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview11 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview19 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview27 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview41 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview86 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview71 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview47 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview54 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview62 = new FlatTypographyTest.FontPreview();
JSeparator separator3 = new JSeparator();
FlatTypographyTest.FontPreview fontPreview2 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview12 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview20 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview28 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview42 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview87 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview72 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview48 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview55 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview63 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview3 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview13 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview21 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview29 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview43 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview88 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview73 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview49 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview57 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview64 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview4 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview14 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview22 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview30 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview89 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview74 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview50 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview58 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview65 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview5 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview15 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview23 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview31 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview44 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview56 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview66 = new FlatTypographyTest.FontPreview();
JSeparator separator1 = new JSeparator();
FlatTypographyTest.FontPreview fontPreview7 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview6 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview16 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview24 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview32 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview45 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview90 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview75 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview52 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview59 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview67 = new FlatTypographyTest.FontPreview();
JSeparator separator2 = new JSeparator();
FlatTypographyTest.FontPreview fontPreview8 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview17 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview25 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview39 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview91 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview76 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview9 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview18 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview26 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview33 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview46 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview92 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview77 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview53 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview60 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview68 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview10 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview34 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview78 = new FlatTypographyTest.FontPreview();
FlatTypographyTest.FontPreview fontPreview61 = new FlatTypographyTest.FontPreview();
//======== this ========
setLayout(new MigLayout(
"ltr,insets dialog,hidemode 3",
// columns
"[left]unrel" +
"[left]unrel" +
"[left]unrel" +
"[left]unrel" +
"[left]unrel" +
"[left]unrel" +
"[left]unrel" +
"[left]unrel" +
"[left]unrel" +
"[left]unrel",
// rows
"[top]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[bottom]" +
"[]" +
"[bottom]" +
"[]" +
"[bottom]" +
"[bottom]" +
"[bottom]"));
//---- label54 ----
label54.setText("<html>FlatLaf<br><small>Windows</small></html>");
label54.putClientProperty("FlatLaf.styleClass", "h1");
add(label54, "cell 0 0");
//---- label68 ----
label68.setText("<html>JetBrains<br><small>Windows</small></html>");
label68.putClientProperty("FlatLaf.styleClass", "h1");
add(label68, "cell 1 0");
//---- label69 ----
label69.setText("<html>JetBrains<br><small>macOS</small></html>");
label69.putClientProperty("FlatLaf.styleClass", "h1");
add(label69, "cell 2 0");
//---- label10 ----
label10.setText("macOS");
label10.putClientProperty("FlatLaf.styleClass", "h1");
add(label10, "cell 3 0");
//---- label11 ----
label11.setText("Windows 10/11");
label11.putClientProperty("FlatLaf.styleClass", "h1");
add(label11, "cell 4 0");
//---- label72 ----
label72.setText("<html>GitHub<br>Primer</html>");
label72.putClientProperty("FlatLaf.styleClass", "h1");
add(label72, "cell 5 0");
//---- label28 ----
label28.setText("Material");
label28.putClientProperty("FlatLaf.styleClass", "h1");
add(label28, "cell 6 0");
//---- label1 ----
label1.setText("SAP Fiori");
label1.putClientProperty("FlatLaf.styleClass", "h1");
add(label1, "cell 7 0");
//---- label37 ----
label37.setText("Atlassian");
label37.putClientProperty("FlatLaf.styleClass", "h1");
add(label37, "cell 8 0");
//---- label46 ----
label46.setText("Iris");
label46.putClientProperty("FlatLaf.styleClass", "h1");
add(label46, "cell 9 0");
//---- linkLabel9 ----
linkLabel9.setLink("https://www.formdev.com/flatlaf/typography/");
add(linkLabel9, "cell 0 1");
//---- linkLabel1 ----
linkLabel1.setLink("https://jetbrains.design/intellij/principles/typography/");
add(linkLabel1, "cell 1 1");
//---- linkLabel2 ----
linkLabel2.setLink("https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/typography/");
add(linkLabel2, "cell 3 1");
//---- linkLabel3 ----
linkLabel3.setLink("https://docs.microsoft.com/en-us/windows/apps/design/style/typography#type-ramp");
add(linkLabel3, "cell 4 1");
//---- label2 ----
label2.setText("/");
add(label2, "cell 4 1");
//---- linkLabel4 ----
linkLabel4.setLink("https://docs.microsoft.com/en-us/windows/apps/design/signature-experiences/typography#type-ramp");
add(linkLabel4, "cell 4 1");
//---- linkLabel10 ----
linkLabel10.setLink("https://primer.style/css/utilities/typography");
add(linkLabel10, "cell 5 1");
//---- linkLabel8 ----
linkLabel8.setLink("https://material.io/design/typography/the-type-system.html#type-scale");
add(linkLabel8, "cell 6 1");
//---- linkLabel5 ----
linkLabel5.setLink("https://experience.sap.com/fiori-design-web/typography/#headlines-and-font-styles-for-ui-controls");
add(linkLabel5, "cell 7 1");
//---- linkLabel6 ----
linkLabel6.setLink("https://atlassian.design/foundations/typography");
add(linkLabel6, "cell 8 1");
//---- linkLabel7 ----
linkLabel7.setLink("https://iris.alkamitech.com/foundations/typography.html");
add(linkLabel7, "cell 9 1");
//---- fontPreview69 ----
fontPreview69.setFontType("H1");
fontPreview69.setFontSize(96);
fontPreview69.setBaseSize(16);
add(fontPreview69, "cell 6 2");
//---- fontPreview93 ----
fontPreview93.setBaseSize(12);
fontPreview93.setFontType("H00");
fontPreview93.setFontSize(36);
add(fontPreview93, "cell 0 3");
//---- fontPreview40 ----
fontPreview40.setFontSize(68);
fontPreview40.setFontType("Display");
fontPreview40.setBaseSize(14);
add(fontPreview40, "cell 4 2 1 2");
//---- fontPreview85 ----
fontPreview85.setFontSize(48);
fontPreview85.setFontType("H00");
fontPreview85.setBaseSize(16);
add(fontPreview85, "cell 5 3");
//---- fontPreview70 ----
fontPreview70.setFontSize(60);
fontPreview70.setFontType("H2");
fontPreview70.setBaseSize(16);
add(fontPreview70, "cell 6 3");
//---- fontPreview51 ----
fontPreview51.setFontType("h900");
fontPreview51.setFontSize(35);
fontPreview51.setBaseSize(14);
add(fontPreview51, "cell 8 3");
//---- fontPreview1 ----
fontPreview1.setBaseSize(12);
fontPreview1.setFontType("H0");
fontPreview1.setFontSize(30);
add(fontPreview1, "cell 0 4");
//---- fontPreview11 ----
fontPreview11.setFontType("H0");
fontPreview11.setFontSize(24);
fontPreview11.setBold(true);
fontPreview11.setBaseSize(12);
fontPreview11.setShowPlain(true);
add(fontPreview11, "cell 1 4");
//---- fontPreview19 ----
fontPreview19.setFontType("H0");
fontPreview19.setFontSize(25);
fontPreview19.setBold(true);
fontPreview19.setBaseSize(13);
fontPreview19.setShowPlain(true);
add(fontPreview19, "cell 2 4");
//---- fontPreview27 ----
fontPreview27.setFontType("Large Title");
fontPreview27.setFontSize(26);
fontPreview27.setBaseSize(13);
add(fontPreview27, "cell 3 4");
//---- fontPreview41 ----
fontPreview41.setFontType("Title Large");
fontPreview41.setFontSize(40);
fontPreview41.setBaseSize(14);
add(fontPreview41, "cell 4 4");
//---- fontPreview86 ----
fontPreview86.setFontSize(40);
fontPreview86.setFontType("H0");
fontPreview86.setBaseSize(16);
add(fontPreview86, "cell 5 4");
//---- fontPreview71 ----
fontPreview71.setFontType("H3");
fontPreview71.setFontSize(48);
fontPreview71.setBaseSize(16);
add(fontPreview71, "cell 6 4");
//---- fontPreview47 ----
fontPreview47.setFontType("Header 1");
fontPreview47.setFontSize(36);
fontPreview47.setBaseSize(14);
add(fontPreview47, "cell 7 4");
//---- fontPreview54 ----
fontPreview54.setBaseSize(14);
fontPreview54.setFontType("h800");
fontPreview54.setFontSize(29);
add(fontPreview54, "cell 8 4");
//---- fontPreview62 ----
fontPreview62.setBaseSize(16);
fontPreview62.setFontSize(44);
fontPreview62.setFontType("Hero");
add(fontPreview62, "cell 9 4");
add(separator3, "cell 0 5 10 1,growx");
//---- fontPreview2 ----
fontPreview2.setBaseSize(12);
fontPreview2.setFontSize(24);
fontPreview2.setFontType("H1");
add(fontPreview2, "cell 0 6");
//---- fontPreview12 ----
fontPreview12.setFontType("H1");
fontPreview12.setFontSize(21);
fontPreview12.setBold(true);
fontPreview12.setBaseSize(12);
fontPreview12.setShowPlain(true);
add(fontPreview12, "cell 1 6");
//---- fontPreview20 ----
fontPreview20.setFontType("H1");
fontPreview20.setFontSize(22);
fontPreview20.setBold(true);
fontPreview20.setBaseSize(13);
fontPreview20.setShowPlain(true);
add(fontPreview20, "cell 2 6");
//---- fontPreview28 ----
fontPreview28.setFontSize(22);
fontPreview28.setFontType("Title 1");
fontPreview28.setBaseSize(13);
add(fontPreview28, "cell 3 6");
//---- fontPreview42 ----
fontPreview42.setFontType("Title");
fontPreview42.setFontSize(28);
fontPreview42.setBaseSize(14);
add(fontPreview42, "cell 4 6");
//---- fontPreview87 ----
fontPreview87.setFontType("H1");
fontPreview87.setFontSize(32);
fontPreview87.setBaseSize(16);
add(fontPreview87, "cell 5 6");
//---- fontPreview72 ----
fontPreview72.setFontType("H4");
fontPreview72.setFontSize(34);
fontPreview72.setBaseSize(16);
add(fontPreview72, "cell 6 6");
//---- fontPreview48 ----
fontPreview48.setFontType("Header 2");
fontPreview48.setFontSize(24);
fontPreview48.setBaseSize(14);
add(fontPreview48, "cell 7 6");
//---- fontPreview55 ----
fontPreview55.setBaseSize(14);
fontPreview55.setFontType("h700");
fontPreview55.setFontSize(24);
add(fontPreview55, "cell 8 6");
//---- fontPreview63 ----
fontPreview63.setBaseSize(16);
fontPreview63.setFontSize(32);
fontPreview63.setFontType("H1");
add(fontPreview63, "cell 9 6");
//---- fontPreview3 ----
fontPreview3.setBaseSize(12);
fontPreview3.setFontSize(18);
fontPreview3.setFontType("H2");
add(fontPreview3, "cell 0 7");
//---- fontPreview13 ----
fontPreview13.setFontType("H2");
fontPreview13.setFontSize(17);
fontPreview13.setBold(true);
fontPreview13.setBaseSize(12);
fontPreview13.setShowPlain(true);
add(fontPreview13, "cell 1 7");
//---- fontPreview21 ----
fontPreview21.setFontType("H2");
fontPreview21.setFontSize(18);
fontPreview21.setBold(true);
fontPreview21.setBaseSize(13);
fontPreview21.setShowPlain(true);
add(fontPreview21, "cell 2 7");
//---- fontPreview29 ----
fontPreview29.setFontSize(17);
fontPreview29.setFontType("Title 2");
fontPreview29.setBaseSize(13);
add(fontPreview29, "cell 3 7");
//---- fontPreview43 ----
fontPreview43.setFontType("Subtitle");
fontPreview43.setFontSize(20);
fontPreview43.setBaseSize(14);
add(fontPreview43, "cell 4 7");
//---- fontPreview88 ----
fontPreview88.setFontSize(24);
fontPreview88.setFontType("H2");
fontPreview88.setBaseSize(16);
add(fontPreview88, "cell 5 7");
//---- fontPreview73 ----
fontPreview73.setFontType("H5");
fontPreview73.setFontSize(24);
fontPreview73.setBaseSize(16);
add(fontPreview73, "cell 6 7");
//---- fontPreview49 ----
fontPreview49.setFontType("Header 3");
fontPreview49.setFontSize(20);
fontPreview49.setBaseSize(14);
add(fontPreview49, "cell 7 7");
//---- fontPreview57 ----
fontPreview57.setBaseSize(14);
fontPreview57.setFontType("h600");
fontPreview57.setFontSize(20);
add(fontPreview57, "cell 8 7");
//---- fontPreview64 ----
fontPreview64.setBaseSize(16);
fontPreview64.setFontType("H2");
fontPreview64.setFontSize(24);
add(fontPreview64, "cell 9 7");
//---- fontPreview4 ----
fontPreview4.setBaseSize(12);
fontPreview4.setFontSize(15);
fontPreview4.setFontType("H3");
add(fontPreview4, "cell 0 8");
//---- fontPreview14 ----
fontPreview14.setFontType("H3");
fontPreview14.setFontSize(15);
fontPreview14.setBold(true);
fontPreview14.setBaseSize(12);
fontPreview14.setShowPlain(true);
add(fontPreview14, "cell 1 8");
//---- fontPreview22 ----
fontPreview22.setFontType("H3");
fontPreview22.setFontSize(16);
fontPreview22.setBold(true);
fontPreview22.setBaseSize(13);
fontPreview22.setShowPlain(true);
add(fontPreview22, "cell 2 8");
//---- fontPreview30 ----
fontPreview30.setFontType("Title 3");
fontPreview30.setFontSize(15);
fontPreview30.setBaseSize(13);
add(fontPreview30, "cell 3 8");
//---- fontPreview89 ----
fontPreview89.setFontType("H3");
fontPreview89.setFontSize(20);
fontPreview89.setBaseSize(16);
add(fontPreview89, "cell 5 8");
//---- fontPreview74 ----
fontPreview74.setFontType("H6");
fontPreview74.setFontSize(20);
fontPreview74.setBaseSize(16);
add(fontPreview74, "cell 6 8");
//---- fontPreview50 ----
fontPreview50.setFontType("Header 4");
fontPreview50.setFontSize(18);
fontPreview50.setBaseSize(14);
add(fontPreview50, "cell 7 8");
//---- fontPreview58 ----
fontPreview58.setBaseSize(14);
fontPreview58.setFontType("h500");
fontPreview58.setFontSize(16);
add(fontPreview58, "cell 8 8");
//---- fontPreview65 ----
fontPreview65.setBaseSize(16);
fontPreview65.setFontSize(20);
fontPreview65.setFontType("H3");
add(fontPreview65, "cell 9 8");
//---- fontPreview5 ----
fontPreview5.setBaseSize(12);
fontPreview5.setFontSize(14);
fontPreview5.setFontType("Large");
add(fontPreview5, "cell 0 9");
//---- fontPreview15 ----
fontPreview15.setFontType("H4");
fontPreview15.setBold(true);
fontPreview15.setFontSize(12);
fontPreview15.setBaseSize(12);
add(fontPreview15, "cell 1 9");
//---- fontPreview23 ----
fontPreview23.setFontType("H4");
fontPreview23.setFontSize(13);
fontPreview23.setBold(true);
fontPreview23.setBaseSize(13);
add(fontPreview23, "cell 2 9");
//---- fontPreview31 ----
fontPreview31.setFontType("Headline");
fontPreview31.setFontSize(13);
fontPreview31.setBold(true);
fontPreview31.setBaseSize(13);
add(fontPreview31, "cell 3 9");
//---- fontPreview44 ----
fontPreview44.setFontSize(18);
fontPreview44.setFontType("Body Large");
fontPreview44.setBaseSize(14);
add(fontPreview44, "cell 4 9");
//---- fontPreview56 ----
fontPreview56.setFontType("Large Text / Header 5");
fontPreview56.setFontSize(16);
fontPreview56.setBaseSize(14);
add(fontPreview56, "cell 7 9");
//---- fontPreview66 ----
fontPreview66.setBaseSize(16);
fontPreview66.setFontType("H4");
fontPreview66.setFontSize(18);
add(fontPreview66, "cell 9 9");
add(separator1, "cell 0 10 10 1,growx");
//---- fontPreview7 ----
fontPreview7.setFontType("Default");
fontPreview7.setFontSize(12);
fontPreview7.setBaseSize(12);
add(fontPreview7, "cell 0 11");
//---- fontPreview6 ----
fontPreview6.setFontSize(12);
fontPreview6.setBold(true);
fontPreview6.setFontType("H4");
fontPreview6.setBaseSize(12);
add(fontPreview6, "cell 0 11");
//---- fontPreview16 ----
fontPreview16.setFontType("Default");
fontPreview16.setFontSize(12);
fontPreview16.setBaseSize(12);
add(fontPreview16, "cell 1 11");
//---- fontPreview24 ----
fontPreview24.setFontType("Default");
fontPreview24.setFontSize(13);
fontPreview24.setBaseSize(13);
add(fontPreview24, "cell 2 11");
//---- fontPreview32 ----
fontPreview32.setFontType("Body");
fontPreview32.setFontSize(13);
fontPreview32.setBaseSize(13);
add(fontPreview32, "cell 3 11");
//---- fontPreview45 ----
fontPreview45.setFontType("Body");
fontPreview45.setFontSize(14);
fontPreview45.setBaseSize(14);
add(fontPreview45, "cell 4 11");
//---- fontPreview90 ----
fontPreview90.setFontSize(16);
fontPreview90.setFontType("Body / H4");
fontPreview90.setBaseSize(16);
add(fontPreview90, "cell 5 11");
//---- fontPreview75 ----
fontPreview75.setFontSize(16);
fontPreview75.setFontType("Body 1 / Subtitle 1");
fontPreview75.setBaseSize(16);
add(fontPreview75, "cell 6 11");
//---- fontPreview52 ----
fontPreview52.setFontType("Medium Text / Header 6");
fontPreview52.setFontSize(14);
fontPreview52.setBaseSize(14);
add(fontPreview52, "cell 7 11");
//---- fontPreview59 ----
fontPreview59.setBaseSize(14);
fontPreview59.setFontSize(14);
fontPreview59.setFontType("h400");
add(fontPreview59, "cell 8 11");
//---- fontPreview67 ----
fontPreview67.setBaseSize(16);
fontPreview67.setFontSize(16);
fontPreview67.setFontType("Body");
add(fontPreview67, "cell 9 11");
add(separator2, "cell 0 12 10 1,growx");
//---- fontPreview8 ----
fontPreview8.setFontType("Medium");
fontPreview8.setFontSize(11);
fontPreview8.setBaseSize(12);
add(fontPreview8, "cell 0 13");
//---- fontPreview17 ----
fontPreview17.setFontType("Medium");
fontPreview17.setFontSize(12);
fontPreview17.setBaseSize(12);
add(fontPreview17, "cell 1 13");
//---- fontPreview25 ----
fontPreview25.setFontType("Medium");
fontPreview25.setFontSize(12);
fontPreview25.setBaseSize(13);
add(fontPreview25, "cell 2 13");
//---- fontPreview39 ----
fontPreview39.setFontSize(12);
fontPreview39.setFontType("Callout");
fontPreview39.setBaseSize(13);
add(fontPreview39, "cell 3 13");
//---- fontPreview91 ----
fontPreview91.setFontType("H5");
fontPreview91.setFontSize(14);
fontPreview91.setBaseSize(16);
add(fontPreview91, "cell 5 13");
//---- fontPreview76 ----
fontPreview76.setFontType("Body 2 / Subtitle 2");
fontPreview76.setFontSize(14);
fontPreview76.setBaseSize(16);
add(fontPreview76, "cell 6 13");
//---- fontPreview9 ----
fontPreview9.setFontType("Small");
fontPreview9.setFontSize(10);
fontPreview9.setBaseSize(12);
add(fontPreview9, "cell 0 14");
//---- fontPreview18 ----
fontPreview18.setFontType("Small");
fontPreview18.setFontSize(12);
fontPreview18.setBaseSize(12);
add(fontPreview18, "cell 1 14");
//---- fontPreview26 ----
fontPreview26.setFontType("Small");
fontPreview26.setFontSize(11);
fontPreview26.setBaseSize(13);
add(fontPreview26, "cell 2 14");
//---- fontPreview33 ----
fontPreview33.setFontType("Subheadline");
fontPreview33.setFontSize(11);
fontPreview33.setBaseSize(13);
add(fontPreview33, "cell 3 14");
//---- fontPreview46 ----
fontPreview46.setFontType("Caption");
fontPreview46.setFontSize(12);
fontPreview46.setBaseSize(14);
add(fontPreview46, "cell 4 14");
//---- fontPreview92 ----
fontPreview92.setFontSize(12);
fontPreview92.setFontType("H6");
fontPreview92.setBaseSize(12);
add(fontPreview92, "cell 5 14");
//---- fontPreview77 ----
fontPreview77.setFontSize(12);
fontPreview77.setFontType("Caption");
fontPreview77.setBaseSize(16);
add(fontPreview77, "cell 6 14");
//---- fontPreview53 ----
fontPreview53.setFontType("Small Text");
fontPreview53.setFontSize(12);
fontPreview53.setBaseSize(14);
add(fontPreview53, "cell 7 14");
//---- fontPreview60 ----
fontPreview60.setBaseSize(14);
fontPreview60.setFontType("h300 / h200");
fontPreview60.setFontSize(12);
add(fontPreview60, "cell 8 14");
//---- fontPreview68 ----
fontPreview68.setBaseSize(16);
fontPreview68.setFontType("Small");
fontPreview68.setFontSize(14);
add(fontPreview68, "cell 9 14");
//---- fontPreview10 ----
fontPreview10.setFontType("Mini");
fontPreview10.setFontSize(9);
fontPreview10.setBaseSize(12);
add(fontPreview10, "cell 0 15");
//---- fontPreview34 ----
fontPreview34.setFontSize(10);
fontPreview34.setFontType("Footnote / Caption 1+2");
fontPreview34.setBaseSize(13);
add(fontPreview34, "cell 3 15");
//---- fontPreview78 ----
fontPreview78.setFontType("Overline");
fontPreview78.setFontSize(10);
fontPreview78.setBaseSize(16);
add(fontPreview78, "cell 6 15");
//---- fontPreview61 ----
fontPreview61.setBaseSize(14);
fontPreview61.setFontSize(11);
fontPreview61.setFontType("h100");
add(fontPreview61, "cell 8 15");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class LinkLabel ----------------------------------------------------
static class LinkLabel
extends JLabel
{
private String linkText;
private String link;
public LinkLabel() {
setLinkText( "Details" );
setCursor( Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ) );
addMouseListener( new MouseAdapter() {
@Override
public void mouseClicked( MouseEvent e ) {
try {
Desktop.getDesktop().browse( new URI( link ) );
} catch( IOException | URISyntaxException ex ) {
JOptionPane.showMessageDialog( LinkLabel.this,
"Failed to open '" + link + "' in browser.",
"Browse", JOptionPane.PLAIN_MESSAGE );
}
}
} );
}
public String getLink() {
return link;
}
public void setLink( String link ) {
this.link = link;
}
public String getLinkText() {
return linkText;
}
public void setLinkText( String linkText ) {
this.linkText = linkText;
setText( "<html><a href=\"#\">" + linkText + "</a></html>" );
}
}
//---- class FontPreview --------------------------------------------------
static class FontPreview
extends JPanel
{
private String fontType;
private int fontSize;
private int baseSize;
private boolean bold;
private boolean showPlain;
private FontPreview() {
initComponents();
preview2Label.setVisible( false );
}
public String getFontType() {
return fontType;
}
public void setFontType( String fontType ) {
this.fontType = fontType;
previewLabel.setText( fontType );
preview2Label.setText( previewLabel.getText() );
}
public int getFontSize() {
return fontSize;
}
public void setFontSize( int fontSize ) {
this.fontSize = fontSize;
updateFont();
updateDescription();
}
public int getBaseSize() {
return baseSize;
}
public void setBaseSize( int baseSize ) {
this.baseSize = baseSize;
updateDescription();
}
public boolean isBold() {
return bold;
}
public void setBold( boolean bold ) {
this.bold = bold;
updateFont();
updateDescription();
}
public boolean isShowPlain() {
return showPlain;
}
public void setShowPlain( boolean showPlain ) {
this.showPlain = showPlain;
preview2Label.setVisible( showPlain );
}
private void updateFont() {
Font defaultFont = getDefaultFont();
previewLabel.setFont( defaultFont.deriveFont( bold ? Font.BOLD : Font.PLAIN, fontSize ) );
preview2Label.setFont( defaultFont.deriveFont( Font.PLAIN, fontSize ) );
}
private void updateDescription() {
StringBuilder buf = new StringBuilder();
buf.append( fontSize );
if( baseSize > 0 && fontSize != baseSize ) {
buf.append( " " ).append( fontSize > baseSize ? "+" : "" ).append( fontSize - baseSize );
buf.append( String.format( " %.2fx", (float) fontSize / baseSize ) );
}
if( bold )
buf.append( " bold" );
descLabel.setText( buf.toString() );
}
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
"[left]",
// rows
"[]0" +
"[]"));
//---- previewLabel ----
previewLabel.setText("preview");
add(previewLabel, "cell 0 0");
add(preview2Label, "cell 0 0");
//---- descLabel ----
descLabel.setText("description");
descLabel.putClientProperty("FlatLaf.styleClass", "small");
descLabel.setEnabled(false);
add(descLabel, "cell 0 1");
// 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,897 @@
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( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[left]unrel[left]unrel[left]unrel[left]unrel[left]unrel[left]unrel[left]unrel[left]unrel[left]unrel[left]unrel"
"$rowConstraints": "[top][bottom][bottom][bottom][bottom][][bottom][bottom][bottom][bottom][][bottom][][bottom][bottom][bottom]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label54"
"text": "<html>FlatLaf<br><small>Windows</small></html>"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label68"
"text": "<html>JetBrains<br><small>Windows</small></html>"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label69"
"text": "<html>JetBrains<br><small>macOS</small></html>"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label10"
"text": "macOS"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label11"
"text": "Windows 10/11"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label72"
"text": "<html>GitHub<br>Primer</html>"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label28"
"text": "Material"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1"
"text": "SAP Fiori"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label37"
"text": "Atlassian"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label46"
"text": "Iris"
"$client.FlatLaf.styleClass": "h1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 0"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel9"
"link": "https://www.formdev.com/flatlaf/typography/"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel1"
"link": "https://jetbrains.design/intellij/principles/typography/"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel2"
"link": "https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/typography/"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel3"
"link": "https://docs.microsoft.com/en-us/windows/apps/design/style/typography#type-ramp"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label2"
"text": "/"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel4"
"link": "https://docs.microsoft.com/en-us/windows/apps/design/signature-experiences/typography#type-ramp"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel10"
"link": "https://primer.style/css/utilities/typography"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel8"
"link": "https://material.io/design/typography/the-type-system.html#type-scale"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel5"
"link": "https://experience.sap.com/fiori-design-web/typography/#headlines-and-font-styles-for-ui-controls"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel6"
"link": "https://atlassian.design/foundations/typography"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$LinkLabel" ) {
name: "linkLabel7"
"link": "https://iris.alkamitech.com/foundations/typography.html"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 1"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview69"
"fontType": "H1"
"fontSize": 96
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview93"
"baseSize": 12
"fontType": "H00"
"fontSize": 36
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview40"
"fontSize": 68
"fontType": "Display"
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 2 1 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview85"
"fontSize": 48
"fontType": "H00"
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview70"
"fontSize": 60
"fontType": "H2"
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview51"
"fontType": "h900"
"fontSize": 35
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview1"
"baseSize": 12
"fontType": "H0"
"fontSize": 30
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview11"
"fontType": "H0"
"fontSize": 24
"bold": true
"baseSize": 12
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview19"
"fontType": "H0"
"fontSize": 25
"bold": true
"baseSize": 13
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview27"
"fontType": "Large Title"
"fontSize": 26
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview41"
"fontType": "Title Large"
"fontSize": 40
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview86"
"fontSize": 40
"fontType": "H0"
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview71"
"fontType": "H3"
"fontSize": 48
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview47"
"fontType": "Header 1"
"fontSize": 36
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview54"
"baseSize": 14
"fontType": "h800"
"fontSize": 29
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview62"
"baseSize": 16
"fontSize": 44
"fontType": "Hero"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 4"
} )
add( new FormComponent( "javax.swing.JSeparator" ) {
name: "separator3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 5 10 1,growx"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview2"
"baseSize": 12
"fontSize": 24
"fontType": "H1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview12"
"fontType": "H1"
"fontSize": 21
"bold": true
"baseSize": 12
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview20"
"fontType": "H1"
"fontSize": 22
"bold": true
"baseSize": 13
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview28"
"fontSize": 22
"fontType": "Title 1"
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview42"
"fontType": "Title"
"fontSize": 28
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview87"
"fontType": "H1"
"fontSize": 32
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview72"
"fontType": "H4"
"fontSize": 34
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview48"
"fontType": "Header 2"
"fontSize": 24
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview55"
"baseSize": 14
"fontType": "h700"
"fontSize": 24
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview63"
"baseSize": 16
"fontSize": 32
"fontType": "H1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview3"
"baseSize": 12
"fontSize": 18
"fontType": "H2"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview13"
"fontType": "H2"
"fontSize": 17
"bold": true
"baseSize": 12
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview21"
"fontType": "H2"
"fontSize": 18
"bold": true
"baseSize": 13
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview29"
"fontSize": 17
"fontType": "Title 2"
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview43"
"fontType": "Subtitle"
"fontSize": 20
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview88"
"fontSize": 24
"fontType": "H2"
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview73"
"fontType": "H5"
"fontSize": 24
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview49"
"fontType": "Header 3"
"fontSize": 20
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview57"
"baseSize": 14
"fontType": "h600"
"fontSize": 20
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview64"
"baseSize": 16
"fontType": "H2"
"fontSize": 24
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 7"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview4"
"baseSize": 12
"fontSize": 15
"fontType": "H3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview14"
"fontType": "H3"
"fontSize": 15
"bold": true
"baseSize": 12
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview22"
"fontType": "H3"
"fontSize": 16
"bold": true
"baseSize": 13
"showPlain": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview30"
"fontType": "Title 3"
"fontSize": 15
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview89"
"fontType": "H3"
"fontSize": 20
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview74"
"fontType": "H6"
"fontSize": 20
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview50"
"fontType": "Header 4"
"fontSize": 18
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview58"
"baseSize": 14
"fontType": "h500"
"fontSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview65"
"baseSize": 16
"fontSize": 20
"fontType": "H3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 8"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview5"
"baseSize": 12
"fontSize": 14
"fontType": "Large"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 9"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview15"
"fontType": "H4"
"bold": true
"fontSize": 12
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 9"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview23"
"fontType": "H4"
"fontSize": 13
"bold": true
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 9"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview31"
"fontType": "Headline"
"fontSize": 13
"bold": true
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 9"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview44"
"fontSize": 18
"fontType": "Body Large"
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 9"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview56"
"fontType": "Large Text / Header 5"
"fontSize": 16
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 9"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview66"
"baseSize": 16
"fontType": "H4"
"fontSize": 18
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 9"
} )
add( new FormComponent( "javax.swing.JSeparator" ) {
name: "separator1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 10 10 1,growx"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview7"
"fontType": "Default"
"fontSize": 12
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview6"
"fontSize": 12
"bold": true
"fontType": "H4"
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview16"
"fontType": "Default"
"fontSize": 12
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview24"
"fontType": "Default"
"fontSize": 13
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview32"
"fontType": "Body"
"fontSize": 13
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview45"
"fontType": "Body"
"fontSize": 14
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview90"
"fontSize": 16
"fontType": "Body / H4"
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview75"
"fontSize": 16
"fontType": "Body 1 / Subtitle 1"
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview52"
"fontType": "Medium Text / Header 6"
"fontSize": 14
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview59"
"baseSize": 14
"fontSize": 14
"fontType": "h400"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview67"
"baseSize": 16
"fontSize": 16
"fontType": "Body"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 11"
} )
add( new FormComponent( "javax.swing.JSeparator" ) {
name: "separator2"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 12 10 1,growx"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview8"
"fontType": "Medium"
"fontSize": 11
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview17"
"fontType": "Medium"
"fontSize": 12
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview25"
"fontType": "Medium"
"fontSize": 12
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview39"
"fontSize": 12
"fontType": "Callout"
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview91"
"fontType": "H5"
"fontSize": 14
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview76"
"fontType": "Body 2 / Subtitle 2"
"fontSize": 14
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview9"
"fontType": "Small"
"fontSize": 10
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview18"
"fontType": "Small"
"fontSize": 12
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview26"
"fontType": "Small"
"fontSize": 11
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview33"
"fontType": "Subheadline"
"fontSize": 11
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview46"
"fontType": "Caption"
"fontSize": 12
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview92"
"fontSize": 12
"fontType": "H6"
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview77"
"fontSize": 12
"fontType": "Caption"
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview53"
"fontType": "Small Text"
"fontSize": 12
"baseSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview60"
"baseSize": 14
"fontType": "h300 / h200"
"fontSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview68"
"baseSize": 16
"fontType": "Small"
"fontSize": 14
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 14"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview10"
"fontType": "Mini"
"fontSize": 9
"baseSize": 12
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 15"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview34"
"fontSize": 10
"fontType": "Footnote / Caption 1+2"
"baseSize": 13
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 15"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview78"
"fontType": "Overline"
"fontSize": 10
"baseSize": 16
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 15"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTypographyTest$FontPreview" ) {
name: "fontPreview61"
"baseSize": 14
"fontSize": 11
"fontType": "h100"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 15"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 5, 0 )
"size": new java.awt.Dimension( 1430, 855 )
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[left]"
"$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"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "descLabel"
"text": "description"
"$client.FlatLaf.styleClass": "small"
"enabled": false
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 10, 925 )
"size": new java.awt.Dimension( 105, 85 )
} )
}
}