mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-27 03:46:17 -06:00
Demo, Testing, Theme Editor: re-generated UI code using JFormDesigner 8.3, which now supports class FlatClientProperties
This commit is contained in:
@@ -277,22 +277,22 @@ class BasicComponentsPanel
|
||||
|
||||
//---- button5 ----
|
||||
button5.setText("Square");
|
||||
button5.putClientProperty("JButton.buttonType", "square");
|
||||
button5.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_SQUARE);
|
||||
add(button5, "cell 3 1");
|
||||
|
||||
//---- button6 ----
|
||||
button6.setText("Round");
|
||||
button6.putClientProperty("JButton.buttonType", "roundRect");
|
||||
button6.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_ROUND_RECT);
|
||||
add(button6, "cell 4 1");
|
||||
|
||||
//---- button3 ----
|
||||
button3.setText("Help");
|
||||
button3.putClientProperty("JButton.buttonType", "help");
|
||||
button3.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
|
||||
add(button3, "cell 4 1");
|
||||
|
||||
//---- button4 ----
|
||||
button4.setText("Help");
|
||||
button4.putClientProperty("JButton.buttonType", "help");
|
||||
button4.putClientProperty(FlatClientProperties.BUTTON_TYPE, FlatClientProperties.BUTTON_TYPE_HELP);
|
||||
button4.setEnabled(false);
|
||||
add(button4, "cell 4 1");
|
||||
|
||||
@@ -432,7 +432,7 @@ class BasicComponentsPanel
|
||||
|
||||
//---- comboBox6 ----
|
||||
comboBox6.setEditable(true);
|
||||
comboBox6.putClientProperty("JTextField.placeholderText", "Placeholder");
|
||||
comboBox6.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Placeholder");
|
||||
add(comboBox6, "cell 5 5,growx");
|
||||
|
||||
//---- textFieldLabel ----
|
||||
@@ -463,7 +463,7 @@ class BasicComponentsPanel
|
||||
add(textField4, "cell 4 6,growx");
|
||||
|
||||
//---- textField6 ----
|
||||
textField6.putClientProperty("JTextField.placeholderText", "Placeholder");
|
||||
textField6.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Placeholder");
|
||||
add(textField6, "cell 5 6,growx");
|
||||
|
||||
//---- formattedTextFieldLabel ----
|
||||
@@ -494,7 +494,7 @@ class BasicComponentsPanel
|
||||
add(formattedTextField4, "cell 4 7,growx");
|
||||
|
||||
//---- formattedTextField5 ----
|
||||
formattedTextField5.putClientProperty("JTextField.placeholderText", "Placeholder");
|
||||
formattedTextField5.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Placeholder");
|
||||
add(formattedTextField5, "cell 5 7,growx");
|
||||
|
||||
//---- passwordFieldLabel ----
|
||||
@@ -522,7 +522,7 @@ class BasicComponentsPanel
|
||||
add(passwordField4, "cell 4 8,growx");
|
||||
|
||||
//---- passwordField5 ----
|
||||
passwordField5.putClientProperty("JTextField.placeholderText", "Placeholder");
|
||||
passwordField5.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Placeholder");
|
||||
add(passwordField5, "cell 5 8,growx");
|
||||
|
||||
//---- textAreaLabel ----
|
||||
@@ -703,11 +703,11 @@ class BasicComponentsPanel
|
||||
add(errorHintsLabel, "cell 0 12");
|
||||
|
||||
//---- errorHintsTextField ----
|
||||
errorHintsTextField.putClientProperty("JComponent.outline", "error");
|
||||
errorHintsTextField.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR);
|
||||
add(errorHintsTextField, "cell 1 12,growx");
|
||||
|
||||
//---- errorHintsComboBox ----
|
||||
errorHintsComboBox.putClientProperty("JComponent.outline", "error");
|
||||
errorHintsComboBox.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR);
|
||||
errorHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
|
||||
"Editable"
|
||||
}));
|
||||
@@ -715,7 +715,7 @@ class BasicComponentsPanel
|
||||
add(errorHintsComboBox, "cell 2 12,growx");
|
||||
|
||||
//---- errorHintsSpinner ----
|
||||
errorHintsSpinner.putClientProperty("JComponent.outline", "error");
|
||||
errorHintsSpinner.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_ERROR);
|
||||
add(errorHintsSpinner, "cell 3 12,growx");
|
||||
|
||||
//---- warningHintsLabel ----
|
||||
@@ -723,18 +723,18 @@ class BasicComponentsPanel
|
||||
add(warningHintsLabel, "cell 0 13");
|
||||
|
||||
//---- warningHintsTextField ----
|
||||
warningHintsTextField.putClientProperty("JComponent.outline", "warning");
|
||||
warningHintsTextField.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING);
|
||||
add(warningHintsTextField, "cell 1 13,growx");
|
||||
|
||||
//---- warningHintsComboBox ----
|
||||
warningHintsComboBox.putClientProperty("JComponent.outline", "warning");
|
||||
warningHintsComboBox.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING);
|
||||
warningHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
|
||||
"Not editable"
|
||||
}));
|
||||
add(warningHintsComboBox, "cell 2 13,growx");
|
||||
|
||||
//---- warningHintsSpinner ----
|
||||
warningHintsSpinner.putClientProperty("JComponent.outline", "warning");
|
||||
warningHintsSpinner.putClientProperty(FlatClientProperties.OUTLINE, FlatClientProperties.OUTLINE_WARNING);
|
||||
add(warningHintsSpinner, "cell 3 13,growx");
|
||||
|
||||
//---- iconsLabel ----
|
||||
@@ -765,53 +765,53 @@ class BasicComponentsPanel
|
||||
|
||||
//---- h00Label ----
|
||||
h00Label.setText("H00");
|
||||
h00Label.putClientProperty("FlatLaf.styleClass", "h00");
|
||||
h00Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h00");
|
||||
add(h00Label, "cell 1 16 5 1");
|
||||
|
||||
//---- h0Label ----
|
||||
h0Label.setText("H0");
|
||||
h0Label.putClientProperty("FlatLaf.styleClass", "h0");
|
||||
h0Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h0");
|
||||
add(h0Label, "cell 1 16 5 1");
|
||||
|
||||
//---- h1Label ----
|
||||
h1Label.setText("H1");
|
||||
h1Label.putClientProperty("FlatLaf.styleClass", "h1");
|
||||
h1Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h1");
|
||||
add(h1Label, "cell 1 16 5 1");
|
||||
|
||||
//---- h2Label ----
|
||||
h2Label.setText("H2");
|
||||
h2Label.putClientProperty("FlatLaf.styleClass", "h2");
|
||||
h2Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h2");
|
||||
add(h2Label, "cell 1 16 5 1");
|
||||
|
||||
//---- h3Label ----
|
||||
h3Label.setText("H3");
|
||||
h3Label.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
h3Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
add(h3Label, "cell 1 16 5 1");
|
||||
|
||||
//---- h4Label ----
|
||||
h4Label.setText("H4");
|
||||
h4Label.putClientProperty("FlatLaf.styleClass", "h4");
|
||||
h4Label.putClientProperty(FlatClientProperties.STYLE_CLASS, "h4");
|
||||
add(h4Label, "cell 1 16 5 1");
|
||||
|
||||
//---- lightLabel ----
|
||||
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");
|
||||
|
||||
//---- semiboldLabel ----
|
||||
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");
|
||||
|
||||
//---- fontZoomLabel ----
|
||||
fontZoomLabel.setText("(200%)");
|
||||
fontZoomLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
fontZoomLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
fontZoomLabel.setEnabled(false);
|
||||
add(fontZoomLabel, "cell 1 16 5 1");
|
||||
|
||||
//---- largeLabel ----
|
||||
largeLabel.setText("large");
|
||||
largeLabel.putClientProperty("FlatLaf.styleClass", "large");
|
||||
largeLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "large");
|
||||
add(largeLabel, "cell 1 17 5 1");
|
||||
|
||||
//---- defaultLabel ----
|
||||
@@ -820,22 +820,22 @@ class BasicComponentsPanel
|
||||
|
||||
//---- mediumLabel ----
|
||||
mediumLabel.setText("medium");
|
||||
mediumLabel.putClientProperty("FlatLaf.styleClass", "medium");
|
||||
mediumLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "medium");
|
||||
add(mediumLabel, "cell 1 17 5 1");
|
||||
|
||||
//---- smallLabel ----
|
||||
smallLabel.setText("small");
|
||||
smallLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
smallLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
add(smallLabel, "cell 1 17 5 1");
|
||||
|
||||
//---- miniLabel ----
|
||||
miniLabel.setText("mini");
|
||||
miniLabel.putClientProperty("FlatLaf.styleClass", "mini");
|
||||
miniLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "mini");
|
||||
add(miniLabel, "cell 1 17 5 1");
|
||||
|
||||
//---- monospacedLabel ----
|
||||
monospacedLabel.setText("monospaced");
|
||||
monospacedLabel.putClientProperty("FlatLaf.styleClass", "monospaced");
|
||||
monospacedLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "monospaced");
|
||||
add(monospacedLabel, "cell 1 17 5 1,gapx 30");
|
||||
|
||||
//======== popupMenu1 ========
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.formdev.flatlaf.demo;
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.*;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import net.miginfocom.swing.*;
|
||||
|
||||
/**
|
||||
@@ -176,12 +177,12 @@ class MoreComponentsPanel
|
||||
add(scrollBar3, "cell 2 0 1 6,growy");
|
||||
|
||||
//---- scrollBar7 ----
|
||||
scrollBar7.putClientProperty("JScrollBar.showButtons", true);
|
||||
scrollBar7.putClientProperty(FlatClientProperties.SCROLL_BAR_SHOW_BUTTONS, true);
|
||||
add(scrollBar7, "cell 2 0 1 6,growy");
|
||||
|
||||
//---- scrollBar8 ----
|
||||
scrollBar8.setEnabled(false);
|
||||
scrollBar8.putClientProperty("JScrollBar.showButtons", true);
|
||||
scrollBar8.putClientProperty(FlatClientProperties.SCROLL_BAR_SHOW_BUTTONS, true);
|
||||
add(scrollBar8, "cell 2 0 1 6,growy");
|
||||
|
||||
//---- separator2 ----
|
||||
@@ -301,13 +302,13 @@ class MoreComponentsPanel
|
||||
|
||||
//---- scrollBar5 ----
|
||||
scrollBar5.setOrientation(Adjustable.HORIZONTAL);
|
||||
scrollBar5.putClientProperty("JScrollBar.showButtons", true);
|
||||
scrollBar5.putClientProperty(FlatClientProperties.SCROLL_BAR_SHOW_BUTTONS, true);
|
||||
add(scrollBar5, "cell 1 3,growx");
|
||||
|
||||
//---- scrollBar6 ----
|
||||
scrollBar6.setOrientation(Adjustable.HORIZONTAL);
|
||||
scrollBar6.setEnabled(false);
|
||||
scrollBar6.putClientProperty("JScrollBar.showButtons", true);
|
||||
scrollBar6.putClientProperty(FlatClientProperties.SCROLL_BAR_SHOW_BUTTONS, true);
|
||||
add(scrollBar6, "cell 1 4,growx");
|
||||
|
||||
//---- separatorLabel ----
|
||||
@@ -518,7 +519,7 @@ class MoreComponentsPanel
|
||||
|
||||
//======== 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());
|
||||
|
||||
//---- label9 ----
|
||||
@@ -530,7 +531,7 @@ class MoreComponentsPanel
|
||||
|
||||
//======== 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());
|
||||
|
||||
//---- label8 ----
|
||||
@@ -546,14 +547,14 @@ class MoreComponentsPanel
|
||||
|
||||
//---- label13 ----
|
||||
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.setForeground(new Color(0x135b76));
|
||||
add(label13, "cell 1 13 4 1");
|
||||
|
||||
//---- label10 ----
|
||||
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.setForeground(new Color(0x135b76));
|
||||
add(label10, "cell 1 13 4 1");
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.formdev.flatlaf.demo;
|
||||
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import static com.formdev.flatlaf.FlatClientProperties.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseEvent;
|
||||
@@ -471,7 +472,7 @@ class TabsPanel
|
||||
|
||||
//---- tabPlacementLabel ----
|
||||
tabPlacementLabel.setText("Tab placement");
|
||||
tabPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabPlacementLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
panel1.add(tabPlacementLabel, "cell 0 0");
|
||||
|
||||
//======== tabPlacementToolBar ========
|
||||
@@ -482,38 +483,38 @@ class TabsPanel
|
||||
//---- topPlacementButton ----
|
||||
topPlacementButton.setText("top");
|
||||
topPlacementButton.setSelected(true);
|
||||
topPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
topPlacementButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
topPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||
tabPlacementToolBar.add(topPlacementButton);
|
||||
|
||||
//---- bottomPlacementButton ----
|
||||
bottomPlacementButton.setText("bottom");
|
||||
bottomPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
bottomPlacementButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
bottomPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||
tabPlacementToolBar.add(bottomPlacementButton);
|
||||
|
||||
//---- leftPlacementButton ----
|
||||
leftPlacementButton.setText("left");
|
||||
leftPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
leftPlacementButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
leftPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||
tabPlacementToolBar.add(leftPlacementButton);
|
||||
|
||||
//---- rightPlacementButton ----
|
||||
rightPlacementButton.setText("right");
|
||||
rightPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
rightPlacementButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
rightPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||
tabPlacementToolBar.add(rightPlacementButton);
|
||||
tabPlacementToolBar.addSeparator();
|
||||
|
||||
//---- scrollButton ----
|
||||
scrollButton.setText("scroll");
|
||||
scrollButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
scrollButton.addActionListener(e -> scrollChanged());
|
||||
tabPlacementToolBar.add(scrollButton);
|
||||
|
||||
//---- borderButton ----
|
||||
borderButton.setText("border");
|
||||
borderButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
borderButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
borderButton.addActionListener(e -> borderChanged());
|
||||
tabPlacementToolBar.add(borderButton);
|
||||
}
|
||||
@@ -522,7 +523,7 @@ class TabsPanel
|
||||
|
||||
//---- tabLayoutLabel ----
|
||||
tabLayoutLabel.setText("Tab layout");
|
||||
tabLayoutLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabLayoutLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
panel1.add(tabLayoutLabel, "cell 0 2");
|
||||
|
||||
//======== tabLayoutToolBar ========
|
||||
@@ -533,13 +534,13 @@ class TabsPanel
|
||||
//---- scrollTabLayoutButton ----
|
||||
scrollTabLayoutButton.setText("scroll");
|
||||
scrollTabLayoutButton.setSelected(true);
|
||||
scrollTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollTabLayoutButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged());
|
||||
tabLayoutToolBar.add(scrollTabLayoutButton);
|
||||
|
||||
//---- wrapTabLayoutButton ----
|
||||
wrapTabLayoutButton.setText("wrap");
|
||||
wrapTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
wrapTabLayoutButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged());
|
||||
tabLayoutToolBar.add(wrapTabLayoutButton);
|
||||
}
|
||||
@@ -548,20 +549,20 @@ class TabsPanel
|
||||
//---- scrollLayoutNoteLabel ----
|
||||
scrollLayoutNoteLabel.setText("(use mouse wheel to scroll; arrow button shows hidden tabs)");
|
||||
scrollLayoutNoteLabel.setEnabled(false);
|
||||
scrollLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollLayoutNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
panel1.add(scrollLayoutNoteLabel, "cell 0 3");
|
||||
|
||||
//---- wrapLayoutNoteLabel ----
|
||||
wrapLayoutNoteLabel.setText("(probably better to use scroll layout?)");
|
||||
wrapLayoutNoteLabel.setEnabled(false);
|
||||
wrapLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
wrapLayoutNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
panel1.add(wrapLayoutNoteLabel, "cell 0 3");
|
||||
panel1.add(scrollLayoutTabbedPane, "cell 0 4");
|
||||
panel1.add(wrapLayoutTabbedPane, "cell 0 4,width 100:100,height pref*2px");
|
||||
|
||||
//---- closableTabsLabel ----
|
||||
closableTabsLabel.setText("Closable tabs");
|
||||
closableTabsLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
closableTabsLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
panel1.add(closableTabsLabel, "cell 0 5");
|
||||
|
||||
//======== closableTabsToolBar ========
|
||||
@@ -572,19 +573,19 @@ class TabsPanel
|
||||
//---- squareCloseButton ----
|
||||
squareCloseButton.setText("square");
|
||||
squareCloseButton.setSelected(true);
|
||||
squareCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
squareCloseButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
squareCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||
closableTabsToolBar.add(squareCloseButton);
|
||||
|
||||
//---- circleCloseButton ----
|
||||
circleCloseButton.setText("circle");
|
||||
circleCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
circleCloseButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
circleCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||
closableTabsToolBar.add(circleCloseButton);
|
||||
|
||||
//---- redCrossCloseButton ----
|
||||
redCrossCloseButton.setText("red cross");
|
||||
redCrossCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
redCrossCloseButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||
closableTabsToolBar.add(redCrossCloseButton);
|
||||
}
|
||||
@@ -593,7 +594,7 @@ class TabsPanel
|
||||
|
||||
//---- tabAreaComponentsLabel ----
|
||||
tabAreaComponentsLabel.setText("Custom tab area components");
|
||||
tabAreaComponentsLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabAreaComponentsLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
panel1.add(tabAreaComponentsLabel, "cell 0 7");
|
||||
|
||||
//======== tabAreaComponentsToolBar ========
|
||||
@@ -604,14 +605,14 @@ class TabsPanel
|
||||
//---- leadingComponentButton ----
|
||||
leadingComponentButton.setText("leading");
|
||||
leadingComponentButton.setSelected(true);
|
||||
leadingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
leadingComponentButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
leadingComponentButton.addActionListener(e -> customComponentsChanged());
|
||||
tabAreaComponentsToolBar.add(leadingComponentButton);
|
||||
|
||||
//---- trailingComponentButton ----
|
||||
trailingComponentButton.setText("trailing");
|
||||
trailingComponentButton.setSelected(true);
|
||||
trailingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
trailingComponentButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
trailingComponentButton.addActionListener(e -> customComponentsChanged());
|
||||
tabAreaComponentsToolBar.add(trailingComponentButton);
|
||||
}
|
||||
@@ -642,13 +643,13 @@ class TabsPanel
|
||||
|
||||
//---- tabIconPlacementLabel ----
|
||||
tabIconPlacementLabel.setText("Tab icon placement");
|
||||
tabIconPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabIconPlacementLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
panel2.add(tabIconPlacementLabel, "cell 0 0");
|
||||
|
||||
//---- tabIconPlacementNodeLabel ----
|
||||
tabIconPlacementNodeLabel.setText("(top/bottom/leading/trailing)");
|
||||
tabIconPlacementNodeLabel.setEnabled(false);
|
||||
tabIconPlacementNodeLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabIconPlacementNodeLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
panel2.add(tabIconPlacementNodeLabel, "cell 0 1");
|
||||
panel2.add(iconTopTabbedPane, "cell 0 2");
|
||||
panel2.add(iconBottomTabbedPane, "cell 0 3");
|
||||
@@ -657,13 +658,13 @@ class TabsPanel
|
||||
|
||||
//---- tabAreaAlignmentLabel ----
|
||||
tabAreaAlignmentLabel.setText("Tab area alignment");
|
||||
tabAreaAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabAreaAlignmentLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
panel2.add(tabAreaAlignmentLabel, "cell 0 6");
|
||||
|
||||
//---- tabAreaAlignmentNoteLabel ----
|
||||
tabAreaAlignmentNoteLabel.setText("(leading/center/trailing/fill)");
|
||||
tabAreaAlignmentNoteLabel.setEnabled(false);
|
||||
tabAreaAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabAreaAlignmentNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7");
|
||||
panel2.add(alignLeadingTabbedPane, "cell 0 8");
|
||||
panel2.add(alignCenterTabbedPane, "cell 0 9");
|
||||
@@ -692,13 +693,13 @@ class TabsPanel
|
||||
|
||||
//---- tabWidthModeLabel ----
|
||||
tabWidthModeLabel.setText("Tab width mode");
|
||||
tabWidthModeLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabWidthModeLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
panel3.add(tabWidthModeLabel, "cell 0 0");
|
||||
|
||||
//---- tabWidthModeNoteLabel ----
|
||||
tabWidthModeNoteLabel.setText("(preferred/equal/compact)");
|
||||
tabWidthModeNoteLabel.setEnabled(false);
|
||||
tabWidthModeNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabWidthModeNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
panel3.add(tabWidthModeNoteLabel, "cell 0 1");
|
||||
panel3.add(widthPreferredTabbedPane, "cell 0 2");
|
||||
panel3.add(widthEqualTabbedPane, "cell 0 3");
|
||||
@@ -706,14 +707,14 @@ class TabsPanel
|
||||
|
||||
//---- minMaxTabWidthLabel ----
|
||||
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(minimumTabWidthTabbedPane, "cell 0 6");
|
||||
panel3.add(maximumTabWidthTabbedPane, "cell 0 7");
|
||||
|
||||
//---- tabAlignmentLabel ----
|
||||
tabAlignmentLabel.setText("Tab title alignment");
|
||||
tabAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabAlignmentLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "h3");
|
||||
panel3.add(tabAlignmentLabel, "cell 0 8");
|
||||
|
||||
//======== panel5 ========
|
||||
@@ -733,13 +734,13 @@ class TabsPanel
|
||||
//---- tabAlignmentNoteLabel ----
|
||||
tabAlignmentNoteLabel.setText("(leading/center/trailing)");
|
||||
tabAlignmentNoteLabel.setEnabled(false);
|
||||
tabAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabAlignmentNoteLabel.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
panel5.add(tabAlignmentNoteLabel, "cell 0 0");
|
||||
|
||||
//---- tabAlignmentNoteLabel2 ----
|
||||
tabAlignmentNoteLabel2.setText("(trailing)");
|
||||
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(tabAlignLeadingTabbedPane, "cell 0 1");
|
||||
|
||||
@@ -787,19 +788,19 @@ class TabsPanel
|
||||
//---- scrollAsNeededSingleButton ----
|
||||
scrollAsNeededSingleButton.setText("asNeededSingle");
|
||||
scrollAsNeededSingleButton.setSelected(true);
|
||||
scrollAsNeededSingleButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollAsNeededSingleButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||
scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton);
|
||||
|
||||
//---- scrollAsNeededButton ----
|
||||
scrollAsNeededButton.setText("asNeeded");
|
||||
scrollAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollAsNeededButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||
scrollButtonsPolicyToolBar.add(scrollAsNeededButton);
|
||||
|
||||
//---- scrollNeverButton ----
|
||||
scrollNeverButton.setText("never");
|
||||
scrollNeverButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollNeverButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||
scrollButtonsPolicyToolBar.add(scrollNeverButton);
|
||||
}
|
||||
@@ -817,13 +818,13 @@ class TabsPanel
|
||||
//---- popupAsNeededButton ----
|
||||
popupAsNeededButton.setText("asNeeded");
|
||||
popupAsNeededButton.setSelected(true);
|
||||
popupAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
popupAsNeededButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged());
|
||||
tabsPopupPolicyToolBar.add(popupAsNeededButton);
|
||||
|
||||
//---- popupNeverButton ----
|
||||
popupNeverButton.setText("never");
|
||||
popupNeverButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
popupNeverButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged());
|
||||
tabsPopupPolicyToolBar.add(popupNeverButton);
|
||||
}
|
||||
@@ -846,13 +847,13 @@ class TabsPanel
|
||||
//---- scrollBothButton ----
|
||||
scrollBothButton.setText("both");
|
||||
scrollBothButton.setSelected(true);
|
||||
scrollBothButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollBothButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged());
|
||||
scrollButtonsPlacementToolBar.add(scrollBothButton);
|
||||
|
||||
//---- scrollTrailingButton ----
|
||||
scrollTrailingButton.setText("trailing");
|
||||
scrollTrailingButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollTrailingButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged());
|
||||
scrollButtonsPlacementToolBar.add(scrollTrailingButton);
|
||||
}
|
||||
@@ -869,13 +870,13 @@ class TabsPanel
|
||||
//---- underlinedTabTypeButton ----
|
||||
underlinedTabTypeButton.setText("underlined");
|
||||
underlinedTabTypeButton.setSelected(true);
|
||||
underlinedTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
underlinedTabTypeButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
underlinedTabTypeButton.addActionListener(e -> tabTypeChanged());
|
||||
tabTypeToolBar.add(underlinedTabTypeButton);
|
||||
|
||||
//---- cardTabTypeButton ----
|
||||
cardTabTypeButton.setText("card");
|
||||
cardTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
cardTabTypeButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
cardTabTypeButton.addActionListener(e -> tabTypeChanged());
|
||||
tabTypeToolBar.add(cardTabTypeButton);
|
||||
}
|
||||
@@ -893,25 +894,25 @@ class TabsPanel
|
||||
//---- rotationNoneButton ----
|
||||
rotationNoneButton.setText("none");
|
||||
rotationNoneButton.setSelected(true);
|
||||
rotationNoneButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
rotationNoneButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
rotationNoneButton.addActionListener(e -> tabRotationChanged());
|
||||
tabRotationToolBar.add(rotationNoneButton);
|
||||
|
||||
//---- rotationAutoButton ----
|
||||
rotationAutoButton.setText("auto");
|
||||
rotationAutoButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
rotationAutoButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
rotationAutoButton.addActionListener(e -> tabRotationChanged());
|
||||
tabRotationToolBar.add(rotationAutoButton);
|
||||
|
||||
//---- rotationLeftButton ----
|
||||
rotationLeftButton.setText("left");
|
||||
rotationLeftButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
rotationLeftButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
rotationLeftButton.addActionListener(e -> tabRotationChanged());
|
||||
tabRotationToolBar.add(rotationLeftButton);
|
||||
|
||||
//---- rotationRightButton ----
|
||||
rotationRightButton.setText("right");
|
||||
rotationRightButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
rotationRightButton.putClientProperty(FlatClientProperties.STYLE_CLASS, "small");
|
||||
rotationRightButton.addActionListener(e -> tabRotationChanged());
|
||||
tabRotationToolBar.add(rotationRightButton);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.border.CompoundBorder;
|
||||
import javax.swing.event.*;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import com.formdev.flatlaf.FlatDarculaLaf;
|
||||
import com.formdev.flatlaf.FlatDarkLaf;
|
||||
import com.formdev.flatlaf.FlatIntelliJLaf;
|
||||
@@ -554,7 +555,7 @@ public class IJThemesPanel
|
||||
"light",
|
||||
"dark"
|
||||
}));
|
||||
filterComboBox.putClientProperty("JComponent.minimumWidth", 0);
|
||||
filterComboBox.putClientProperty(FlatClientProperties.MINIMUM_WIDTH, 0);
|
||||
filterComboBox.setFocusable(false);
|
||||
filterComboBox.addActionListener(e -> filterChanged());
|
||||
add(filterComboBox, "cell 0 0,alignx right,growx 0");
|
||||
|
||||
Reference in New Issue
Block a user