Demo, Testing, Theme Editor: re-generated UI code using JFormDesigner 8.3, which now supports class FlatClientProperties

This commit is contained in:
Karl Tauber
2024-12-10 19:49:46 +01:00
parent a400799db5
commit 58fa2a5085
17 changed files with 310 additions and 300 deletions

View File

@@ -198,17 +198,17 @@ public class FlatComponentStateTest
//---- label11 ----
label11.setText("JButton");
label11.putClientProperty("FlatLaf.styleClass", "h3");
label11.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(label11, "cell 1 0 2 1");
//---- label12 ----
label12.setText("JToggleButton");
label12.putClientProperty("FlatLaf.styleClass", "h3");
label12.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(label12, "cell 5 0 3 1");
//---- label32 ----
label32.setText("Help Button");
label32.putClientProperty("FlatLaf.styleClass", "h3");
label32.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(label32, "cell 9 0 2 1");
//---- label5 ----
@@ -257,26 +257,26 @@ public class FlatComponentStateTest
//---- testStateButton1 ----
testStateButton1.setText("text");
testStateButton1.putClientProperty("JComponent.minimumWidth", 0);
testStateButton1.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton1, "cell 1 2");
//---- testStateButton7 ----
testStateButton7.setText("text");
testStateButton7.setStateDefault(true);
testStateButton7.putClientProperty("JComponent.minimumWidth", 0);
testStateButton7.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton7, "cell 2 2");
//---- testStateButton4 ----
testStateButton4.setText("text");
testStateButton4.setStateFocused(true);
testStateButton4.putClientProperty("JComponent.minimumWidth", 0);
testStateButton4.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton4, "cell 3 2");
//---- testStateButton10 ----
testStateButton10.setText("text");
testStateButton10.setStateFocused(true);
testStateButton10.setStateDefault(true);
testStateButton10.putClientProperty("JComponent.minimumWidth", 0);
testStateButton10.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton10, "cell 4 2");
//---- testStateToggleButton1 ----
@@ -300,14 +300,14 @@ public class FlatComponentStateTest
add(testStateToggleButton12, "cell 8 2");
//---- testStateButton15 ----
testStateButton15.putClientProperty("JComponent.minimumWidth", 0);
testStateButton15.putClientProperty("JButton.buttonType", "help");
testStateButton15.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton15.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton15, "cell 9 2");
//---- testStateButton19 ----
testStateButton19.setStateFocused(true);
testStateButton19.putClientProperty("JComponent.minimumWidth", 0);
testStateButton19.putClientProperty("JButton.buttonType", "help");
testStateButton19.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton19.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton19, "cell 10 2");
//---- label2 ----
@@ -317,21 +317,21 @@ public class FlatComponentStateTest
//---- testStateButton2 ----
testStateButton2.setText("text");
testStateButton2.setStateHover(true);
testStateButton2.putClientProperty("JComponent.minimumWidth", 0);
testStateButton2.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton2, "cell 1 3");
//---- testStateButton8 ----
testStateButton8.setText("text");
testStateButton8.setStateHover(true);
testStateButton8.setStateDefault(true);
testStateButton8.putClientProperty("JComponent.minimumWidth", 0);
testStateButton8.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton8, "cell 2 3");
//---- testStateButton5 ----
testStateButton5.setText("text");
testStateButton5.setStateHover(true);
testStateButton5.setStateFocused(true);
testStateButton5.putClientProperty("JComponent.minimumWidth", 0);
testStateButton5.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton5, "cell 3 3");
//---- testStateButton11 ----
@@ -339,7 +339,7 @@ public class FlatComponentStateTest
testStateButton11.setStateHover(true);
testStateButton11.setStateFocused(true);
testStateButton11.setStateDefault(true);
testStateButton11.putClientProperty("JComponent.minimumWidth", 0);
testStateButton11.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton11, "cell 4 3");
//---- testStateToggleButton2 ----
@@ -368,15 +368,15 @@ public class FlatComponentStateTest
//---- testStateButton16 ----
testStateButton16.setStateHover(true);
testStateButton16.putClientProperty("JComponent.minimumWidth", 0);
testStateButton16.putClientProperty("JButton.buttonType", "help");
testStateButton16.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton16.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton16, "cell 9 3");
//---- testStateButton20 ----
testStateButton20.setStateHover(true);
testStateButton20.setStateFocused(true);
testStateButton20.putClientProperty("JComponent.minimumWidth", 0);
testStateButton20.putClientProperty("JButton.buttonType", "help");
testStateButton20.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton20.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton20, "cell 10 3");
//---- label3 ----
@@ -386,21 +386,21 @@ public class FlatComponentStateTest
//---- testStateButton3 ----
testStateButton3.setText("text");
testStateButton3.setStatePressed(true);
testStateButton3.putClientProperty("JComponent.minimumWidth", 0);
testStateButton3.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton3, "cell 1 4");
//---- testStateButton9 ----
testStateButton9.setText("text");
testStateButton9.setStatePressed(true);
testStateButton9.setStateDefault(true);
testStateButton9.putClientProperty("JComponent.minimumWidth", 0);
testStateButton9.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton9, "cell 2 4");
//---- testStateButton6 ----
testStateButton6.setText("text");
testStateButton6.setStatePressed(true);
testStateButton6.setStateFocused(true);
testStateButton6.putClientProperty("JComponent.minimumWidth", 0);
testStateButton6.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton6, "cell 3 4");
//---- testStateButton12 ----
@@ -408,7 +408,7 @@ public class FlatComponentStateTest
testStateButton12.setStatePressed(true);
testStateButton12.setStateFocused(true);
testStateButton12.setStateDefault(true);
testStateButton12.putClientProperty("JComponent.minimumWidth", 0);
testStateButton12.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton12, "cell 4 4");
//---- testStateToggleButton3 ----
@@ -437,15 +437,15 @@ public class FlatComponentStateTest
//---- testStateButton17 ----
testStateButton17.setStatePressed(true);
testStateButton17.putClientProperty("JComponent.minimumWidth", 0);
testStateButton17.putClientProperty("JButton.buttonType", "help");
testStateButton17.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton17.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton17, "cell 9 4");
//---- testStateButton21 ----
testStateButton21.setStatePressed(true);
testStateButton21.setStateFocused(true);
testStateButton21.putClientProperty("JComponent.minimumWidth", 0);
testStateButton21.putClientProperty("JButton.buttonType", "help");
testStateButton21.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton21.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton21, "cell 10 4");
//---- label4 ----
@@ -455,14 +455,14 @@ public class FlatComponentStateTest
//---- testStateButton13 ----
testStateButton13.setText("text");
testStateButton13.setEnabled(false);
testStateButton13.putClientProperty("JComponent.minimumWidth", 0);
testStateButton13.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton13, "cell 1 5");
//---- testStateButton14 ----
testStateButton14.setText("text");
testStateButton14.setEnabled(false);
testStateButton14.setStateDefault(true);
testStateButton14.putClientProperty("JComponent.minimumWidth", 0);
testStateButton14.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton14, "cell 2 5");
//---- testStateToggleButton4 ----
@@ -478,8 +478,8 @@ public class FlatComponentStateTest
//---- testStateButton18 ----
testStateButton18.setEnabled(false);
testStateButton18.putClientProperty("JComponent.minimumWidth", 0);
testStateButton18.putClientProperty("JButton.buttonType", "help");
testStateButton18.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton18.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton18, "cell 9 5");
//---- label10 ----
@@ -488,12 +488,12 @@ public class FlatComponentStateTest
//---- button1 ----
button1.setText("text");
button1.putClientProperty("JComponent.minimumWidth", 0);
button1.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(button1, "cell 1 6");
//---- testDefaultButton1 ----
testDefaultButton1.setText("text");
testDefaultButton1.putClientProperty("JComponent.minimumWidth", 0);
testDefaultButton1.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testDefaultButton1, "cell 2 6");
//---- toggleButton1 ----
@@ -506,19 +506,19 @@ public class FlatComponentStateTest
add(toggleButton2, "cell 6 6");
//---- button2 ----
button2.putClientProperty("JComponent.minimumWidth", 0);
button2.putClientProperty("JButton.buttonType", "help");
button2.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
button2.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(button2, "cell 9 6");
add(separator1, "cell 0 7 11 1");
//---- label22 ----
label22.setText("JCheckBox");
label22.putClientProperty("FlatLaf.styleClass", "h3");
label22.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(label22, "cell 1 8 2 1");
//---- label27 ----
label27.setText("JRadioButton");
label27.putClientProperty("FlatLaf.styleClass", "h3");
label27.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(label27, "cell 5 8 2 1");
//---- label23 ----

