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

@@ -277,22 +277,22 @@ class BasicComponentsPanel
//---- button5 ---- //---- button5 ----
button5.setText("Square"); button5.setText("Square");
button5.putClientProperty("JButton.buttonType", "square"); button5.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_SQUARE);
add(button5, "cell 3 1"); add(button5, "cell 3 1");
//---- button6 ---- //---- button6 ----
button6.setText("Round"); button6.setText("Round");
button6.putClientProperty("JButton.buttonType", "roundRect"); button6.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_ROUND_RECT);
add(button6, "cell 4 1"); add(button6, "cell 4 1");
//---- button3 ---- //---- button3 ----
button3.setText("Help"); button3.setText("Help");
button3.putClientProperty("JButton.buttonType", "help"); button3.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(button3, "cell 4 1"); add(button3, "cell 4 1");
//---- button4 ---- //---- button4 ----
button4.setText("Help"); button4.setText("Help");
button4.putClientProperty("JButton.buttonType", "help"); button4.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
button4.setEnabled(false); button4.setEnabled(false);
add(button4, "cell 4 1"); add(button4, "cell 4 1");
@@ -432,7 +432,7 @@ class BasicComponentsPanel
//---- comboBox6 ---- //---- comboBox6 ----
comboBox6.setEditable(true); comboBox6.setEditable(true);
comboBox6.putClientProperty("JTextField.placeholderText", "Placeholder"); comboBox6.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Placeholder");
add(comboBox6, "cell 5 5,growx"); add(comboBox6, "cell 5 5,growx");
//---- textFieldLabel ---- //---- textFieldLabel ----
@@ -463,7 +463,7 @@ class BasicComponentsPanel
add(textField4, "cell 4 6,growx"); add(textField4, "cell 4 6,growx");
//---- textField6 ---- //---- textField6 ----
textField6.putClientProperty("JTextField.placeholderText", "Placeholder"); textField6.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Placeholder");
add(textField6, "cell 5 6,growx"); add(textField6, "cell 5 6,growx");
//---- formattedTextFieldLabel ---- //---- formattedTextFieldLabel ----
@@ -494,7 +494,7 @@ class BasicComponentsPanel
add(formattedTextField4, "cell 4 7,growx"); add(formattedTextField4, "cell 4 7,growx");
//---- formattedTextField5 ---- //---- formattedTextField5 ----
formattedTextField5.putClientProperty("JTextField.placeholderText", "Placeholder"); formattedTextField5.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Placeholder");
add(formattedTextField5, "cell 5 7,growx"); add(formattedTextField5, "cell 5 7,growx");
//---- passwordFieldLabel ---- //---- passwordFieldLabel ----
@@ -522,7 +522,7 @@ class BasicComponentsPanel
add(passwordField4, "cell 4 8,growx"); add(passwordField4, "cell 4 8,growx");
//---- passwordField5 ---- //---- passwordField5 ----
passwordField5.putClientProperty("JTextField.placeholderText", "Placeholder"); passwordField5.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Placeholder");
add(passwordField5, "cell 5 8,growx"); add(passwordField5, "cell 5 8,growx");
//---- textAreaLabel ---- //---- textAreaLabel ----
@@ -703,11 +703,11 @@ class BasicComponentsPanel
add(errorHintsLabel, "cell 0 12"); add(errorHintsLabel, "cell 0 12");
//---- errorHintsTextField ---- //---- errorHintsTextField ----
errorHintsTextField.putClientProperty("JComponent.outline", "error"); errorHintsTextField.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR);
add(errorHintsTextField, "cell 1 12,growx"); add(errorHintsTextField, "cell 1 12,growx");
//---- errorHintsComboBox ---- //---- errorHintsComboBox ----
errorHintsComboBox.putClientProperty("JComponent.outline", "error"); errorHintsComboBox.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR);
errorHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] { errorHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
"Editable" "Editable"
})); }));
@@ -715,7 +715,7 @@ class BasicComponentsPanel
add(errorHintsComboBox, "cell 2 12,growx"); add(errorHintsComboBox, "cell 2 12,growx");
//---- errorHintsSpinner ---- //---- errorHintsSpinner ----
errorHintsSpinner.putClientProperty("JComponent.outline", "error"); errorHintsSpinner.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR);
add(errorHintsSpinner, "cell 3 12,growx"); add(errorHintsSpinner, "cell 3 12,growx");
//---- warningHintsLabel ---- //---- warningHintsLabel ----
@@ -723,18 +723,18 @@ class BasicComponentsPanel
add(warningHintsLabel, "cell 0 13"); add(warningHintsLabel, "cell 0 13");
//---- warningHintsTextField ---- //---- warningHintsTextField ----
warningHintsTextField.putClientProperty("JComponent.outline", "warning"); warningHintsTextField.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING);
add(warningHintsTextField, "cell 1 13,growx"); add(warningHintsTextField, "cell 1 13,growx");
//---- warningHintsComboBox ---- //---- warningHintsComboBox ----
warningHintsComboBox.putClientProperty("JComponent.outline", "warning"); warningHintsComboBox.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING);
warningHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] { warningHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
"Not editable" "Not editable"
})); }));
add(warningHintsComboBox, "cell 2 13,growx"); add(warningHintsComboBox, "cell 2 13,growx");
//---- warningHintsSpinner ---- //---- warningHintsSpinner ----
warningHintsSpinner.putClientProperty("JComponent.outline", "warning"); warningHintsSpinner.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING);
add(warningHintsSpinner, "cell 3 13,growx"); add(warningHintsSpinner, "cell 3 13,growx");
//---- iconsLabel ---- //---- iconsLabel ----
@@ -765,53 +765,53 @@ class BasicComponentsPanel
//---- h00Label ---- //---- h00Label ----
h00Label.setText("H00"); h00Label.setText("H00");
h00Label.putClientProperty("FlatLaf.styleClass", "h00"); h00Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h00");
add(h00Label, "cell 1 16 5 1"); add(h00Label, "cell 1 16 5 1");
//---- h0Label ---- //---- h0Label ----
h0Label.setText("H0"); h0Label.setText("H0");
h0Label.putClientProperty("FlatLaf.styleClass", "h0"); h0Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h0");
add(h0Label, "cell 1 16 5 1"); add(h0Label, "cell 1 16 5 1");
//---- h1Label ---- //---- h1Label ----
h1Label.setText("H1"); h1Label.setText("H1");
h1Label.putClientProperty("FlatLaf.styleClass", "h1"); h1Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
add(h1Label, "cell 1 16 5 1"); add(h1Label, "cell 1 16 5 1");
//---- h2Label ---- //---- h2Label ----
h2Label.setText("H2"); h2Label.setText("H2");
h2Label.putClientProperty("FlatLaf.styleClass", "h2"); h2Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h2");
add(h2Label, "cell 1 16 5 1"); add(h2Label, "cell 1 16 5 1");
//---- h3Label ---- //---- h3Label ----
h3Label.setText("H3"); h3Label.setText("H3");
h3Label.putClientProperty("FlatLaf.styleClass", "h3"); h3Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(h3Label, "cell 1 16 5 1"); add(h3Label, "cell 1 16 5 1");
//---- h4Label ---- //---- h4Label ----
h4Label.setText("H4"); h4Label.setText("H4");
h4Label.putClientProperty("FlatLaf.styleClass", "h4"); h4Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h4");
add(h4Label, "cell 1 16 5 1"); add(h4Label, "cell 1 16 5 1");
//---- lightLabel ---- //---- lightLabel ----
lightLabel.setText("light"); lightLabel.setText("light");
lightLabel.putClientProperty("FlatLaf.style", "font: 200% $light.font"); lightLabel.putClientProperty(FlatClientProperties.STYLE, "font: 200% $light.font");
add(lightLabel, "cell 1 16 5 1,gapx 30"); add(lightLabel, "cell 1 16 5 1,gapx 30");
//---- semiboldLabel ---- //---- semiboldLabel ----
semiboldLabel.setText("semibold"); semiboldLabel.setText("semibold");
semiboldLabel.putClientProperty("FlatLaf.style", "font: 200% $semibold.font"); semiboldLabel.putClientProperty(FlatClientProperties.STYLE, "font: 200% $semibold.font");
add(semiboldLabel, "cell 1 16 5 1"); add(semiboldLabel, "cell 1 16 5 1");
//---- fontZoomLabel ---- //---- fontZoomLabel ----
fontZoomLabel.setText("(200%)"); fontZoomLabel.setText("(200%)");
fontZoomLabel.putClientProperty("FlatLaf.styleClass", "small"); fontZoomLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
fontZoomLabel.setEnabled(false); fontZoomLabel.setEnabled(false);
add(fontZoomLabel, "cell 1 16 5 1"); add(fontZoomLabel, "cell 1 16 5 1");
//---- largeLabel ---- //---- largeLabel ----
largeLabel.setText("large"); largeLabel.setText("large");
largeLabel.putClientProperty("FlatLaf.styleClass", "large"); largeLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "large");
add(largeLabel, "cell 1 17 5 1"); add(largeLabel, "cell 1 17 5 1");
//---- defaultLabel ---- //---- defaultLabel ----
@@ -820,22 +820,22 @@ class BasicComponentsPanel
//---- mediumLabel ---- //---- mediumLabel ----
mediumLabel.setText("medium"); mediumLabel.setText("medium");
mediumLabel.putClientProperty("FlatLaf.styleClass", "medium"); mediumLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "medium");
add(mediumLabel, "cell 1 17 5 1"); add(mediumLabel, "cell 1 17 5 1");
//---- smallLabel ---- //---- smallLabel ----
smallLabel.setText("small"); smallLabel.setText("small");
smallLabel.putClientProperty("FlatLaf.styleClass", "small"); smallLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
add(smallLabel, "cell 1 17 5 1"); add(smallLabel, "cell 1 17 5 1");
//---- miniLabel ---- //---- miniLabel ----
miniLabel.setText("mini"); miniLabel.setText("mini");
miniLabel.putClientProperty("FlatLaf.styleClass", "mini"); miniLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "mini");
add(miniLabel, "cell 1 17 5 1"); add(miniLabel, "cell 1 17 5 1");
//---- monospacedLabel ---- //---- monospacedLabel ----
monospacedLabel.setText("monospaced"); monospacedLabel.setText("monospaced");
monospacedLabel.putClientProperty("FlatLaf.styleClass", "monospaced"); monospacedLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "monospaced");
add(monospacedLabel, "cell 1 17 5 1,gapx 30"); add(monospacedLabel, "cell 1 17 5 1,gapx 30");
//======== popupMenu1 ======== //======== popupMenu1 ========

