Typography: use typography styles in demo, theme editor, etc

This commit is contained in:
Karl Tauber
2021-10-13 11:48:28 +02:00
parent 465af9bc41
commit 6715f01b8c
14 changed files with 148 additions and 150 deletions

View File

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

View File

@@ -435,7 +435,7 @@ class TabsPanel
//---- tabPlacementLabel ---- //---- tabPlacementLabel ----
tabPlacementLabel.setText("Tab placement"); tabPlacementLabel.setText("Tab placement");
tabPlacementLabel.setFont(tabPlacementLabel.getFont().deriveFont(tabPlacementLabel.getFont().getSize() + 4f)); tabPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabPlacementLabel.setName("tabPlacementLabel"); tabPlacementLabel.setName("tabPlacementLabel");
panel1.add(tabPlacementLabel, "cell 0 0"); panel1.add(tabPlacementLabel, "cell 0 0");
@@ -448,28 +448,28 @@ class TabsPanel
//---- topPlacementButton ---- //---- topPlacementButton ----
topPlacementButton.setText("top"); topPlacementButton.setText("top");
topPlacementButton.setSelected(true); topPlacementButton.setSelected(true);
topPlacementButton.setFont(topPlacementButton.getFont().deriveFont(topPlacementButton.getFont().getSize() - 2f)); topPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
topPlacementButton.setName("topPlacementButton"); topPlacementButton.setName("topPlacementButton");
topPlacementButton.addActionListener(e -> tabPlacementChanged()); topPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(topPlacementButton); tabPlacementToolBar.add(topPlacementButton);
//---- bottomPlacementButton ---- //---- bottomPlacementButton ----
bottomPlacementButton.setText("bottom"); bottomPlacementButton.setText("bottom");
bottomPlacementButton.setFont(bottomPlacementButton.getFont().deriveFont(bottomPlacementButton.getFont().getSize() - 2f)); bottomPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
bottomPlacementButton.setName("bottomPlacementButton"); bottomPlacementButton.setName("bottomPlacementButton");
bottomPlacementButton.addActionListener(e -> tabPlacementChanged()); bottomPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(bottomPlacementButton); tabPlacementToolBar.add(bottomPlacementButton);
//---- leftPlacementButton ---- //---- leftPlacementButton ----
leftPlacementButton.setText("left"); leftPlacementButton.setText("left");
leftPlacementButton.setFont(leftPlacementButton.getFont().deriveFont(leftPlacementButton.getFont().getSize() - 2f)); leftPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
leftPlacementButton.setName("leftPlacementButton"); leftPlacementButton.setName("leftPlacementButton");
leftPlacementButton.addActionListener(e -> tabPlacementChanged()); leftPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(leftPlacementButton); tabPlacementToolBar.add(leftPlacementButton);
//---- rightPlacementButton ---- //---- rightPlacementButton ----
rightPlacementButton.setText("right"); rightPlacementButton.setText("right");
rightPlacementButton.setFont(rightPlacementButton.getFont().deriveFont(rightPlacementButton.getFont().getSize() - 2f)); rightPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
rightPlacementButton.setName("rightPlacementButton"); rightPlacementButton.setName("rightPlacementButton");
rightPlacementButton.addActionListener(e -> tabPlacementChanged()); rightPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(rightPlacementButton); tabPlacementToolBar.add(rightPlacementButton);
@@ -477,14 +477,14 @@ class TabsPanel
//---- scrollButton ---- //---- scrollButton ----
scrollButton.setText("scroll"); scrollButton.setText("scroll");
scrollButton.setFont(scrollButton.getFont().deriveFont(scrollButton.getFont().getSize() - 2f)); scrollButton.putClientProperty("FlatLaf.styleClass", "small");
scrollButton.setName("scrollButton"); scrollButton.setName("scrollButton");
scrollButton.addActionListener(e -> scrollChanged()); scrollButton.addActionListener(e -> scrollChanged());
tabPlacementToolBar.add(scrollButton); tabPlacementToolBar.add(scrollButton);
//---- borderButton ---- //---- borderButton ----
borderButton.setText("border"); borderButton.setText("border");
borderButton.setFont(borderButton.getFont().deriveFont(borderButton.getFont().getSize() - 2f)); borderButton.putClientProperty("FlatLaf.styleClass", "small");
borderButton.setName("borderButton"); borderButton.setName("borderButton");
borderButton.addActionListener(e -> borderChanged()); borderButton.addActionListener(e -> borderChanged());
tabPlacementToolBar.add(borderButton); tabPlacementToolBar.add(borderButton);
@@ -499,7 +499,7 @@ class TabsPanel
//---- tabLayoutLabel ---- //---- tabLayoutLabel ----
tabLayoutLabel.setText("Tab layout"); tabLayoutLabel.setText("Tab layout");
tabLayoutLabel.setFont(tabLayoutLabel.getFont().deriveFont(tabLayoutLabel.getFont().getSize() + 4f)); tabLayoutLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabLayoutLabel.setName("tabLayoutLabel"); tabLayoutLabel.setName("tabLayoutLabel");
panel1.add(tabLayoutLabel, "cell 0 2"); panel1.add(tabLayoutLabel, "cell 0 2");
@@ -511,15 +511,15 @@ class TabsPanel
//---- scrollTabLayoutButton ---- //---- scrollTabLayoutButton ----
scrollTabLayoutButton.setText("scroll"); scrollTabLayoutButton.setText("scroll");
scrollTabLayoutButton.setFont(scrollTabLayoutButton.getFont().deriveFont(scrollTabLayoutButton.getFont().getSize() - 2f));
scrollTabLayoutButton.setSelected(true); scrollTabLayoutButton.setSelected(true);
scrollTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
scrollTabLayoutButton.setName("scrollTabLayoutButton"); scrollTabLayoutButton.setName("scrollTabLayoutButton");
scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged()); scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged());
tabLayoutToolBar.add(scrollTabLayoutButton); tabLayoutToolBar.add(scrollTabLayoutButton);
//---- wrapTabLayoutButton ---- //---- wrapTabLayoutButton ----
wrapTabLayoutButton.setText("wrap"); wrapTabLayoutButton.setText("wrap");
wrapTabLayoutButton.setFont(wrapTabLayoutButton.getFont().deriveFont(wrapTabLayoutButton.getFont().getSize() - 2f)); wrapTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
wrapTabLayoutButton.setName("wrapTabLayoutButton"); wrapTabLayoutButton.setName("wrapTabLayoutButton");
wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged()); wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged());
tabLayoutToolBar.add(wrapTabLayoutButton); tabLayoutToolBar.add(wrapTabLayoutButton);
@@ -529,14 +529,14 @@ class TabsPanel
//---- scrollLayoutNoteLabel ---- //---- scrollLayoutNoteLabel ----
scrollLayoutNoteLabel.setText("(use mouse wheel to scroll; arrow button shows hidden tabs)"); scrollLayoutNoteLabel.setText("(use mouse wheel to scroll; arrow button shows hidden tabs)");
scrollLayoutNoteLabel.setEnabled(false); scrollLayoutNoteLabel.setEnabled(false);
scrollLayoutNoteLabel.setFont(scrollLayoutNoteLabel.getFont().deriveFont(scrollLayoutNoteLabel.getFont().getSize() - 2f)); scrollLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
scrollLayoutNoteLabel.setName("scrollLayoutNoteLabel"); scrollLayoutNoteLabel.setName("scrollLayoutNoteLabel");
panel1.add(scrollLayoutNoteLabel, "cell 0 3"); panel1.add(scrollLayoutNoteLabel, "cell 0 3");
//---- wrapLayoutNoteLabel ---- //---- wrapLayoutNoteLabel ----
wrapLayoutNoteLabel.setText("(probably better to use scroll layout?)"); wrapLayoutNoteLabel.setText("(probably better to use scroll layout?)");
wrapLayoutNoteLabel.setEnabled(false); wrapLayoutNoteLabel.setEnabled(false);
wrapLayoutNoteLabel.setFont(wrapLayoutNoteLabel.getFont().deriveFont(wrapLayoutNoteLabel.getFont().getSize() - 2f)); wrapLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
wrapLayoutNoteLabel.setName("wrapLayoutNoteLabel"); wrapLayoutNoteLabel.setName("wrapLayoutNoteLabel");
panel1.add(wrapLayoutNoteLabel, "cell 0 3"); panel1.add(wrapLayoutNoteLabel, "cell 0 3");
@@ -554,7 +554,7 @@ class TabsPanel
//---- closableTabsLabel ---- //---- closableTabsLabel ----
closableTabsLabel.setText("Closable tabs"); closableTabsLabel.setText("Closable tabs");
closableTabsLabel.setFont(closableTabsLabel.getFont().deriveFont(closableTabsLabel.getFont().getSize() + 4f)); closableTabsLabel.putClientProperty("FlatLaf.styleClass", "h3");
closableTabsLabel.setName("closableTabsLabel"); closableTabsLabel.setName("closableTabsLabel");
panel1.add(closableTabsLabel, "cell 0 5"); panel1.add(closableTabsLabel, "cell 0 5");
@@ -566,22 +566,22 @@ class TabsPanel
//---- squareCloseButton ---- //---- squareCloseButton ----
squareCloseButton.setText("square"); squareCloseButton.setText("square");
squareCloseButton.setFont(squareCloseButton.getFont().deriveFont(squareCloseButton.getFont().getSize() - 2f));
squareCloseButton.setSelected(true); squareCloseButton.setSelected(true);
squareCloseButton.putClientProperty("FlatLaf.styleClass", "small");
squareCloseButton.setName("squareCloseButton"); squareCloseButton.setName("squareCloseButton");
squareCloseButton.addActionListener(e -> closeButtonStyleChanged()); squareCloseButton.addActionListener(e -> closeButtonStyleChanged());
closableTabsToolBar.add(squareCloseButton); closableTabsToolBar.add(squareCloseButton);
//---- circleCloseButton ---- //---- circleCloseButton ----
circleCloseButton.setText("circle"); circleCloseButton.setText("circle");
circleCloseButton.setFont(circleCloseButton.getFont().deriveFont(circleCloseButton.getFont().getSize() - 2f)); circleCloseButton.putClientProperty("FlatLaf.styleClass", "small");
circleCloseButton.setName("circleCloseButton"); circleCloseButton.setName("circleCloseButton");
circleCloseButton.addActionListener(e -> closeButtonStyleChanged()); circleCloseButton.addActionListener(e -> closeButtonStyleChanged());
closableTabsToolBar.add(circleCloseButton); closableTabsToolBar.add(circleCloseButton);
//---- redCrossCloseButton ---- //---- redCrossCloseButton ----
redCrossCloseButton.setText("red cross"); redCrossCloseButton.setText("red cross");
redCrossCloseButton.setFont(redCrossCloseButton.getFont().deriveFont(redCrossCloseButton.getFont().getSize() - 2f)); redCrossCloseButton.putClientProperty("FlatLaf.styleClass", "small");
redCrossCloseButton.setName("redCrossCloseButton"); redCrossCloseButton.setName("redCrossCloseButton");
redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged()); redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged());
closableTabsToolBar.add(redCrossCloseButton); closableTabsToolBar.add(redCrossCloseButton);
@@ -596,7 +596,7 @@ class TabsPanel
//---- tabAreaComponentsLabel ---- //---- tabAreaComponentsLabel ----
tabAreaComponentsLabel.setText("Custom tab area components"); tabAreaComponentsLabel.setText("Custom tab area components");
tabAreaComponentsLabel.setFont(tabAreaComponentsLabel.getFont().deriveFont(tabAreaComponentsLabel.getFont().getSize() + 4f)); tabAreaComponentsLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabAreaComponentsLabel.setName("tabAreaComponentsLabel"); tabAreaComponentsLabel.setName("tabAreaComponentsLabel");
panel1.add(tabAreaComponentsLabel, "cell 0 7"); panel1.add(tabAreaComponentsLabel, "cell 0 7");
@@ -608,16 +608,16 @@ class TabsPanel
//---- leadingComponentButton ---- //---- leadingComponentButton ----
leadingComponentButton.setText("leading"); leadingComponentButton.setText("leading");
leadingComponentButton.setFont(leadingComponentButton.getFont().deriveFont(leadingComponentButton.getFont().getSize() - 2f));
leadingComponentButton.setSelected(true); leadingComponentButton.setSelected(true);
leadingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
leadingComponentButton.setName("leadingComponentButton"); leadingComponentButton.setName("leadingComponentButton");
leadingComponentButton.addActionListener(e -> customComponentsChanged()); leadingComponentButton.addActionListener(e -> customComponentsChanged());
tabAreaComponentsToolBar.add(leadingComponentButton); tabAreaComponentsToolBar.add(leadingComponentButton);
//---- trailingComponentButton ---- //---- trailingComponentButton ----
trailingComponentButton.setText("trailing"); trailingComponentButton.setText("trailing");
trailingComponentButton.setFont(trailingComponentButton.getFont().deriveFont(trailingComponentButton.getFont().getSize() - 2f));
trailingComponentButton.setSelected(true); trailingComponentButton.setSelected(true);
trailingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
trailingComponentButton.setName("trailingComponentButton"); trailingComponentButton.setName("trailingComponentButton");
trailingComponentButton.addActionListener(e -> customComponentsChanged()); trailingComponentButton.addActionListener(e -> customComponentsChanged());
tabAreaComponentsToolBar.add(trailingComponentButton); tabAreaComponentsToolBar.add(trailingComponentButton);
@@ -655,14 +655,14 @@ class TabsPanel
//---- tabIconPlacementLabel ---- //---- tabIconPlacementLabel ----
tabIconPlacementLabel.setText("Tab icon placement"); tabIconPlacementLabel.setText("Tab icon placement");
tabIconPlacementLabel.setFont(tabIconPlacementLabel.getFont().deriveFont(tabIconPlacementLabel.getFont().getSize() + 4f)); tabIconPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabIconPlacementLabel.setName("tabIconPlacementLabel"); tabIconPlacementLabel.setName("tabIconPlacementLabel");
panel2.add(tabIconPlacementLabel, "cell 0 0"); panel2.add(tabIconPlacementLabel, "cell 0 0");
//---- tabIconPlacementNodeLabel ---- //---- tabIconPlacementNodeLabel ----
tabIconPlacementNodeLabel.setText("(top/bottom/leading/trailing)"); tabIconPlacementNodeLabel.setText("(top/bottom/leading/trailing)");
tabIconPlacementNodeLabel.setEnabled(false); tabIconPlacementNodeLabel.setEnabled(false);
tabIconPlacementNodeLabel.setFont(tabIconPlacementNodeLabel.getFont().deriveFont(tabIconPlacementNodeLabel.getFont().getSize() - 2f)); tabIconPlacementNodeLabel.putClientProperty("FlatLaf.styleClass", "small");
tabIconPlacementNodeLabel.setName("tabIconPlacementNodeLabel"); tabIconPlacementNodeLabel.setName("tabIconPlacementNodeLabel");
panel2.add(tabIconPlacementNodeLabel, "cell 0 1"); panel2.add(tabIconPlacementNodeLabel, "cell 0 1");
@@ -692,14 +692,14 @@ class TabsPanel
//---- tabAreaAlignmentLabel ---- //---- tabAreaAlignmentLabel ----
tabAreaAlignmentLabel.setText("Tab area alignment"); tabAreaAlignmentLabel.setText("Tab area alignment");
tabAreaAlignmentLabel.setFont(tabAreaAlignmentLabel.getFont().deriveFont(tabAreaAlignmentLabel.getFont().getSize() + 4f)); tabAreaAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabAreaAlignmentLabel.setName("tabAreaAlignmentLabel"); tabAreaAlignmentLabel.setName("tabAreaAlignmentLabel");
panel2.add(tabAreaAlignmentLabel, "cell 0 6"); panel2.add(tabAreaAlignmentLabel, "cell 0 6");
//---- tabAreaAlignmentNoteLabel ---- //---- tabAreaAlignmentNoteLabel ----
tabAreaAlignmentNoteLabel.setText("(leading/center/trailing/fill)"); tabAreaAlignmentNoteLabel.setText("(leading/center/trailing/fill)");
tabAreaAlignmentNoteLabel.setEnabled(false); tabAreaAlignmentNoteLabel.setEnabled(false);
tabAreaAlignmentNoteLabel.setFont(tabAreaAlignmentNoteLabel.getFont().deriveFont(tabAreaAlignmentNoteLabel.getFont().getSize() - 2f)); tabAreaAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
tabAreaAlignmentNoteLabel.setName("tabAreaAlignmentNoteLabel"); tabAreaAlignmentNoteLabel.setName("tabAreaAlignmentNoteLabel");
panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7"); panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7");
@@ -750,14 +750,14 @@ class TabsPanel
//---- tabWidthModeLabel ---- //---- tabWidthModeLabel ----
tabWidthModeLabel.setText("Tab width mode"); tabWidthModeLabel.setText("Tab width mode");
tabWidthModeLabel.setFont(tabWidthModeLabel.getFont().deriveFont(tabWidthModeLabel.getFont().getSize() + 4f)); tabWidthModeLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabWidthModeLabel.setName("tabWidthModeLabel"); tabWidthModeLabel.setName("tabWidthModeLabel");
panel3.add(tabWidthModeLabel, "cell 0 0"); panel3.add(tabWidthModeLabel, "cell 0 0");
//---- tabWidthModeNoteLabel ---- //---- tabWidthModeNoteLabel ----
tabWidthModeNoteLabel.setText("(preferred/equal/compact)"); tabWidthModeNoteLabel.setText("(preferred/equal/compact)");
tabWidthModeNoteLabel.setFont(tabWidthModeNoteLabel.getFont().deriveFont(tabWidthModeNoteLabel.getFont().getSize() - 2f));
tabWidthModeNoteLabel.setEnabled(false); tabWidthModeNoteLabel.setEnabled(false);
tabWidthModeNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
tabWidthModeNoteLabel.setName("tabWidthModeNoteLabel"); tabWidthModeNoteLabel.setName("tabWidthModeNoteLabel");
panel3.add(tabWidthModeNoteLabel, "cell 0 1"); panel3.add(tabWidthModeNoteLabel, "cell 0 1");
@@ -781,7 +781,7 @@ class TabsPanel
//---- minMaxTabWidthLabel ---- //---- minMaxTabWidthLabel ----
minMaxTabWidthLabel.setText("Minimum/maximum tab width"); minMaxTabWidthLabel.setText("Minimum/maximum tab width");
minMaxTabWidthLabel.setFont(minMaxTabWidthLabel.getFont().deriveFont(minMaxTabWidthLabel.getFont().getSize() + 4f)); minMaxTabWidthLabel.putClientProperty("FlatLaf.styleClass", "h3");
minMaxTabWidthLabel.setName("minMaxTabWidthLabel"); minMaxTabWidthLabel.setName("minMaxTabWidthLabel");
panel3.add(minMaxTabWidthLabel, "cell 0 5"); panel3.add(minMaxTabWidthLabel, "cell 0 5");
@@ -799,7 +799,7 @@ class TabsPanel
//---- tabAlignmentLabel ---- //---- tabAlignmentLabel ----
tabAlignmentLabel.setText("Tab title alignment"); tabAlignmentLabel.setText("Tab title alignment");
tabAlignmentLabel.setFont(tabAlignmentLabel.getFont().deriveFont(tabAlignmentLabel.getFont().getSize() + 4f)); tabAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
tabAlignmentLabel.setName("tabAlignmentLabel"); tabAlignmentLabel.setName("tabAlignmentLabel");
panel3.add(tabAlignmentLabel, "cell 0 8"); panel3.add(tabAlignmentLabel, "cell 0 8");
@@ -820,14 +820,14 @@ class TabsPanel
//---- tabAlignmentNoteLabel ---- //---- tabAlignmentNoteLabel ----
tabAlignmentNoteLabel.setText("(leading/center/trailing)"); tabAlignmentNoteLabel.setText("(leading/center/trailing)");
tabAlignmentNoteLabel.setEnabled(false); tabAlignmentNoteLabel.setEnabled(false);
tabAlignmentNoteLabel.setFont(tabAlignmentNoteLabel.getFont().deriveFont(tabAlignmentNoteLabel.getFont().getSize() - 2f)); tabAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
tabAlignmentNoteLabel.setName("tabAlignmentNoteLabel"); tabAlignmentNoteLabel.setName("tabAlignmentNoteLabel");
panel5.add(tabAlignmentNoteLabel, "cell 0 0"); panel5.add(tabAlignmentNoteLabel, "cell 0 0");
//---- tabAlignmentNoteLabel2 ---- //---- tabAlignmentNoteLabel2 ----
tabAlignmentNoteLabel2.setText("(trailing)"); tabAlignmentNoteLabel2.setText("(trailing)");
tabAlignmentNoteLabel2.setEnabled(false); tabAlignmentNoteLabel2.setEnabled(false);
tabAlignmentNoteLabel2.setFont(tabAlignmentNoteLabel2.getFont().deriveFont(tabAlignmentNoteLabel2.getFont().getSize() - 2f)); tabAlignmentNoteLabel2.putClientProperty("FlatLaf.styleClass", "small");
tabAlignmentNoteLabel2.setName("tabAlignmentNoteLabel2"); tabAlignmentNoteLabel2.setName("tabAlignmentNoteLabel2");
panel5.add(tabAlignmentNoteLabel2, "cell 1 0,alignx right,growx 0"); panel5.add(tabAlignmentNoteLabel2, "cell 1 0,alignx right,growx 0");
@@ -891,22 +891,22 @@ class TabsPanel
//---- scrollAsNeededSingleButton ---- //---- scrollAsNeededSingleButton ----
scrollAsNeededSingleButton.setText("asNeededSingle"); scrollAsNeededSingleButton.setText("asNeededSingle");
scrollAsNeededSingleButton.setFont(scrollAsNeededSingleButton.getFont().deriveFont(scrollAsNeededSingleButton.getFont().getSize() - 2f));
scrollAsNeededSingleButton.setSelected(true); scrollAsNeededSingleButton.setSelected(true);
scrollAsNeededSingleButton.putClientProperty("FlatLaf.styleClass", "small");
scrollAsNeededSingleButton.setName("scrollAsNeededSingleButton"); scrollAsNeededSingleButton.setName("scrollAsNeededSingleButton");
scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged()); scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton); scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton);
//---- scrollAsNeededButton ---- //---- scrollAsNeededButton ----
scrollAsNeededButton.setText("asNeeded"); scrollAsNeededButton.setText("asNeeded");
scrollAsNeededButton.setFont(scrollAsNeededButton.getFont().deriveFont(scrollAsNeededButton.getFont().getSize() - 2f)); scrollAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
scrollAsNeededButton.setName("scrollAsNeededButton"); scrollAsNeededButton.setName("scrollAsNeededButton");
scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged()); scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollAsNeededButton); scrollButtonsPolicyToolBar.add(scrollAsNeededButton);
//---- scrollNeverButton ---- //---- scrollNeverButton ----
scrollNeverButton.setText("never"); scrollNeverButton.setText("never");
scrollNeverButton.setFont(scrollNeverButton.getFont().deriveFont(scrollNeverButton.getFont().getSize() - 2f)); scrollNeverButton.putClientProperty("FlatLaf.styleClass", "small");
scrollNeverButton.setName("scrollNeverButton"); scrollNeverButton.setName("scrollNeverButton");
scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged()); scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollNeverButton); scrollButtonsPolicyToolBar.add(scrollNeverButton);
@@ -926,15 +926,15 @@ class TabsPanel
//---- scrollBothButton ---- //---- scrollBothButton ----
scrollBothButton.setText("both"); scrollBothButton.setText("both");
scrollBothButton.setFont(scrollBothButton.getFont().deriveFont(scrollBothButton.getFont().getSize() - 2f));
scrollBothButton.setSelected(true); scrollBothButton.setSelected(true);
scrollBothButton.putClientProperty("FlatLaf.styleClass", "small");
scrollBothButton.setName("scrollBothButton"); scrollBothButton.setName("scrollBothButton");
scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged()); scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged());
scrollButtonsPlacementToolBar.add(scrollBothButton); scrollButtonsPlacementToolBar.add(scrollBothButton);
//---- scrollTrailingButton ---- //---- scrollTrailingButton ----
scrollTrailingButton.setText("trailing"); scrollTrailingButton.setText("trailing");
scrollTrailingButton.setFont(scrollTrailingButton.getFont().deriveFont(scrollTrailingButton.getFont().getSize() - 2f)); scrollTrailingButton.putClientProperty("FlatLaf.styleClass", "small");
scrollTrailingButton.setName("scrollTrailingButton"); scrollTrailingButton.setName("scrollTrailingButton");
scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged()); scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged());
scrollButtonsPlacementToolBar.add(scrollTrailingButton); scrollButtonsPlacementToolBar.add(scrollTrailingButton);
@@ -954,15 +954,15 @@ class TabsPanel
//---- popupAsNeededButton ---- //---- popupAsNeededButton ----
popupAsNeededButton.setText("asNeeded"); popupAsNeededButton.setText("asNeeded");
popupAsNeededButton.setFont(popupAsNeededButton.getFont().deriveFont(popupAsNeededButton.getFont().getSize() - 2f));
popupAsNeededButton.setSelected(true); popupAsNeededButton.setSelected(true);
popupAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
popupAsNeededButton.setName("popupAsNeededButton"); popupAsNeededButton.setName("popupAsNeededButton");
popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged()); popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged());
tabsPopupPolicyToolBar.add(popupAsNeededButton); tabsPopupPolicyToolBar.add(popupAsNeededButton);
//---- popupNeverButton ---- //---- popupNeverButton ----
popupNeverButton.setText("never"); popupNeverButton.setText("never");
popupNeverButton.setFont(popupNeverButton.getFont().deriveFont(popupNeverButton.getFont().getSize() - 2f)); popupNeverButton.putClientProperty("FlatLaf.styleClass", "small");
popupNeverButton.setName("popupNeverButton"); popupNeverButton.setName("popupNeverButton");
popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged()); popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged());
tabsPopupPolicyToolBar.add(popupNeverButton); tabsPopupPolicyToolBar.add(popupNeverButton);

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