View File

@@ -21,6 +21,7 @@ import javax.swing.*;
import javax.swing.border.*;
import javax.swing.plaf.basic.BasicComboBoxEditor;
import javax.swing.plaf.basic.BasicComboBoxRenderer;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.icons.FlatFileViewFloppyDriveIcon;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.swing.*;
@@ -342,22 +343,22 @@ public class FlatCustomBordersTest
//---- button5 ----
button5.setText("text");
button5.putClientProperty("JButton.buttonType", "roundRect");
button5.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_ROUND_RECT);
add(button5, "cell 1 2");
//---- button6 ----
button6.setText("text");
button6.putClientProperty("JButton.buttonType", "roundRect");
button6.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_ROUND_RECT);
add(button6, "cell 2 2");
//---- button7 ----
button7.setText("text");
button7.putClientProperty("JButton.buttonType", "roundRect");
button7.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_ROUND_RECT);
add(button7, "cell 3 2");
//---- button8 ----
button8.setText("text");
button8.putClientProperty("JButton.buttonType", "roundRect");
button8.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_ROUND_RECT);
add(button8, "cell 4 2");
//---- label5 ----
@@ -372,31 +373,31 @@ public class FlatCustomBordersTest
add(comboBox27, "cell 7 3");
//---- comboBox5 ----
comboBox5.putClientProperty("JComponent.roundRect", true);
comboBox5.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(comboBox5, "cell 1 4");
//---- comboBox6 ----
comboBox6.putClientProperty("JComponent.roundRect", true);
comboBox6.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(comboBox6, "cell 2 4");
//---- comboBox7 ----
comboBox7.putClientProperty("JComponent.roundRect", true);
comboBox7.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(comboBox7, "cell 3 4");
//---- comboBox8 ----
comboBox8.putClientProperty("JComponent.roundRect", true);
comboBox8.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(comboBox8, "cell 4 4");
//---- comboBox24 ----
comboBox24.putClientProperty("JComponent.roundRect", true);
comboBox24.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(comboBox24, "cell 5 4");
//---- comboBox26 ----
comboBox26.putClientProperty("JComponent.roundRect", true);
comboBox26.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(comboBox26, "cell 6 4");
//---- comboBox28 ----
comboBox28.putClientProperty("JComponent.roundRect", true);
comboBox28.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(comboBox28, "cell 7 4");
//---- comboBox9 ----
@@ -428,37 +429,37 @@ public class FlatCustomBordersTest
add(comboBox21, "cell 7 5");
//---- comboBox13 ----
comboBox13.putClientProperty("JComponent.roundRect", true);
comboBox13.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
comboBox13.setEditable(true);
add(comboBox13, "cell 1 6");
//---- comboBox14 ----
comboBox14.putClientProperty("JComponent.roundRect", true);
comboBox14.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
comboBox14.setEditable(true);
add(comboBox14, "cell 2 6");
//---- comboBox15 ----
comboBox15.putClientProperty("JComponent.roundRect", true);
comboBox15.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
comboBox15.setEditable(true);
add(comboBox15, "cell 3 6");
//---- comboBox16 ----
comboBox16.putClientProperty("JComponent.roundRect", true);
comboBox16.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
comboBox16.setEditable(true);
add(comboBox16, "cell 4 6");
//---- comboBox18 ----
comboBox18.putClientProperty("JComponent.roundRect", true);
comboBox18.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
comboBox18.setEditable(true);
add(comboBox18, "cell 5 6");
//---- comboBox20 ----
comboBox20.putClientProperty("JComponent.roundRect", true);
comboBox20.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
comboBox20.setEditable(true);
add(comboBox20, "cell 6 6");
//---- comboBox22 ----
comboBox22.putClientProperty("JComponent.roundRect", true);
comboBox22.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
comboBox22.setEditable(true);
add(comboBox22, "cell 7 6");
@@ -471,19 +472,19 @@ public class FlatCustomBordersTest
add(spinner4, "cell 4 7");
//---- spinner5 ----
spinner5.putClientProperty("JComponent.roundRect", true);
spinner5.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(spinner5, "cell 1 8");
//---- spinner6 ----
spinner6.putClientProperty("JComponent.roundRect", true);
spinner6.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(spinner6, "cell 2 8");
//---- spinner7 ----
spinner7.putClientProperty("JComponent.roundRect", true);
spinner7.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(spinner7, "cell 3 8");
//---- spinner8 ----
spinner8.putClientProperty("JComponent.roundRect", true);
spinner8.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(spinner8, "cell 4 8");
//---- textFieldLabel ----
@@ -492,11 +493,11 @@ public class FlatCustomBordersTest
//---- textField1 ----
textField1.setText("text");
textField1.putClientProperty("JComponent.roundRect", false);
textField1.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, false);
add(textField1, "cell 1 9,growx");
//---- textField2 ----
textField2.putClientProperty("JComponent.roundRect", false);
textField2.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, false);
textField2.setText("text");
add(textField2, "cell 2 9");
@@ -505,27 +506,27 @@ public class FlatCustomBordersTest
add(textField3, "cell 3 9");
//---- textField4 ----
textField4.putClientProperty("JComponent.roundRect", false);
textField4.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, false);
textField4.setText("text");
add(textField4, "cell 4 9");
//---- textField5 ----
textField5.setText("text");
textField5.putClientProperty("JComponent.roundRect", true);
textField5.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(textField5, "cell 1 10,growx");
//---- textField6 ----
textField6.putClientProperty("JComponent.roundRect", true);
textField6.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
textField6.setText("text");
add(textField6, "cell 2 10");
//---- textField7 ----
textField7.setText("text");
textField7.putClientProperty("JComponent.roundRect", true);
textField7.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
add(textField7, "cell 3 10");
//---- textField8 ----
textField8.putClientProperty("JComponent.roundRect", true);
textField8.putClientProperty(FlatClientProperties.COMPONENT_ROUND_RECT, true);
textField8.setText("text");
add(textField8, "cell 4 10");