View File

@@ -19,6 +19,7 @@ package com.formdev.flatlaf.demo;
import java.awt.*; import java.awt.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.*; import javax.swing.border.*;
import com.formdev.flatlaf.FlatClientProperties;
import net.miginfocom.swing.*; import net.miginfocom.swing.*;
/** /**
@@ -176,12 +177,12 @@ class MoreComponentsPanel
add(scrollBar3, "cell 2 0 1 6,growy"); add(scrollBar3, "cell 2 0 1 6,growy");
//---- scrollBar7 ---- //---- scrollBar7 ----
scrollBar7.putClientProperty("JScrollBar.showButtons", true); scrollBar7.putClientProperty(FlatClientProperties.SCROLL_BAR_SHOW_BUTTONS, true);
add(scrollBar7, "cell 2 0 1 6,growy"); add(scrollBar7, "cell 2 0 1 6,growy");
//---- scrollBar8 ---- //---- scrollBar8 ----
scrollBar8.setEnabled(false); scrollBar8.setEnabled(false);
scrollBar8.putClientProperty("JScrollBar.showButtons", true); scrollBar8.putClientProperty(FlatClientProperties.SCROLL_BAR_SHOW_BUTTONS, true);
add(scrollBar8, "cell 2 0 1 6,growy"); add(scrollBar8, "cell 2 0 1 6,growy");
//---- separator2 ---- //---- separator2 ----
@@ -301,13 +302,13 @@ class MoreComponentsPanel
//---- scrollBar5 ---- //---- scrollBar5 ----
scrollBar5.setOrientation(Adjustable.HORIZONTAL); scrollBar5.setOrientation(Adjustable.HORIZONTAL);
scrollBar5.putClientProperty("JScrollBar.showButtons", true); scrollBar5.putClientProperty(FlatClientProperties.SCROLL_BAR_SHOW_BUTTONS, true);
add(scrollBar5, "cell 1 3,growx"); add(scrollBar5, "cell 1 3,growx");
//---- scrollBar6 ---- //---- scrollBar6 ----
scrollBar6.setOrientation(Adjustable.HORIZONTAL); scrollBar6.setOrientation(Adjustable.HORIZONTAL);
scrollBar6.setEnabled(false); scrollBar6.setEnabled(false);
scrollBar6.putClientProperty("JScrollBar.showButtons", true); scrollBar6.putClientProperty(FlatClientProperties.SCROLL_BAR_SHOW_BUTTONS, true);
add(scrollBar6, "cell 1 4,growx"); add(scrollBar6, "cell 1 4,growx");
//---- separatorLabel ---- //---- separatorLabel ----
@@ -518,7 +519,7 @@ class MoreComponentsPanel
//======== panel5 ======== //======== panel5 ========
{ {
panel5.putClientProperty("FlatLaf.style", "arc: 16; background: darken($Panel.background,5%)"); panel5.putClientProperty(FlatClientProperties.STYLE, "arc: 16; background: darken($Panel.background,5%)");
panel5.setLayout(new BorderLayout()); panel5.setLayout(new BorderLayout());
//---- label9 ---- //---- label9 ----
@@ -530,7 +531,7 @@ class MoreComponentsPanel
//======== panel4 ======== //======== panel4 ========
{ {
panel4.putClientProperty("FlatLaf.style", "border: 1,1,1,1,@disabledForeground,1,16; background: darken($Panel.background,5%)"); panel4.putClientProperty(FlatClientProperties.STYLE, "border: 1,1,1,1,@disabledForeground,1,16; background: darken($Panel.background,5%)");
panel4.setLayout(new BorderLayout()); panel4.setLayout(new BorderLayout());
//---- label8 ---- //---- label8 ----
@@ -546,14 +547,14 @@ class MoreComponentsPanel
//---- label13 ---- //---- label13 ----
label13.setText("rounded background"); label13.setText("rounded background");
label13.putClientProperty("FlatLaf.style", "arc: 999; border: 2,10,2,10"); label13.putClientProperty(FlatClientProperties.STYLE, "arc: 999; border: 2,10,2,10");
label13.setBackground(new Color(0xb8e4f3)); label13.setBackground(new Color(0xb8e4f3));
label13.setForeground(new Color(0x135b76)); label13.setForeground(new Color(0x135b76));
add(label13, "cell 1 13 4 1"); add(label13, "cell 1 13 4 1");
//---- label10 ---- //---- label10 ----
label10.setText("rounded border"); label10.setText("rounded border");
label10.putClientProperty("FlatLaf.style", "arc: 999; border: 2,10,2,10,#135b76"); label10.putClientProperty(FlatClientProperties.STYLE, "arc: 999; border: 2,10,2,10,#135b76");
label10.setBackground(new Color(0xb8e4f3)); label10.setBackground(new Color(0xb8e4f3));
label10.setForeground(new Color(0x135b76)); label10.setForeground(new Color(0x135b76));
add(label10, "cell 1 13 4 1"); add(label10, "cell 1 13 4 1");

View File

@@ -16,6 +16,7 @@
package com.formdev.flatlaf.demo; package com.formdev.flatlaf.demo;
import com.formdev.flatlaf.FlatClientProperties;
import static com.formdev.flatlaf.FlatClientProperties.*; import static com.formdev.flatlaf.FlatClientProperties.*;
import java.awt.*; import java.awt.*;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@@ -471,7 +472,7 @@ class TabsPanel
//---- tabPlacementLabel ---- //---- tabPlacementLabel ----
tabPlacementLabel.setText("Tab placement"); tabPlacementLabel.setText("Tab placement");
tabPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3"); tabPlacementLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
panel1.add(tabPlacementLabel, "cell 0 0"); panel1.add(tabPlacementLabel, "cell 0 0");
//======== tabPlacementToolBar ======== //======== tabPlacementToolBar ========
@@ -482,38 +483,38 @@ class TabsPanel
//---- topPlacementButton ---- //---- topPlacementButton ----
topPlacementButton.setText("top"); topPlacementButton.setText("top");
topPlacementButton.setSelected(true); topPlacementButton.setSelected(true);
topPlacementButton.putClientProperty("FlatLaf.styleClass", "small"); topPlacementButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
topPlacementButton.addActionListener(e -> tabPlacementChanged()); topPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(topPlacementButton); tabPlacementToolBar.add(topPlacementButton);
//---- bottomPlacementButton ---- //---- bottomPlacementButton ----
bottomPlacementButton.setText("bottom"); bottomPlacementButton.setText("bottom");
bottomPlacementButton.putClientProperty("FlatLaf.styleClass", "small"); bottomPlacementButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
bottomPlacementButton.addActionListener(e -> tabPlacementChanged()); bottomPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(bottomPlacementButton); tabPlacementToolBar.add(bottomPlacementButton);
//---- leftPlacementButton ---- //---- leftPlacementButton ----
leftPlacementButton.setText("left"); leftPlacementButton.setText("left");
leftPlacementButton.putClientProperty("FlatLaf.styleClass", "small"); leftPlacementButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
leftPlacementButton.addActionListener(e -> tabPlacementChanged()); leftPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(leftPlacementButton); tabPlacementToolBar.add(leftPlacementButton);
//---- rightPlacementButton ---- //---- rightPlacementButton ----
rightPlacementButton.setText("right"); rightPlacementButton.setText("right");
rightPlacementButton.putClientProperty("FlatLaf.styleClass", "small"); rightPlacementButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
rightPlacementButton.addActionListener(e -> tabPlacementChanged()); rightPlacementButton.addActionListener(e -> tabPlacementChanged());
tabPlacementToolBar.add(rightPlacementButton); tabPlacementToolBar.add(rightPlacementButton);
tabPlacementToolBar.addSeparator(); tabPlacementToolBar.addSeparator();
//---- scrollButton ---- //---- scrollButton ----
scrollButton.setText("scroll"); scrollButton.setText("scroll");
scrollButton.putClientProperty("FlatLaf.styleClass", "small"); scrollButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
scrollButton.addActionListener(e -> scrollChanged()); scrollButton.addActionListener(e -> scrollChanged());
tabPlacementToolBar.add(scrollButton); tabPlacementToolBar.add(scrollButton);
//---- borderButton ---- //---- borderButton ----
borderButton.setText("border"); borderButton.setText("border");
borderButton.putClientProperty("FlatLaf.styleClass", "small"); borderButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
borderButton.addActionListener(e -> borderChanged()); borderButton.addActionListener(e -> borderChanged());
tabPlacementToolBar.add(borderButton); tabPlacementToolBar.add(borderButton);
} }
@@ -522,7 +523,7 @@ class TabsPanel
//---- tabLayoutLabel ---- //---- tabLayoutLabel ----
tabLayoutLabel.setText("Tab layout"); tabLayoutLabel.setText("Tab layout");
tabLayoutLabel.putClientProperty("FlatLaf.styleClass", "h3"); tabLayoutLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
panel1.add(tabLayoutLabel, "cell 0 2"); panel1.add(tabLayoutLabel, "cell 0 2");
//======== tabLayoutToolBar ======== //======== tabLayoutToolBar ========
@@ -533,13 +534,13 @@ class TabsPanel
//---- scrollTabLayoutButton ---- //---- scrollTabLayoutButton ----
scrollTabLayoutButton.setText("scroll"); scrollTabLayoutButton.setText("scroll");
scrollTabLayoutButton.setSelected(true); scrollTabLayoutButton.setSelected(true);
scrollTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small"); scrollTabLayoutButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged()); scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged());
tabLayoutToolBar.add(scrollTabLayoutButton); tabLayoutToolBar.add(scrollTabLayoutButton);
//---- wrapTabLayoutButton ---- //---- wrapTabLayoutButton ----
wrapTabLayoutButton.setText("wrap"); wrapTabLayoutButton.setText("wrap");
wrapTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small"); wrapTabLayoutButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged()); wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged());
tabLayoutToolBar.add(wrapTabLayoutButton); tabLayoutToolBar.add(wrapTabLayoutButton);
} }
@@ -548,20 +549,20 @@ 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.putClientProperty("FlatLaf.styleClass", "small"); scrollLayoutNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
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.putClientProperty("FlatLaf.styleClass", "small"); wrapLayoutNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
panel1.add(wrapLayoutNoteLabel, "cell 0 3"); panel1.add(wrapLayoutNoteLabel, "cell 0 3");
panel1.add(scrollLayoutTabbedPane, "cell 0 4"); panel1.add(scrollLayoutTabbedPane, "cell 0 4");
panel1.add(wrapLayoutTabbedPane, "cell 0 4,width 100:100,height pref*2px"); panel1.add(wrapLayoutTabbedPane, "cell 0 4,width 100:100,height pref*2px");
//---- closableTabsLabel ---- //---- closableTabsLabel ----
closableTabsLabel.setText("Closable tabs"); closableTabsLabel.setText("Closable tabs");
closableTabsLabel.putClientProperty("FlatLaf.styleClass", "h3"); closableTabsLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
panel1.add(closableTabsLabel, "cell 0 5"); panel1.add(closableTabsLabel, "cell 0 5");
//======== closableTabsToolBar ======== //======== closableTabsToolBar ========
@@ -572,19 +573,19 @@ class TabsPanel
//---- squareCloseButton ---- //---- squareCloseButton ----
squareCloseButton.setText("square"); squareCloseButton.setText("square");
squareCloseButton.setSelected(true); squareCloseButton.setSelected(true);
squareCloseButton.putClientProperty("FlatLaf.styleClass", "small"); squareCloseButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
squareCloseButton.addActionListener(e -> closeButtonStyleChanged()); squareCloseButton.addActionListener(e -> closeButtonStyleChanged());
closableTabsToolBar.add(squareCloseButton); closableTabsToolBar.add(squareCloseButton);
//---- circleCloseButton ---- //---- circleCloseButton ----
circleCloseButton.setText("circle"); circleCloseButton.setText("circle");
circleCloseButton.putClientProperty("FlatLaf.styleClass", "small"); circleCloseButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
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.putClientProperty("FlatLaf.styleClass", "small"); redCrossCloseButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged()); redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged());
closableTabsToolBar.add(redCrossCloseButton); closableTabsToolBar.add(redCrossCloseButton);
} }
@@ -593,7 +594,7 @@ class TabsPanel
//---- tabAreaComponentsLabel ---- //---- tabAreaComponentsLabel ----
tabAreaComponentsLabel.setText("Custom tab area components"); tabAreaComponentsLabel.setText("Custom tab area components");
tabAreaComponentsLabel.putClientProperty("FlatLaf.styleClass", "h3"); tabAreaComponentsLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
panel1.add(tabAreaComponentsLabel, "cell 0 7"); panel1.add(tabAreaComponentsLabel, "cell 0 7");
//======== tabAreaComponentsToolBar ======== //======== tabAreaComponentsToolBar ========
@@ -604,14 +605,14 @@ class TabsPanel
//---- leadingComponentButton ---- //---- leadingComponentButton ----
leadingComponentButton.setText("leading"); leadingComponentButton.setText("leading");
leadingComponentButton.setSelected(true); leadingComponentButton.setSelected(true);
leadingComponentButton.putClientProperty("FlatLaf.styleClass", "small"); leadingComponentButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
leadingComponentButton.addActionListener(e -> customComponentsChanged()); leadingComponentButton.addActionListener(e -> customComponentsChanged());
tabAreaComponentsToolBar.add(leadingComponentButton); tabAreaComponentsToolBar.add(leadingComponentButton);
//---- trailingComponentButton ---- //---- trailingComponentButton ----
trailingComponentButton.setText("trailing"); trailingComponentButton.setText("trailing");
trailingComponentButton.setSelected(true); trailingComponentButton.setSelected(true);
trailingComponentButton.putClientProperty("FlatLaf.styleClass", "small"); trailingComponentButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
trailingComponentButton.addActionListener(e -> customComponentsChanged()); trailingComponentButton.addActionListener(e -> customComponentsChanged());
tabAreaComponentsToolBar.add(trailingComponentButton); tabAreaComponentsToolBar.add(trailingComponentButton);
} }
@@ -642,13 +643,13 @@ class TabsPanel
//---- tabIconPlacementLabel ---- //---- tabIconPlacementLabel ----
tabIconPlacementLabel.setText("Tab icon placement"); tabIconPlacementLabel.setText("Tab icon placement");
tabIconPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3"); tabIconPlacementLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
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.putClientProperty("FlatLaf.styleClass", "small"); tabIconPlacementNodeLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
panel2.add(tabIconPlacementNodeLabel, "cell 0 1"); panel2.add(tabIconPlacementNodeLabel, "cell 0 1");
panel2.add(iconTopTabbedPane, "cell 0 2"); panel2.add(iconTopTabbedPane, "cell 0 2");
panel2.add(iconBottomTabbedPane, "cell 0 3"); panel2.add(iconBottomTabbedPane, "cell 0 3");
@@ -657,13 +658,13 @@ class TabsPanel
//---- tabAreaAlignmentLabel ---- //---- tabAreaAlignmentLabel ----
tabAreaAlignmentLabel.setText("Tab area alignment"); tabAreaAlignmentLabel.setText("Tab area alignment");
tabAreaAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3"); tabAreaAlignmentLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
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.putClientProperty("FlatLaf.styleClass", "small"); tabAreaAlignmentNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7"); panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7");
panel2.add(alignLeadingTabbedPane, "cell 0 8"); panel2.add(alignLeadingTabbedPane, "cell 0 8");
panel2.add(alignCenterTabbedPane, "cell 0 9"); panel2.add(alignCenterTabbedPane, "cell 0 9");
@@ -692,13 +693,13 @@ class TabsPanel
//---- tabWidthModeLabel ---- //---- tabWidthModeLabel ----
tabWidthModeLabel.setText("Tab width mode"); tabWidthModeLabel.setText("Tab width mode");
tabWidthModeLabel.putClientProperty("FlatLaf.styleClass", "h3"); tabWidthModeLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
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.setEnabled(false); tabWidthModeNoteLabel.setEnabled(false);
tabWidthModeNoteLabel.putClientProperty("FlatLaf.styleClass", "small"); tabWidthModeNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
panel3.add(tabWidthModeNoteLabel, "cell 0 1"); panel3.add(tabWidthModeNoteLabel, "cell 0 1");
panel3.add(widthPreferredTabbedPane, "cell 0 2"); panel3.add(widthPreferredTabbedPane, "cell 0 2");
panel3.add(widthEqualTabbedPane, "cell 0 3"); panel3.add(widthEqualTabbedPane, "cell 0 3");
@@ -706,14 +707,14 @@ class TabsPanel
//---- minMaxTabWidthLabel ---- //---- minMaxTabWidthLabel ----
minMaxTabWidthLabel.setText("Minimum/maximum tab width"); minMaxTabWidthLabel.setText("Minimum/maximum tab width");
minMaxTabWidthLabel.putClientProperty("FlatLaf.styleClass", "h3"); minMaxTabWidthLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
panel3.add(minMaxTabWidthLabel, "cell 0 5"); panel3.add(minMaxTabWidthLabel, "cell 0 5");
panel3.add(minimumTabWidthTabbedPane, "cell 0 6"); panel3.add(minimumTabWidthTabbedPane, "cell 0 6");
panel3.add(maximumTabWidthTabbedPane, "cell 0 7"); panel3.add(maximumTabWidthTabbedPane, "cell 0 7");
//---- tabAlignmentLabel ---- //---- tabAlignmentLabel ----
tabAlignmentLabel.setText("Tab title alignment"); tabAlignmentLabel.setText("Tab title alignment");
tabAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3"); tabAlignmentLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
panel3.add(tabAlignmentLabel, "cell 0 8"); panel3.add(tabAlignmentLabel, "cell 0 8");
//======== panel5 ======== //======== panel5 ========
@@ -733,13 +734,13 @@ class TabsPanel
//---- tabAlignmentNoteLabel ---- //---- tabAlignmentNoteLabel ----
tabAlignmentNoteLabel.setText("(leading/center/trailing)"); tabAlignmentNoteLabel.setText("(leading/center/trailing)");
tabAlignmentNoteLabel.setEnabled(false); tabAlignmentNoteLabel.setEnabled(false);
tabAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small"); tabAlignmentNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
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.putClientProperty("FlatLaf.styleClass", "small"); tabAlignmentNoteLabel2.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
panel5.add(tabAlignmentNoteLabel2, "cell 1 0,alignx right,growx 0"); panel5.add(tabAlignmentNoteLabel2, "cell 1 0,alignx right,growx 0");
panel5.add(tabAlignLeadingTabbedPane, "cell 0 1"); panel5.add(tabAlignLeadingTabbedPane, "cell 0 1");
@@ -787,19 +788,19 @@ class TabsPanel
//---- scrollAsNeededSingleButton ---- //---- scrollAsNeededSingleButton ----
scrollAsNeededSingleButton.setText("asNeededSingle"); scrollAsNeededSingleButton.setText("asNeededSingle");
scrollAsNeededSingleButton.setSelected(true); scrollAsNeededSingleButton.setSelected(true);
scrollAsNeededSingleButton.putClientProperty("FlatLaf.styleClass", "small"); scrollAsNeededSingleButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged()); scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton); scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton);
//---- scrollAsNeededButton ---- //---- scrollAsNeededButton ----
scrollAsNeededButton.setText("asNeeded"); scrollAsNeededButton.setText("asNeeded");
scrollAsNeededButton.putClientProperty("FlatLaf.styleClass", "small"); scrollAsNeededButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged()); scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollAsNeededButton); scrollButtonsPolicyToolBar.add(scrollAsNeededButton);
//---- scrollNeverButton ---- //---- scrollNeverButton ----
scrollNeverButton.setText("never"); scrollNeverButton.setText("never");
scrollNeverButton.putClientProperty("FlatLaf.styleClass", "small"); scrollNeverButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged()); scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged());
scrollButtonsPolicyToolBar.add(scrollNeverButton); scrollButtonsPolicyToolBar.add(scrollNeverButton);
} }
@@ -817,13 +818,13 @@ class TabsPanel
//---- popupAsNeededButton ---- //---- popupAsNeededButton ----
popupAsNeededButton.setText("asNeeded"); popupAsNeededButton.setText("asNeeded");
popupAsNeededButton.setSelected(true); popupAsNeededButton.setSelected(true);
popupAsNeededButton.putClientProperty("FlatLaf.styleClass", "small"); popupAsNeededButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged()); popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged());
tabsPopupPolicyToolBar.add(popupAsNeededButton); tabsPopupPolicyToolBar.add(popupAsNeededButton);
//---- popupNeverButton ---- //---- popupNeverButton ----
popupNeverButton.setText("never"); popupNeverButton.setText("never");
popupNeverButton.putClientProperty("FlatLaf.styleClass", "small"); popupNeverButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged()); popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged());
tabsPopupPolicyToolBar.add(popupNeverButton); tabsPopupPolicyToolBar.add(popupNeverButton);
} }
@@ -846,13 +847,13 @@ class TabsPanel
//---- scrollBothButton ---- //---- scrollBothButton ----
scrollBothButton.setText("both"); scrollBothButton.setText("both");
scrollBothButton.setSelected(true); scrollBothButton.setSelected(true);
scrollBothButton.putClientProperty("FlatLaf.styleClass", "small"); scrollBothButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged()); scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged());
scrollButtonsPlacementToolBar.add(scrollBothButton); scrollButtonsPlacementToolBar.add(scrollBothButton);
//---- scrollTrailingButton ---- //---- scrollTrailingButton ----
scrollTrailingButton.setText("trailing"); scrollTrailingButton.setText("trailing");
scrollTrailingButton.putClientProperty("FlatLaf.styleClass", "small"); scrollTrailingButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged()); scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged());
scrollButtonsPlacementToolBar.add(scrollTrailingButton); scrollButtonsPlacementToolBar.add(scrollTrailingButton);
} }
@@ -869,13 +870,13 @@ class TabsPanel
//---- underlinedTabTypeButton ---- //---- underlinedTabTypeButton ----
underlinedTabTypeButton.setText("underlined"); underlinedTabTypeButton.setText("underlined");
underlinedTabTypeButton.setSelected(true); underlinedTabTypeButton.setSelected(true);
underlinedTabTypeButton.putClientProperty("FlatLaf.styleClass", "small"); underlinedTabTypeButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
underlinedTabTypeButton.addActionListener(e -> tabTypeChanged()); underlinedTabTypeButton.addActionListener(e -> tabTypeChanged());
tabTypeToolBar.add(underlinedTabTypeButton); tabTypeToolBar.add(underlinedTabTypeButton);
//---- cardTabTypeButton ---- //---- cardTabTypeButton ----
cardTabTypeButton.setText("card"); cardTabTypeButton.setText("card");
cardTabTypeButton.putClientProperty("FlatLaf.styleClass", "small"); cardTabTypeButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
cardTabTypeButton.addActionListener(e -> tabTypeChanged()); cardTabTypeButton.addActionListener(e -> tabTypeChanged());
tabTypeToolBar.add(cardTabTypeButton); tabTypeToolBar.add(cardTabTypeButton);
} }
@@ -893,25 +894,25 @@ class TabsPanel
//---- rotationNoneButton ---- //---- rotationNoneButton ----
rotationNoneButton.setText("none"); rotationNoneButton.setText("none");
rotationNoneButton.setSelected(true); rotationNoneButton.setSelected(true);
rotationNoneButton.putClientProperty("FlatLaf.styleClass", "small"); rotationNoneButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
rotationNoneButton.addActionListener(e -> tabRotationChanged()); rotationNoneButton.addActionListener(e -> tabRotationChanged());
tabRotationToolBar.add(rotationNoneButton); tabRotationToolBar.add(rotationNoneButton);
//---- rotationAutoButton ---- //---- rotationAutoButton ----
rotationAutoButton.setText("auto"); rotationAutoButton.setText("auto");
rotationAutoButton.putClientProperty("FlatLaf.styleClass", "small"); rotationAutoButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
rotationAutoButton.addActionListener(e -> tabRotationChanged()); rotationAutoButton.addActionListener(e -> tabRotationChanged());
tabRotationToolBar.add(rotationAutoButton); tabRotationToolBar.add(rotationAutoButton);
//---- rotationLeftButton ---- //---- rotationLeftButton ----
rotationLeftButton.setText("left"); rotationLeftButton.setText("left");
rotationLeftButton.putClientProperty("FlatLaf.styleClass", "small"); rotationLeftButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
rotationLeftButton.addActionListener(e -> tabRotationChanged()); rotationLeftButton.addActionListener(e -> tabRotationChanged());
tabRotationToolBar.add(rotationLeftButton); tabRotationToolBar.add(rotationLeftButton);
//---- rotationRightButton ---- //---- rotationRightButton ----
rotationRightButton.setText("right"); rotationRightButton.setText("right");
rotationRightButton.putClientProperty("FlatLaf.styleClass", "small"); rotationRightButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
rotationRightButton.addActionListener(e -> tabRotationChanged()); rotationRightButton.addActionListener(e -> tabRotationChanged());
tabRotationToolBar.add(rotationRightButton); tabRotationToolBar.add(rotationRightButton);
} }

View File

@@ -45,6 +45,7 @@ import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.CompoundBorder; import javax.swing.border.CompoundBorder;
import javax.swing.event.*; import javax.swing.event.*;
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;
@@ -554,7 +555,7 @@ public class IJThemesPanel
"light", "light",
"dark" "dark"
})); }));
filterComboBox.putClientProperty("JComponent.minimumWidth", 0); filterComboBox.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
filterComboBox.setFocusable(false); filterComboBox.setFocusable(false);
filterComboBox.addActionListener(e -> filterChanged()); filterComboBox.addActionListener(e -> filterChanged());
add(filterComboBox, "cell 0 0,alignx right,growx 0"); add(filterComboBox, "cell 0 0,alignx right,growx 0");

View File

@@ -23,6 +23,7 @@ import javax.swing.LookAndFeel;
import javax.swing.UIDefaults; import javax.swing.UIDefaults;
import javax.swing.UIManager; import javax.swing.UIManager;
import javax.swing.UIDefaults.ActiveValue; import javax.swing.UIDefaults.ActiveValue;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatDefaultsAddon; import com.formdev.flatlaf.FlatDefaultsAddon;
import com.formdev.flatlaf.FlatLaf; import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.jideoss.ui.FlatJidePainter; import com.formdev.flatlaf.jideoss.ui.FlatJidePainter;
@@ -55,8 +56,8 @@ public class FlatJideOssDefaultsAddon
public void afterDefaultsLoading( LookAndFeel laf, UIDefaults defaults ) { public void afterDefaultsLoading( LookAndFeel laf, UIDefaults defaults ) {
// TristateCheckBox // TristateCheckBox
defaults.put( "TristateCheckBox.icon", null ); defaults.put( "TristateCheckBox.icon", null );
defaults.put( "TristateCheckBox.setMixed.clientProperty", new Object[] { "JButton.selectedState", "indeterminate" } ); defaults.put( "TristateCheckBox.setMixed.clientProperty", new Object[] { FlatClientProperties.SELECTED_STATE, FlatClientProperties.SELECTED_STATE_INDETERMINATE } );
defaults.put( "TristateCheckBox.clearMixed.clientProperty", new Object[] { "JButton.selectedState", null } ); defaults.put( "TristateCheckBox.clearMixed.clientProperty", new Object[] { FlatClientProperties.SELECTED_STATE, null } );
} }
@Override @Override

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -241,7 +241,7 @@ public class FlatWindowDecorationsTest
tallCompCheckBox.setSelected( false ); tallCompCheckBox.setSelected( false );
JButton myButton = new JButton( "?" ); JButton myButton = new JButton( "?" );
myButton.putClientProperty( "JButton.buttonType", "toolBarButton" ); myButton.putClientProperty( FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_TOOLBAR_BUTTON );
myButton.setFocusable( false ); myButton.setFocusable( false );
menuBar.add( Box.createGlue() ); menuBar.add( Box.createGlue() );
@@ -499,7 +499,7 @@ debug*/
if( typeUtilityRadioButton.isSelected() ) if( typeUtilityRadioButton.isSelected() )
window.setType( Window.Type.UTILITY ); window.setType( Window.Type.UTILITY );
else if( typeSmallRadioButton.isSelected() ) 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() { private void decorationStyleChanged() {

View File

@@ -28,6 +28,7 @@ import javax.swing.UIDefaults.ActiveValue;
import javax.swing.UIDefaults.LazyValue; import javax.swing.UIDefaults.LazyValue;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatLaf; import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.UIDefaultsLoaderAccessor; import com.formdev.flatlaf.UIDefaultsLoaderAccessor;
import com.formdev.flatlaf.extras.components.*; import com.formdev.flatlaf.extras.components.*;
@@ -252,7 +253,7 @@ class FlatThemePreview
//---- previewLabel ---- //---- previewLabel ----
previewLabel.setText(" Preview "); previewLabel.setText(" Preview ");
previewLabel.putClientProperty("FlatLaf.styleClass", "h2"); previewLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h2");
// JFormDesigner - End of component initialization //GEN-END:initComponents // JFormDesigner - End of component initialization //GEN-END:initComponents
} }