View File

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

View File

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

View File

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

View File

@@ -223,7 +223,7 @@ class FlatThemePreview
//---- previewLabel ---- //---- previewLabel ----
previewLabel.setText(" Preview "); previewLabel.setText(" Preview ");
previewLabel.setFont(previewLabel.getFont().deriveFont(previewLabel.getFont().getSize() + 6f)); previewLabel.putClientProperty("FlatLaf.styleClass", "h2");
// JFormDesigner - End of component initialization //GEN-END:initComponents // JFormDesigner - End of component initialization //GEN-END:initComponents
} }

View File

@@ -25,7 +25,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "previewLabel" name: "previewLabel"
"text": " Preview " "text": " Preview "
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, 6, false ) "$client.FlatLaf.styleClass": "h2"
}, new FormLayoutConstraints( null ) { }, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 235 ) "location": new java.awt.Point( 0, 235 )
"size": new java.awt.Dimension( 176, 24 ) "size": new java.awt.Dimension( 176, 24 )

View File

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

View File

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

View File

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

View File

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

View File

@@ -119,7 +119,7 @@ class FlatThemePreviewSwitches
//---- label22 ---- //---- label22 ----
label22.setText("JCheckBox"); label22.setText("JCheckBox");
label22.setFont(label22.getFont().deriveFont(label22.getFont().getSize() + 4f)); label22.putClientProperty("FlatLaf.styleClass", "h3");
add(label22, "cell 0 0 3 1"); add(label22, "cell 0 0 3 1");
//---- label1 ---- //---- label1 ----
@@ -132,22 +132,22 @@ class FlatThemePreviewSwitches
//---- label23 ---- //---- label23 ----
label23.setText("unsel."); label23.setText("unsel.");
label23.setFont(label23.getFont().deriveFont(label23.getFont().getSize() - 2f)); label23.putClientProperty("FlatLaf.styleClass", "small");
add(label23, "cell 1 2,alignx center,growx 0"); add(label23, "cell 1 2,alignx center,growx 0");
//---- label28 ---- //---- label28 ----
label28.setText("selected"); label28.setText("selected");
label28.setFont(label28.getFont().deriveFont(label28.getFont().getSize() - 2f)); label28.putClientProperty("FlatLaf.styleClass", "small");
add(label28, "cell 2 2,alignx center,growx 0"); add(label28, "cell 2 2,alignx center,growx 0");
//---- label24 ---- //---- label24 ----
label24.setText("unsel."); label24.setText("unsel.");
label24.setFont(label24.getFont().deriveFont(label24.getFont().getSize() - 2f)); label24.putClientProperty("FlatLaf.styleClass", "small");
add(label24, "cell 3 2,alignx center,growx 0"); add(label24, "cell 3 2,alignx center,growx 0");
//---- label29 ---- //---- label29 ----
label29.setText("selected"); label29.setText("selected");
label29.setFont(label29.getFont().deriveFont(label29.getFont().getSize() - 2f)); label29.putClientProperty("FlatLaf.styleClass", "small");
add(label29, "cell 4 2,alignx center,growx 0"); add(label29, "cell 4 2,alignx center,growx 0");
//---- label17 ---- //---- label17 ----
@@ -260,7 +260,7 @@ class FlatThemePreviewSwitches
//---- label27 ---- //---- label27 ----
label27.setText("JRadioButton"); label27.setText("JRadioButton");
label27.setFont(label27.getFont().deriveFont(label27.getFont().getSize() + 4f)); label27.putClientProperty("FlatLaf.styleClass", "h3");
add(label27, "cell 0 8 3 1"); add(label27, "cell 0 8 3 1");
//---- label3 ---- //---- label3 ----
@@ -273,22 +273,22 @@ class FlatThemePreviewSwitches
//---- label25 ---- //---- label25 ----
label25.setText("unsel."); label25.setText("unsel.");
label25.setFont(label25.getFont().deriveFont(label25.getFont().getSize() - 2f)); label25.putClientProperty("FlatLaf.styleClass", "small");
add(label25, "cell 1 10,alignx center,growx 0"); add(label25, "cell 1 10,alignx center,growx 0");
//---- label30 ---- //---- label30 ----
label30.setText("selected"); label30.setText("selected");
label30.setFont(label30.getFont().deriveFont(label30.getFont().getSize() - 2f)); label30.putClientProperty("FlatLaf.styleClass", "small");
add(label30, "cell 2 10,alignx center,growx 0"); add(label30, "cell 2 10,alignx center,growx 0");
//---- label26 ---- //---- label26 ----
label26.setText("unsel."); label26.setText("unsel.");
label26.setFont(label26.getFont().deriveFont(label26.getFont().getSize() - 2f)); label26.putClientProperty("FlatLaf.styleClass", "small");
add(label26, "cell 3 10,alignx center,growx 0"); add(label26, "cell 3 10,alignx center,growx 0");
//---- label31 ---- //---- label31 ----
label31.setText("selected"); label31.setText("selected");
label31.setFont(label31.getFont().deriveFont(label31.getFont().getSize() - 2f)); label31.putClientProperty("FlatLaf.styleClass", "small");
add(label31, "cell 4 10,alignx center,growx 0"); add(label31, "cell 4 10,alignx center,growx 0");
//---- label36 ---- //---- label36 ----