View File

@@ -22,6 +22,7 @@ import java.awt.Font;
import java.util.Map;
import java.util.TreeMap;
import javax.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.fonts.inter.FlatInterFont;
import com.formdev.flatlaf.fonts.jetbrains_mono.FlatJetBrainsMonoFont;
import com.formdev.flatlaf.fonts.roboto.FlatRobotoFont;
@@ -132,7 +133,7 @@ public class FlatFontsTest
//---- previewFamilyNameLabel ----
previewFamilyNameLabel.setText("name");
previewFamilyNameLabel.putClientProperty("FlatLaf.styleClass", "h1");
previewFamilyNameLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(previewFamilyNameLabel, "cell 1 1");
//======== familiesScrollPane ========

View File

@@ -37,6 +37,7 @@ import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatDarculaLaf;
import com.formdev.flatlaf.FlatDarkLaf;
import com.formdev.flatlaf.FlatIntelliJLaf;
@@ -806,7 +807,7 @@ public class FlatTestFrame
buttonBar.add(scaleFactorComboBox, "cell 1 0");
//---- fontSizeSpinner ----
fontSizeSpinner.putClientProperty("JComponent.minimumWidth", 50);
fontSizeSpinner.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 50);
fontSizeSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1));
fontSizeSpinner.addChangeListener(e -> fontSizeChanged());
buttonBar.add(fontSizeSpinner, "cell 2 0");