View File

@@ -423,7 +423,7 @@ class FlatThemePreviewAll
//---- label1 ---- //---- label1 ----
label1.setText("Some Text"); label1.setText("Some Text");
label1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-label"); label1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-label");
add(label1, "cell 1 1 2 1"); add(label1, "cell 1 1 2 1");
//---- flatButton1 ---- //---- flatButton1 ----
@@ -438,12 +438,12 @@ class FlatThemePreviewAll
//---- button1 ---- //---- button1 ----
button1.setText("OK"); button1.setText("OK");
button1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-button"); button1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-button");
add(button1, "cell 1 2"); add(button1, "cell 1 2");
//---- testDefaultButton1 ---- //---- testDefaultButton1 ----
testDefaultButton1.setText("Default"); testDefaultButton1.setText("Default");
testDefaultButton1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-button"); testDefaultButton1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-button");
add(testDefaultButton1, "cell 2 2"); add(testDefaultButton1, "cell 2 2");
//---- toggleButtonLabel ---- //---- toggleButtonLabel ----
@@ -452,13 +452,13 @@ class FlatThemePreviewAll
//---- toggleButton1 ---- //---- toggleButton1 ----
toggleButton1.setText("Unselected"); toggleButton1.setText("Unselected");
toggleButton1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-togglebutton"); toggleButton1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-togglebutton");
add(toggleButton1, "cell 1 3"); add(toggleButton1, "cell 1 3");
//---- toggleButton3 ---- //---- toggleButton3 ----
toggleButton3.setText("Selected"); toggleButton3.setText("Selected");
toggleButton3.setSelected(true); toggleButton3.setSelected(true);
toggleButton3.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-togglebutton"); toggleButton3.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-togglebutton");
add(toggleButton3, "cell 2 3"); add(toggleButton3, "cell 2 3");
//---- checkBoxLabel ---- //---- checkBoxLabel ----
@@ -467,13 +467,13 @@ class FlatThemePreviewAll
//---- checkBox1 ---- //---- checkBox1 ----
checkBox1.setText("Unselected"); checkBox1.setText("Unselected");
checkBox1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-checkbox"); checkBox1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-checkbox");
add(checkBox1, "cell 1 4,alignx left,growx 0"); add(checkBox1, "cell 1 4,alignx left,growx 0");
//---- checkBox3 ---- //---- checkBox3 ----
checkBox3.setText("Selected"); checkBox3.setText("Selected");
checkBox3.setSelected(true); checkBox3.setSelected(true);
checkBox3.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-checkbox"); checkBox3.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-checkbox");
add(checkBox3, "cell 2 4,alignx left,growx 0"); add(checkBox3, "cell 2 4,alignx left,growx 0");
//---- radioButtonLabel ---- //---- radioButtonLabel ----
@@ -482,13 +482,13 @@ class FlatThemePreviewAll
//---- radioButton1 ---- //---- radioButton1 ----
radioButton1.setText("Unselected"); radioButton1.setText("Unselected");
radioButton1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-radiobutton"); radioButton1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-radiobutton");
add(radioButton1, "cell 1 5,alignx left,growx 0"); add(radioButton1, "cell 1 5,alignx left,growx 0");
//---- radioButton3 ---- //---- radioButton3 ----
radioButton3.setText("Selected"); radioButton3.setText("Selected");
radioButton3.setSelected(true); radioButton3.setSelected(true);
radioButton3.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-radiobutton"); radioButton3.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-radiobutton");
add(radioButton3, "cell 2 5,alignx left,growx 0"); add(radioButton3, "cell 2 5,alignx left,growx 0");
//---- comboBoxLabel ---- //---- comboBoxLabel ----
@@ -513,7 +513,7 @@ class FlatThemePreviewAll
})); }));
comboBox1.setMaximumRowCount(6); comboBox1.setMaximumRowCount(6);
comboBox1.setPlaceholderText("placeholder text"); comboBox1.setPlaceholderText("placeholder text");
comboBox1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-combobox"); comboBox1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-combobox");
add(comboBox1, "cell 1 6"); add(comboBox1, "cell 1 6");
//---- comboBox3 ---- //---- comboBox3 ----
@@ -526,7 +526,7 @@ class FlatThemePreviewAll
"e" "e"
})); }));
comboBox3.setMaximumRowCount(6); comboBox3.setMaximumRowCount(6);
comboBox3.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-combobox"); comboBox3.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-combobox");
add(comboBox3, "cell 2 6"); add(comboBox3, "cell 2 6");
//---- spinnerLabel ---- //---- spinnerLabel ----
@@ -534,7 +534,7 @@ class FlatThemePreviewAll
add(spinnerLabel, "cell 0 7"); add(spinnerLabel, "cell 0 7");
//---- spinner1 ---- //---- spinner1 ----
spinner1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-spinner"); spinner1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-spinner");
add(spinner1, "cell 1 7 2 1"); add(spinner1, "cell 1 7 2 1");
//---- textFieldLabel ---- //---- textFieldLabel ----
@@ -544,24 +544,24 @@ class FlatThemePreviewAll
//---- textField1 ---- //---- textField1 ----
textField1.setText("Some Text"); textField1.setText("Some Text");
textField1.setPlaceholderText("placeholder text"); textField1.setPlaceholderText("placeholder text");
textField1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-textfield"); textField1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-textfield");
add(textField1, "cell 1 8"); add(textField1, "cell 1 8");
//---- textField2 ---- //---- textField2 ----
textField2.setText("Txt"); textField2.setText("Txt");
textField2.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-textfield"); textField2.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-textfield");
add(textField2, "cell 2 8"); add(textField2, "cell 2 8");
//---- formattedTextField1 ---- //---- formattedTextField1 ----
formattedTextField1.setText("Some Text"); formattedTextField1.setText("Some Text");
formattedTextField1.setPlaceholderText("placeholder text"); formattedTextField1.setPlaceholderText("placeholder text");
formattedTextField1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-formattedtextfield"); formattedTextField1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-formattedtextfield");
add(formattedTextField1, "cell 1 9"); add(formattedTextField1, "cell 1 9");
//---- passwordField1 ---- //---- passwordField1 ----
passwordField1.setText("Some Text"); passwordField1.setText("Some Text");
passwordField1.setPlaceholderText("placeholder text"); passwordField1.setPlaceholderText("placeholder text");
passwordField1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-passwordfield"); passwordField1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-passwordfield");
passwordField1.setShowClearButton(true); passwordField1.setShowClearButton(true);
add(passwordField1, "cell 2 9"); add(passwordField1, "cell 2 9");
@@ -577,7 +577,7 @@ class FlatThemePreviewAll
//---- textArea1 ---- //---- textArea1 ----
textArea1.setText("Text"); textArea1.setText("Text");
textArea1.setRows(2); textArea1.setRows(2);
textArea1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-textarea"); textArea1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-textarea");
scrollPane1.setViewportView(textArea1); scrollPane1.setViewportView(textArea1);
} }
add(scrollPane1, "cell 1 10 2 1,width 40"); add(scrollPane1, "cell 1 10 2 1,width 40");
@@ -589,7 +589,7 @@ class FlatThemePreviewAll
//---- editorPane1 ---- //---- editorPane1 ----
editorPane1.setText("Text"); editorPane1.setText("Text");
editorPane1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-editorpane"); editorPane1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-editorpane");
scrollPane5.setViewportView(editorPane1); scrollPane5.setViewportView(editorPane1);
} }
add(scrollPane5, "cell 1 10 2 1,width 40"); add(scrollPane5, "cell 1 10 2 1,width 40");
@@ -601,7 +601,7 @@ class FlatThemePreviewAll
//---- textPane1 ---- //---- textPane1 ----
textPane1.setText("Text"); textPane1.setText("Text");
textPane1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-textpane"); textPane1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-textpane");
scrollPane9.setViewportView(textPane1); scrollPane9.setViewportView(textPane1);
} }
add(scrollPane9, "cell 1 10 2 1,width 40"); add(scrollPane9, "cell 1 10 2 1,width 40");
@@ -615,62 +615,62 @@ 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.putClientProperty("FlatLaf.styleClass", "small"); menuUnderlineSelectionButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
menuUnderlineSelectionButton.addActionListener(e -> menuUnderlineSelectionChanged()); menuUnderlineSelectionButton.addActionListener(e -> menuUnderlineSelectionChanged());
add(menuUnderlineSelectionButton, "cell 0 11"); add(menuUnderlineSelectionButton, "cell 0 11");
//======== menuBar1 ======== //======== menuBar1 ========
{ {
menuBar1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menubar"); menuBar1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menubar");
//======== menu2 ======== //======== menu2 ========
{ {
menu2.setText("JMenu"); menu2.setText("JMenu");
menu2.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menu"); menu2.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menu");
//---- menuItem3 ---- //---- menuItem3 ----
menuItem3.setText("JMenuItem"); menuItem3.setText("JMenuItem");
menuItem3.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menuitem"); menuItem3.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menuitem");
menu2.add(menuItem3); menu2.add(menuItem3);
//---- menuItem4 ---- //---- menuItem4 ----
menuItem4.setText("JMenuItem"); menuItem4.setText("JMenuItem");
menuItem4.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menuitem"); menuItem4.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menuitem");
menu2.add(menuItem4); menu2.add(menuItem4);
menu2.addSeparator(); menu2.addSeparator();
//---- checkBoxMenuItem2 ---- //---- checkBoxMenuItem2 ----
checkBoxMenuItem2.setText("JCheckBoxMenuItem"); checkBoxMenuItem2.setText("JCheckBoxMenuItem");
checkBoxMenuItem2.setSelected(true); checkBoxMenuItem2.setSelected(true);
checkBoxMenuItem2.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-checkboxmenuitem"); checkBoxMenuItem2.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-checkboxmenuitem");
menu2.add(checkBoxMenuItem2); menu2.add(checkBoxMenuItem2);
//---- checkBoxMenuItem3 ---- //---- checkBoxMenuItem3 ----
checkBoxMenuItem3.setText("JCheckBoxMenuItem"); checkBoxMenuItem3.setText("JCheckBoxMenuItem");
checkBoxMenuItem3.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-checkboxmenuitem"); checkBoxMenuItem3.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-checkboxmenuitem");
menu2.add(checkBoxMenuItem3); menu2.add(checkBoxMenuItem3);
menu2.addSeparator(); menu2.addSeparator();
//---- radioButtonMenuItem4 ---- //---- radioButtonMenuItem4 ----
radioButtonMenuItem4.setText("JRadioButtonMenuItem"); radioButtonMenuItem4.setText("JRadioButtonMenuItem");
radioButtonMenuItem4.setSelected(true); radioButtonMenuItem4.setSelected(true);
radioButtonMenuItem4.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-radiobuttonmenuitem"); radioButtonMenuItem4.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-radiobuttonmenuitem");
menu2.add(radioButtonMenuItem4); menu2.add(radioButtonMenuItem4);
//---- radioButtonMenuItem5 ---- //---- radioButtonMenuItem5 ----
radioButtonMenuItem5.setText("JRadioButtonMenuItem"); radioButtonMenuItem5.setText("JRadioButtonMenuItem");
radioButtonMenuItem5.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-radiobuttonmenuitem"); radioButtonMenuItem5.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-radiobuttonmenuitem");
menu2.add(radioButtonMenuItem5); menu2.add(radioButtonMenuItem5);
menu2.addSeparator(); menu2.addSeparator();
//======== menu4 ======== //======== menu4 ========
{ {
menu4.setText("JMenu"); menu4.setText("JMenu");
menu4.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menu"); menu4.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menu");
//---- menuItem6 ---- //---- menuItem6 ----
menuItem6.setText("JMenuItem"); menuItem6.setText("JMenuItem");
menuItem6.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menuitem"); menuItem6.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menuitem");
menu4.add(menuItem6); menu4.add(menuItem6);
} }
menu2.add(menu4); menu2.add(menu4);
@@ -678,11 +678,11 @@ class FlatThemePreviewAll
//======== menu5 ======== //======== menu5 ========
{ {
menu5.setText("JMenu"); menu5.setText("JMenu");
menu5.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menu"); menu5.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menu");
//---- menuItem7 ---- //---- menuItem7 ----
menuItem7.setText("JMenuItem"); menuItem7.setText("JMenuItem");
menuItem7.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menuitem"); menuItem7.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menuitem");
menu5.add(menuItem7); menu5.add(menuItem7);
} }
menu2.add(menu5); menu2.add(menu5);
@@ -692,22 +692,22 @@ class FlatThemePreviewAll
//======== menu3 ======== //======== menu3 ========
{ {
menu3.setText("JMenu"); menu3.setText("JMenu");
menu3.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menu"); menu3.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menu");
//---- menuItem5 ---- //---- menuItem5 ----
menuItem5.setText("JMenuItem"); menuItem5.setText("JMenuItem");
menuItem5.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.CTRL_DOWN_MASK|KeyEvent.ALT_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK)); menuItem5.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.CTRL_DOWN_MASK|KeyEvent.ALT_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK));
menuItem5.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menuitem"); menuItem5.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menuitem");
menu3.add(menuItem5); menu3.add(menuItem5);
//---- menuItem8 ---- //---- menuItem8 ----
menuItem8.setText("JMenuItem"); menuItem8.setText("JMenuItem");
menuItem8.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menuitem"); menuItem8.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menuitem");
menu3.add(menuItem8); menu3.add(menuItem8);
//---- menuItem9 ---- //---- menuItem9 ----
menuItem9.setText("JMenuItem"); menuItem9.setText("JMenuItem");
menuItem9.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-menuitem"); menuItem9.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-menuitem");
menu3.add(menuItem9); menu3.add(menuItem9);
} }
menuBar1.add(menu3); menuBar1.add(menu3);
@@ -720,14 +720,14 @@ class FlatThemePreviewAll
//---- scrollBar1 ---- //---- scrollBar1 ----
scrollBar1.setOrientation(Adjustable.HORIZONTAL); scrollBar1.setOrientation(Adjustable.HORIZONTAL);
scrollBar1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-scrollbar"); scrollBar1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-scrollbar");
scrollBar1.setVisibleAmount(50); scrollBar1.setVisibleAmount(50);
add(scrollBar1, "cell 1 12 2 1"); add(scrollBar1, "cell 1 12 2 1");
//---- scrollBar5 ---- //---- scrollBar5 ----
scrollBar5.setOrientation(Adjustable.HORIZONTAL); scrollBar5.setOrientation(Adjustable.HORIZONTAL);
scrollBar5.setShowButtons(true); scrollBar5.setShowButtons(true);
scrollBar5.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-scrollbar"); scrollBar5.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-scrollbar");
scrollBar5.setVisibleAmount(50); scrollBar5.setVisibleAmount(50);
add(scrollBar5, "cell 1 13 2 1"); add(scrollBar5, "cell 1 13 2 1");
@@ -736,7 +736,7 @@ class FlatThemePreviewAll
add(separatorLabel, "cell 0 14"); add(separatorLabel, "cell 0 14");
//---- separator1 ---- //---- separator1 ----
separator1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-separator"); separator1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-separator");
add(separator1, "cell 1 14 2 1"); add(separator1, "cell 1 14 2 1");
//---- sliderLabel ---- //---- sliderLabel ----
@@ -744,7 +744,7 @@ class FlatThemePreviewAll
add(sliderLabel, "cell 0 15"); add(sliderLabel, "cell 0 15");
//---- slider1 ---- //---- slider1 ----
slider1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-slider"); slider1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-slider");
add(slider1, "cell 1 15 2 1,width 100"); add(slider1, "cell 1 15 2 1,width 100");
//---- slider3 ---- //---- slider3 ----
@@ -752,7 +752,7 @@ class FlatThemePreviewAll
slider3.setPaintTicks(true); slider3.setPaintTicks(true);
slider3.setMajorTickSpacing(50); slider3.setMajorTickSpacing(50);
slider3.setPaintLabels(true); slider3.setPaintLabels(true);
slider3.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-slider"); slider3.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-slider");
slider3.addChangeListener(e -> changeProgress()); slider3.addChangeListener(e -> changeProgress());
add(slider3, "cell 1 16 2 1,width 100"); add(slider3, "cell 1 16 2 1,width 100");
@@ -762,13 +762,13 @@ class FlatThemePreviewAll
//---- progressBar1 ---- //---- progressBar1 ----
progressBar1.setValue(50); progressBar1.setValue(50);
progressBar1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-progressbar"); progressBar1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-progressbar");
add(progressBar1, "cell 1 17 2 1"); add(progressBar1, "cell 1 17 2 1");
//---- progressBar2 ---- //---- progressBar2 ----
progressBar2.setValue(50); progressBar2.setValue(50);
progressBar2.setStringPainted(true); progressBar2.setStringPainted(true);
progressBar2.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-progressbar"); progressBar2.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-progressbar");
add(progressBar2, "cell 1 18 2 1"); add(progressBar2, "cell 1 18 2 1");
//---- toolTipLabel ---- //---- toolTipLabel ----
@@ -777,7 +777,7 @@ class FlatThemePreviewAll
//---- toolTip1 ---- //---- toolTip1 ----
toolTip1.setTipText("Some text in tool tip."); toolTip1.setTipText("Some text in tool tip.");
toolTip1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-tooltip"); toolTip1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-tooltip");
add(toolTip1, "cell 1 19 2 1,alignx left,growx 0"); add(toolTip1, "cell 1 19 2 1,alignx left,growx 0");
//---- toolBarLabel ---- //---- toolBarLabel ----
@@ -786,39 +786,39 @@ class FlatThemePreviewAll
//======== toolBar1 ======== //======== toolBar1 ========
{ {
toolBar1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-toolbar"); toolBar1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-toolbar");
//---- button4 ---- //---- button4 ----
button4.setIcon(UIManager.getIcon("Tree.closedIcon")); button4.setIcon(UIManager.getIcon("Tree.closedIcon"));
button4.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-toolbar-button"); button4.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-toolbar-button");
toolBar1.add(button4); toolBar1.add(button4);
//---- button6 ---- //---- button6 ----
button6.setIcon(UIManager.getIcon("Tree.openIcon")); button6.setIcon(UIManager.getIcon("Tree.openIcon"));
button6.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-toolbar-button"); button6.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-toolbar-button");
toolBar1.add(button6); toolBar1.add(button6);
toolBar1.addSeparator(); toolBar1.addSeparator();
//---- button7 ---- //---- button7 ----
button7.setIcon(UIManager.getIcon("Tree.leafIcon")); button7.setIcon(UIManager.getIcon("Tree.leafIcon"));
button7.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-toolbar-togglebutton"); button7.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-toolbar-togglebutton");
toolBar1.add(button7); toolBar1.add(button7);
//---- button8 ---- //---- button8 ----
button8.setIcon(UIManager.getIcon("Tree.leafIcon")); button8.setIcon(UIManager.getIcon("Tree.leafIcon"));
button8.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-toolbar-togglebutton"); button8.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-toolbar-togglebutton");
toolBar1.add(button8); toolBar1.add(button8);
//---- button9 ---- //---- button9 ----
button9.setIcon(UIManager.getIcon("Tree.leafIcon")); button9.setIcon(UIManager.getIcon("Tree.leafIcon"));
button9.setSelected(true); button9.setSelected(true);
button9.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-toolbar-togglebutton"); button9.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-toolbar-togglebutton");
toolBar1.add(button9); toolBar1.add(button9);
//---- button10 ---- //---- button10 ----
button10.setIcon(UIManager.getIcon("Tree.leafIcon")); button10.setIcon(UIManager.getIcon("Tree.leafIcon"));
button10.setSelected(true); button10.setSelected(true);
button10.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-toolbar-togglebutton"); button10.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-toolbar-togglebutton");
toolBar1.add(button10); toolBar1.add(button10);
} }
add(toolBar1, "cell 1 20 2 1"); add(toolBar1, "cell 1 20 2 1");
@@ -829,7 +829,7 @@ class FlatThemePreviewAll
//======== tabbedPane1 ======== //======== tabbedPane1 ========
{ {
tabbedPane1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-tabbedpane"); tabbedPane1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-tabbedpane");
} }
add(tabbedPane1, "cell 1 21 2 1"); add(tabbedPane1, "cell 1 21 2 1");
@@ -840,7 +840,7 @@ class FlatThemePreviewAll
//======== splitPane1 ======== //======== splitPane1 ========
{ {
splitPane1.setResizeWeight(0.5); splitPane1.setResizeWeight(0.5);
splitPane1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-splitpane"); splitPane1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-splitpane");
//======== scrollPane2 ======== //======== scrollPane2 ========
{ {
@@ -858,7 +858,7 @@ class FlatThemePreviewAll
@Override @Override
public String getElementAt(int i) { return values[i]; } public String getElementAt(int i) { return values[i]; }
}); });
list1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-list"); list1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-list");
scrollPane2.setViewportView(list1); scrollPane2.setViewportView(list1);
} }
splitPane1.setLeftComponent(scrollPane2); splitPane1.setLeftComponent(scrollPane2);
@@ -879,7 +879,7 @@ class FlatThemePreviewAll
add(node1); add(node1);
} }
})); }));
tree1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-tree"); tree1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-tree");
scrollPane3.setViewportView(tree1); scrollPane3.setViewportView(tree1);
} }
splitPane1.setRightComponent(scrollPane3); splitPane1.setRightComponent(scrollPane3);
@@ -903,7 +903,7 @@ class FlatThemePreviewAll
"Column 1", "Column 2" "Column 1", "Column 2"
} }
)); ));
table1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-table"); table1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-table");
scrollPane4.setViewportView(table1); scrollPane4.setViewportView(table1);
} }
add(scrollPane4, "cell 1 23 2 1,width 100,height 70"); add(scrollPane4, "cell 1 23 2 1,width 100,height 70");
@@ -914,7 +914,7 @@ class FlatThemePreviewAll
//======== desktopPane1 ======== //======== desktopPane1 ========
{ {
desktopPane1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-desktoppane"); desktopPane1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-desktoppane");
//======== internalFrame1 ======== //======== internalFrame1 ========
{ {
@@ -924,7 +924,7 @@ class FlatThemePreviewAll
internalFrame1.setMaximizable(true); internalFrame1.setMaximizable(true);
internalFrame1.setIconifiable(true); internalFrame1.setIconifiable(true);
internalFrame1.setResizable(true); internalFrame1.setResizable(true);
internalFrame1.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-internalframe"); internalFrame1.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-internalframe");
Container internalFrame1ContentPane = internalFrame1.getContentPane(); Container internalFrame1ContentPane = internalFrame1.getContentPane();
internalFrame1ContentPane.setLayout(new BorderLayout()); internalFrame1ContentPane.setLayout(new BorderLayout());
} }
@@ -939,7 +939,7 @@ class FlatThemePreviewAll
internalFrame2.setMaximizable(true); internalFrame2.setMaximizable(true);
internalFrame2.setResizable(true); internalFrame2.setResizable(true);
internalFrame2.setTitle("Inactive"); internalFrame2.setTitle("Inactive");
internalFrame2.putClientProperty("FlatLaf.styleClass", "flatlaf-preview-internalframe"); internalFrame2.putClientProperty(FlatClientProperties.STYLE_CLASS, "flatlaf-preview-internalframe");
Container internalFrame2ContentPane = internalFrame2.getContentPane(); Container internalFrame2ContentPane = internalFrame2.getContentPane();
internalFrame2ContentPane.setLayout(new BorderLayout()); internalFrame2ContentPane.setLayout(new BorderLayout());
} }