View File

@@ -15,7 +15,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label22" name: "label22"
"text": "JCheckBox" "text": "JCheckBox"
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false ) "$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0 3 1" "value": "cell 0 0 3 1"
} ) } )
@@ -34,28 +34,28 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label23" name: "label23"
"text": "unsel." "text": "unsel."
"font": &SwingDerivedFont1 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false ) "$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2,alignx center,growx 0" "value": "cell 1 2,alignx center,growx 0"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label28" name: "label28"
"text": "selected" "text": "selected"
"font": #SwingDerivedFont1 "$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 2,alignx center,growx 0" "value": "cell 2 2,alignx center,growx 0"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label24" name: "label24"
"text": "unsel." "text": "unsel."
"font": #SwingDerivedFont1 "$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 2,alignx center,growx 0" "value": "cell 3 2,alignx center,growx 0"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label29" name: "label29"
"text": "selected" "text": "selected"
"font": #SwingDerivedFont1 "$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 2,alignx center,growx 0" "value": "cell 4 2,alignx center,growx 0"
} ) } )
@@ -212,7 +212,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label27" name: "label27"
"text": "JRadioButton" "text": "JRadioButton"
"font": #SwingDerivedFont0 "$client.FlatLaf.styleClass": "h3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 8 3 1" "value": "cell 0 8 3 1"
} ) } )
@@ -231,28 +231,28 @@ new FormModel {
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label25" name: "label25"
"text": "unsel." "text": "unsel."
"font": #SwingDerivedFont1 "$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 10,alignx center,growx 0" "value": "cell 1 10,alignx center,growx 0"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label30" name: "label30"
"text": "selected" "text": "selected"
"font": #SwingDerivedFont1 "$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 10,alignx center,growx 0" "value": "cell 2 10,alignx center,growx 0"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label26" name: "label26"
"text": "unsel." "text": "unsel."
"font": #SwingDerivedFont1 "$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 10,alignx center,growx 0" "value": "cell 3 10,alignx center,growx 0"
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label31" name: "label31"
"text": "selected" "text": "selected"
"font": #SwingDerivedFont1 "$client.FlatLaf.styleClass": "small"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 10,alignx center,growx 0" "value": "cell 4 10,alignx center,growx 0"
} ) } )