View File

@@ -316,13 +316,13 @@ public class FlatTextComponentsTest
//---- textField1 ----
textField1.setText("editable");
textField1.setComponentPopupMenu(popupMenu1);
textField1.putClientProperty("JTextField.placeholderText", "place");
textField1.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "place");
add(textField1, "cell 1 0,growx");
//---- textField3 ----
textField3.setText("longer text for testing horizontal scrolling");
textField3.setComponentPopupMenu(popupMenu1);
textField3.putClientProperty("JTextField.placeholderText", "place");
textField3.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "place");
add(textField3, "cell 2 0,growx");
//---- textField2 ----
@@ -330,7 +330,7 @@ public class FlatTextComponentsTest
textField2.setSelectionStart(1);
textField2.setSelectionEnd(4);
textField2.setComponentPopupMenu(popupMenu1);
textField2.putClientProperty("JTextField.placeholderText", "place");
textField2.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "place");
add(textField2, "cell 3 0");
//---- formattedTextFieldLabel ----
@@ -342,13 +342,13 @@ public class FlatTextComponentsTest
//---- formattedTextField1 ----
formattedTextField1.setText("editable");
formattedTextField1.setComponentPopupMenu(popupMenu1);
formattedTextField1.putClientProperty("JTextField.placeholderText", "place");
formattedTextField1.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "place");
add(formattedTextField1, "cell 1 1,growx");
//---- formattedTextField3 ----
formattedTextField3.setText("longer text for testing horizontal scrolling");
formattedTextField3.setComponentPopupMenu(popupMenu1);
formattedTextField3.putClientProperty("JTextField.placeholderText", "place");
formattedTextField3.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "place");
add(formattedTextField3, "cell 2 1,growx");
//======== panel1 ========
@@ -539,13 +539,13 @@ public class FlatTextComponentsTest
//---- passwordField1 ----
passwordField1.setText("editable");
passwordField1.setComponentPopupMenu(popupMenu1);
passwordField1.putClientProperty("JTextField.placeholderText", "place");
passwordField1.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "place");
add(passwordField1, "cell 1 2,growx");
//---- passwordField3 ----
passwordField3.setText("longer text for testing horizontal scrolling");
passwordField3.setComponentPopupMenu(popupMenu1);
passwordField3.putClientProperty("JTextField.placeholderText", "place");
passwordField3.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "place");
add(passwordField3, "cell 2 2,growx");
//---- textAreaLabel ----