View File

@@ -21,6 +21,7 @@ import java.awt.Component;
import java.util.Objects; import java.util.Objects;
import java.util.function.Predicate; import java.util.function.Predicate;
import javax.swing.*; import javax.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
import net.miginfocom.swing.*; import net.miginfocom.swing.*;
/** /**
@@ -232,25 +233,25 @@ class FlatThemePreviewButtons
//---- noneButton ---- //---- noneButton ----
noneButton.setText("none"); noneButton.setText("none");
noneButton.setSelected(true); noneButton.setSelected(true);
noneButton.putClientProperty("FlatLaf.styleClass", "small"); noneButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
noneButton.addActionListener(e -> buttonTypeChanged()); noneButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(noneButton); buttonTypeToolBar1.add(noneButton);
//---- squareButton ---- //---- squareButton ----
squareButton.setText("square"); squareButton.setText("square");
squareButton.putClientProperty("FlatLaf.styleClass", "small"); squareButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
squareButton.addActionListener(e -> buttonTypeChanged()); squareButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(squareButton); buttonTypeToolBar1.add(squareButton);
//---- roundRectButton ---- //---- roundRectButton ----
roundRectButton.setText("roundRect"); roundRectButton.setText("roundRect");
roundRectButton.putClientProperty("FlatLaf.styleClass", "small"); roundRectButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
roundRectButton.addActionListener(e -> buttonTypeChanged()); roundRectButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(roundRectButton); buttonTypeToolBar1.add(roundRectButton);
//---- tabButton ---- //---- tabButton ----
tabButton.setText("tab"); tabButton.setText("tab");
tabButton.putClientProperty("FlatLaf.styleClass", "small"); tabButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
tabButton.addActionListener(e -> buttonTypeChanged()); tabButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(tabButton); buttonTypeToolBar1.add(tabButton);
} }
@@ -263,13 +264,13 @@ class FlatThemePreviewButtons
//---- toolBarButtonButton ---- //---- toolBarButtonButton ----
toolBarButtonButton.setText("toolBarButton"); toolBarButtonButton.setText("toolBarButton");
toolBarButtonButton.putClientProperty("FlatLaf.styleClass", "small"); toolBarButtonButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
toolBarButtonButton.addActionListener(e -> buttonTypeChanged()); toolBarButtonButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar2.add(toolBarButtonButton); buttonTypeToolBar2.add(toolBarButtonButton);
//---- borderlessButton ---- //---- borderlessButton ----
borderlessButton.setText("borderless"); borderlessButton.setText("borderless");
borderlessButton.putClientProperty("FlatLaf.styleClass", "small"); borderlessButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
borderlessButton.addActionListener(e -> buttonTypeChanged()); borderlessButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar2.add(borderlessButton); buttonTypeToolBar2.add(borderlessButton);
} }
@@ -279,7 +280,7 @@ class FlatThemePreviewButtons
//---- label11 ---- //---- label11 ----
label11.setText("JButton"); label11.setText("JButton");
label11.putClientProperty("FlatLaf.styleClass", "h3"); label11.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(label11, "cell 0 1 3 1"); add(label11, "cell 0 1 3 1");
//---- label27 ---- //---- label27 ----
@@ -292,22 +293,22 @@ class FlatThemePreviewButtons
//---- label5 ---- //---- label5 ----
label5.setText("regular"); label5.setText("regular");
label5.putClientProperty("FlatLaf.styleClass", "small"); label5.putClientProperty(FlatClientProperties.STYLE_CLASS, "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.putClientProperty("FlatLaf.styleClass", "small"); label7.putClientProperty(FlatClientProperties.STYLE_CLASS, "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.putClientProperty("FlatLaf.styleClass", "small"); label6.putClientProperty(FlatClientProperties.STYLE_CLASS, "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.putClientProperty("FlatLaf.styleClass", "small"); label8.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
add(label8, "cell 4 3,alignx center,growx 0"); add(label8, "cell 4 3,alignx center,growx 0");
//---- label1 ---- //---- label1 ----
@@ -316,26 +317,26 @@ class FlatThemePreviewButtons
//---- testStateButton1 ---- //---- testStateButton1 ----
testStateButton1.setText("OK"); testStateButton1.setText("OK");
testStateButton1.putClientProperty("JComponent.minimumWidth", 0); testStateButton1.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton1, "cell 1 4"); add(testStateButton1, "cell 1 4");
//---- testStateButton7 ---- //---- testStateButton7 ----
testStateButton7.setText("OK"); testStateButton7.setText("OK");
testStateButton7.setStateDefault(true); testStateButton7.setStateDefault(true);
testStateButton7.putClientProperty("JComponent.minimumWidth", 0); testStateButton7.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton7, "cell 2 4"); add(testStateButton7, "cell 2 4");
//---- testStateButton4 ---- //---- testStateButton4 ----
testStateButton4.setText("OK"); testStateButton4.setText("OK");
testStateButton4.setStateFocused(true); testStateButton4.setStateFocused(true);
testStateButton4.putClientProperty("JComponent.minimumWidth", 0); testStateButton4.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton4, "cell 3 4"); add(testStateButton4, "cell 3 4");
//---- testStateButton10 ---- //---- testStateButton10 ----
testStateButton10.setText("OK"); testStateButton10.setText("OK");
testStateButton10.setStateFocused(true); testStateButton10.setStateFocused(true);
testStateButton10.setStateDefault(true); testStateButton10.setStateDefault(true);
testStateButton10.putClientProperty("JComponent.minimumWidth", 0); testStateButton10.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton10, "cell 4 4"); add(testStateButton10, "cell 4 4");
//---- label2 ---- //---- label2 ----
@@ -345,21 +346,21 @@ class FlatThemePreviewButtons
//---- testStateButton2 ---- //---- testStateButton2 ----
testStateButton2.setText("OK"); testStateButton2.setText("OK");
testStateButton2.setStateHover(true); testStateButton2.setStateHover(true);
testStateButton2.putClientProperty("JComponent.minimumWidth", 0); testStateButton2.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton2, "cell 1 5"); add(testStateButton2, "cell 1 5");
//---- testStateButton8 ---- //---- testStateButton8 ----
testStateButton8.setText("OK"); testStateButton8.setText("OK");
testStateButton8.setStateHover(true); testStateButton8.setStateHover(true);
testStateButton8.setStateDefault(true); testStateButton8.setStateDefault(true);
testStateButton8.putClientProperty("JComponent.minimumWidth", 0); testStateButton8.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton8, "cell 2 5"); add(testStateButton8, "cell 2 5");
//---- testStateButton5 ---- //---- testStateButton5 ----
testStateButton5.setText("OK"); testStateButton5.setText("OK");
testStateButton5.setStateHover(true); testStateButton5.setStateHover(true);
testStateButton5.setStateFocused(true); testStateButton5.setStateFocused(true);
testStateButton5.putClientProperty("JComponent.minimumWidth", 0); testStateButton5.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton5, "cell 3 5"); add(testStateButton5, "cell 3 5");
//---- testStateButton11 ---- //---- testStateButton11 ----
@@ -367,7 +368,7 @@ class FlatThemePreviewButtons
testStateButton11.setStateHover(true); testStateButton11.setStateHover(true);
testStateButton11.setStateFocused(true); testStateButton11.setStateFocused(true);
testStateButton11.setStateDefault(true); testStateButton11.setStateDefault(true);
testStateButton11.putClientProperty("JComponent.minimumWidth", 0); testStateButton11.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton11, "cell 4 5"); add(testStateButton11, "cell 4 5");
//---- label3 ---- //---- label3 ----
@@ -377,21 +378,21 @@ class FlatThemePreviewButtons
//---- testStateButton3 ---- //---- testStateButton3 ----
testStateButton3.setText("OK"); testStateButton3.setText("OK");
testStateButton3.setStatePressed(true); testStateButton3.setStatePressed(true);
testStateButton3.putClientProperty("JComponent.minimumWidth", 0); testStateButton3.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton3, "cell 1 6"); add(testStateButton3, "cell 1 6");
//---- testStateButton9 ---- //---- testStateButton9 ----
testStateButton9.setText("OK"); testStateButton9.setText("OK");
testStateButton9.setStatePressed(true); testStateButton9.setStatePressed(true);
testStateButton9.setStateDefault(true); testStateButton9.setStateDefault(true);
testStateButton9.putClientProperty("JComponent.minimumWidth", 0); testStateButton9.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton9, "cell 2 6"); add(testStateButton9, "cell 2 6");
//---- testStateButton6 ---- //---- testStateButton6 ----
testStateButton6.setText("OK"); testStateButton6.setText("OK");
testStateButton6.setStatePressed(true); testStateButton6.setStatePressed(true);
testStateButton6.setStateFocused(true); testStateButton6.setStateFocused(true);
testStateButton6.putClientProperty("JComponent.minimumWidth", 0); testStateButton6.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton6, "cell 3 6"); add(testStateButton6, "cell 3 6");
//---- testStateButton12 ---- //---- testStateButton12 ----
@@ -399,7 +400,7 @@ class FlatThemePreviewButtons
testStateButton12.setStatePressed(true); testStateButton12.setStatePressed(true);
testStateButton12.setStateFocused(true); testStateButton12.setStateFocused(true);
testStateButton12.setStateDefault(true); testStateButton12.setStateDefault(true);
testStateButton12.putClientProperty("JComponent.minimumWidth", 0); testStateButton12.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton12, "cell 4 6"); add(testStateButton12, "cell 4 6");
//---- label4 ---- //---- label4 ----
@@ -409,14 +410,14 @@ class FlatThemePreviewButtons
//---- testStateButton13 ---- //---- testStateButton13 ----
testStateButton13.setText("OK"); testStateButton13.setText("OK");
testStateButton13.setEnabled(false); testStateButton13.setEnabled(false);
testStateButton13.putClientProperty("JComponent.minimumWidth", 0); testStateButton13.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton13, "cell 1 7"); add(testStateButton13, "cell 1 7");
//---- testStateButton14 ---- //---- testStateButton14 ----
testStateButton14.setText("OK"); testStateButton14.setText("OK");
testStateButton14.setEnabled(false); testStateButton14.setEnabled(false);
testStateButton14.setStateDefault(true); testStateButton14.setStateDefault(true);
testStateButton14.putClientProperty("JComponent.minimumWidth", 0); testStateButton14.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testStateButton14, "cell 2 7"); add(testStateButton14, "cell 2 7");
//---- label10 ---- //---- label10 ----
@@ -425,17 +426,17 @@ class FlatThemePreviewButtons
//---- button1 ---- //---- button1 ----
button1.setText("OK"); button1.setText("OK");
button1.putClientProperty("JComponent.minimumWidth", 0); button1.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(button1, "cell 1 8"); add(button1, "cell 1 8");
//---- testDefaultButton1 ---- //---- testDefaultButton1 ----
testDefaultButton1.setText("OK"); testDefaultButton1.setText("OK");
testDefaultButton1.putClientProperty("JComponent.minimumWidth", 0); testDefaultButton1.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
add(testDefaultButton1, "cell 2 8"); add(testDefaultButton1, "cell 2 8");
//---- label12 ---- //---- label12 ----
label12.setText("JToggleButton"); label12.setText("JToggleButton");
label12.putClientProperty("FlatLaf.styleClass", "h3"); label12.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(label12, "cell 0 9 3 1"); add(label12, "cell 0 9 3 1");
//---- label29 ---- //---- label29 ----
@@ -448,22 +449,22 @@ class FlatThemePreviewButtons
//---- label13 ---- //---- label13 ----
label13.setText("unsel."); label13.setText("unsel.");
label13.putClientProperty("FlatLaf.styleClass", "small"); label13.putClientProperty(FlatClientProperties.STYLE_CLASS, "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.putClientProperty("FlatLaf.styleClass", "small"); label14.putClientProperty(FlatClientProperties.STYLE_CLASS, "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.putClientProperty("FlatLaf.styleClass", "small"); label15.putClientProperty(FlatClientProperties.STYLE_CLASS, "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.putClientProperty("FlatLaf.styleClass", "small"); label16.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
add(label16, "cell 4 11,alignx center,growx 0"); add(label16, "cell 4 11,alignx center,growx 0");
//---- label17 ---- //---- label17 ----
@@ -576,7 +577,7 @@ class FlatThemePreviewButtons
//---- label32 ---- //---- label32 ----
label32.setText("Help Button"); label32.setText("Help Button");
label32.putClientProperty("FlatLaf.styleClass", "h3"); label32.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(label32, "cell 0 17 2 1"); add(label32, "cell 0 17 2 1");
//---- label9 ---- //---- label9 ----
@@ -592,14 +593,14 @@ class FlatThemePreviewButtons
add(label22, "cell 0 19"); add(label22, "cell 0 19");
//---- testStateButton15 ---- //---- testStateButton15 ----
testStateButton15.putClientProperty("JComponent.minimumWidth", 0); testStateButton15.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton15.putClientProperty("JButton.buttonType", "help"); testStateButton15.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton15, "cell 1 19 2 1,alignx center,growx 0"); add(testStateButton15, "cell 1 19 2 1,alignx center,growx 0");
//---- testStateButton19 ---- //---- testStateButton19 ----
testStateButton19.setStateFocused(true); testStateButton19.setStateFocused(true);
testStateButton19.putClientProperty("JComponent.minimumWidth", 0); testStateButton19.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton19.putClientProperty("JButton.buttonType", "help"); testStateButton19.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton19, "cell 3 19 2 1,alignx center,growx 0"); add(testStateButton19, "cell 3 19 2 1,alignx center,growx 0");
//---- label23 ---- //---- label23 ----
@@ -608,15 +609,15 @@ class FlatThemePreviewButtons
//---- testStateButton16 ---- //---- testStateButton16 ----
testStateButton16.setStateHover(true); testStateButton16.setStateHover(true);
testStateButton16.putClientProperty("JComponent.minimumWidth", 0); testStateButton16.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton16.putClientProperty("JButton.buttonType", "help"); testStateButton16.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton16, "cell 1 20 2 1,alignx center,growx 0"); add(testStateButton16, "cell 1 20 2 1,alignx center,growx 0");
//---- testStateButton20 ---- //---- testStateButton20 ----
testStateButton20.setStateHover(true); testStateButton20.setStateHover(true);
testStateButton20.setStateFocused(true); testStateButton20.setStateFocused(true);
testStateButton20.putClientProperty("JComponent.minimumWidth", 0); testStateButton20.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton20.putClientProperty("JButton.buttonType", "help"); testStateButton20.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton20, "cell 3 20 2 1,alignx center,growx 0"); add(testStateButton20, "cell 3 20 2 1,alignx center,growx 0");
//---- label24 ---- //---- label24 ----
@@ -625,15 +626,15 @@ class FlatThemePreviewButtons
//---- testStateButton17 ---- //---- testStateButton17 ----
testStateButton17.setStatePressed(true); testStateButton17.setStatePressed(true);
testStateButton17.putClientProperty("JComponent.minimumWidth", 0); testStateButton17.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton17.putClientProperty("JButton.buttonType", "help"); testStateButton17.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton17, "cell 1 21 2 1,alignx center,growx 0"); add(testStateButton17, "cell 1 21 2 1,alignx center,growx 0");
//---- testStateButton21 ---- //---- testStateButton21 ----
testStateButton21.setStatePressed(true); testStateButton21.setStatePressed(true);
testStateButton21.setStateFocused(true); testStateButton21.setStateFocused(true);
testStateButton21.putClientProperty("JComponent.minimumWidth", 0); testStateButton21.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton21.putClientProperty("JButton.buttonType", "help"); testStateButton21.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton21, "cell 3 21 2 1,alignx center,growx 0"); add(testStateButton21, "cell 3 21 2 1,alignx center,growx 0");
//---- label25 ---- //---- label25 ----
@@ -642,8 +643,8 @@ class FlatThemePreviewButtons
//---- testStateButton18 ---- //---- testStateButton18 ----
testStateButton18.setEnabled(false); testStateButton18.setEnabled(false);
testStateButton18.putClientProperty("JComponent.minimumWidth", 0); testStateButton18.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
testStateButton18.putClientProperty("JButton.buttonType", "help"); testStateButton18.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(testStateButton18, "cell 1 22 2 1,alignx center,growx 0"); add(testStateButton18, "cell 1 22 2 1,alignx center,growx 0");
//---- label26 ---- //---- label26 ----
@@ -651,8 +652,8 @@ class FlatThemePreviewButtons
add(label26, "cell 0 23"); add(label26, "cell 0 23");
//---- button2 ---- //---- button2 ----
button2.putClientProperty("JComponent.minimumWidth", 0); button2.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
button2.putClientProperty("JButton.buttonType", "help"); button2.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
add(button2, "cell 1 23 2 1,alignx center,growx 0"); add(button2, "cell 1 23 2 1,alignx center,growx 0");
//---- buttonGroup1 ---- //---- buttonGroup1 ----

View File

@@ -85,7 +85,7 @@ public class FlatThemePreviewFonts
//---- headingsLabel ---- //---- headingsLabel ----
headingsLabel.setText("Headings"); headingsLabel.setText("Headings");
headingsLabel.putClientProperty("FlatLaf.styleClass", "h3"); headingsLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(headingsLabel, "cell 0 0"); add(headingsLabel, "cell 0 0");
//---- h00Preview ---- //---- h00Preview ----
@@ -123,7 +123,7 @@ public class FlatThemePreviewFonts
//---- textLabel ---- //---- textLabel ----
textLabel.setText("Text"); textLabel.setText("Text");
textLabel.putClientProperty("FlatLaf.styleClass", "h3"); textLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
add(textLabel, "cell 0 7"); add(textLabel, "cell 0 7");
//---- largePreview ---- //---- largePreview ----
@@ -171,7 +171,7 @@ public class FlatThemePreviewFonts
//---- scaleValueLabel ---- //---- scaleValueLabel ----
scaleValueLabel.setText("1x"); scaleValueLabel.setText("1x");
scaleValueLabel.putClientProperty("FlatLaf.styleClass", "h2"); scaleValueLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h2");
add(scaleValueLabel, "cell 0 16"); add(scaleValueLabel, "cell 0 16");
// JFormDesigner - End of component initialization //GEN-END:initComponents // JFormDesigner - End of component initialization //GEN-END:initComponents
} }
@@ -275,7 +275,7 @@ public class FlatThemePreviewFonts
//---- descLabel ---- //---- descLabel ----
descLabel.setText("description"); descLabel.setText("description");
descLabel.putClientProperty("FlatLaf.styleClass", "medium"); descLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "medium");
add(descLabel, "cell 1 0"); add(descLabel, "cell 1 0");
// JFormDesigner - End of component initialization //GEN-END:initComponents // JFormDesigner - End of component initialization //GEN-END:initComponents
} }

View File

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