View File

@@ -24,6 +24,7 @@ import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
import net.miginfocom.swing.*;
/**
@@ -205,57 +206,57 @@ public class FlatTypographyTest
//---- label54 ----
label54.setText("<html>FlatLaf<br><small>Windows</small></html>");
label54.putClientProperty("FlatLaf.styleClass", "h1");
label54.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label54, "cell 0 0");
//---- label68 ----
label68.setText("<html>JetBrains<br><small>Windows</small></html>");
label68.putClientProperty("FlatLaf.styleClass", "h1");
label68.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label68, "cell 1 0");
//---- label69 ----
label69.setText("<html>JetBrains<br><small>macOS</small></html>");
label69.putClientProperty("FlatLaf.styleClass", "h1");
label69.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label69, "cell 2 0");
//---- label10 ----
label10.setText("macOS");
label10.putClientProperty("FlatLaf.styleClass", "h1");
label10.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label10, "cell 3 0");
//---- label11 ----
label11.setText("Windows 10/11");
label11.putClientProperty("FlatLaf.styleClass", "h1");
label11.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label11, "cell 4 0");
//---- label72 ----
label72.setText("<html>GitHub<br>Primer</html>");
label72.putClientProperty("FlatLaf.styleClass", "h1");
label72.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label72, "cell 5 0");
//---- label28 ----
label28.setText("Material");
label28.putClientProperty("FlatLaf.styleClass", "h1");
label28.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label28, "cell 6 0");
//---- label29 ----
label29.setText("Material 3");
label29.putClientProperty("FlatLaf.styleClass", "h1");
label29.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label29, "cell 7 0");
//---- label1 ----
label1.setText("SAP Fiori");
label1.putClientProperty("FlatLaf.styleClass", "h1");
label1.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label1, "cell 8 0");
//---- label37 ----
label37.setText("Atlassian");
label37.putClientProperty("FlatLaf.styleClass", "h1");
label37.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label37, "cell 9 0");
//---- label46 ----
label46.setText("Iris");
label46.putClientProperty("FlatLaf.styleClass", "h1");
label46.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(label46, "cell 10 0");
//---- linkLabel9 ----
@@ -1147,7 +1148,7 @@ public class FlatTypographyTest
//---- descLabel ----
descLabel.setText("description");
descLabel.putClientProperty("FlatLaf.styleClass", "small");
descLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
descLabel.setEnabled(false);
add(descLabel, "cell 0 1");
// JFormDesigner - End of component initialization //GEN-END:initComponents

View File

@@ -241,7 +241,7 @@ public class FlatWindowDecorationsTest
tallCompCheckBox.setSelected( false );
JButton myButton = new JButton( "?" );
myButton.putClientProperty( "JButton.buttonType", "toolBarButton" );
myButton.putClientProperty( FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_TOOLBAR_BUTTON );
myButton.setFocusable( false );
menuBar.add( Box.createGlue() );
@@ -499,7 +499,7 @@ debug*/
if( typeUtilityRadioButton.isSelected() )
window.setType( Window.Type.UTILITY );
else if( typeSmallRadioButton.isSelected() )
((RootPaneContainer)window).getRootPane().putClientProperty( "Window.style", "small" );
((RootPaneContainer)window).getRootPane().putClientProperty( FlatClientProperties.WINDOW_STYLE, FlatClientProperties.WINDOW_STYLE_SMALL );
}
private void decorationStyleChanged() {