Theme Editor: preview improvements:

- added "focused" checkbox to "All" tab to preview focused components
- added "button type" selector to "Buttons" tab
- added "unfocused"/"focused" header labels to "Buttons" and "Switches" tabs
- use local variables instead of fields where possible
This commit is contained in:
Karl Tauber
2021-09-05 21:08:36 +02:00
parent 824db2e3bd
commit 8640dee053
6 changed files with 881 additions and 642 deletions

View File

@@ -21,11 +21,13 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.beans.PropertyVetoException;
import java.util.function.Function;
import java.util.function.Predicate;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableRowSorter;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.extras.components.*;
import com.formdev.flatlaf.ui.FlatTabbedPaneUI;
@@ -77,13 +79,20 @@ class FlatThemePreviewAll
}
private void enabledChanged() {
boolean enabled = enabledCheckBox.isSelected();
// disable "focused" checkbox because disabled components are not focusable
focusedCheckBox.setEnabled( enabled );
if( focusedCheckBox.isSelected() )
focusedChanged();
preview.runWithUIDefaultsGetter( () -> {
enableDisable( this, enabledCheckBox.isSelected() );
enableDisable( this, enabled );
} );
}
private void enableDisable( Component comp, boolean enabled ) {
if( comp != enabledCheckBox && comp != menu2 )
if( comp != enabledCheckBox && comp != focusedCheckBox && comp != menu2 )
comp.setEnabled( enabled );
if( !(comp instanceof Container) || comp instanceof JInternalFrame )
@@ -110,6 +119,29 @@ class FlatThemePreviewAll
}
}
private void focusedChanged() {
Predicate<JComponent> value = focusedCheckBox.isSelected() && enabledCheckBox.isSelected()
? value = c -> true
: null;
focusComponent( this, value );
repaint();
}
private void focusComponent( Component comp, Object value ) {
if( comp != enabledCheckBox && comp != focusedCheckBox && comp != menu2 && comp instanceof JComponent )
((JComponent)comp).putClientProperty( FlatClientProperties.COMPONENT_FOCUS_OWNER, value );
if( !(comp instanceof Container) || comp instanceof JInternalFrame )
return;
for( Component c : ((Container)comp).getComponents() ) {
if( c instanceof JScrollPane )
c = ((JScrollPane)c).getViewport().getView();
focusComponent( c, value );
}
}
private void changeProgress() {
int value = slider3.getValue();
progressBar1.setValue( value );
@@ -134,90 +166,91 @@ class FlatThemePreviewAll
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
enabledCheckBox = new JCheckBox();
labelLabel = new JLabel();
label1 = new JLabel();
flatButton1 = new FlatButton();
buttonLabel = new JLabel();
button1 = new JButton();
testDefaultButton1 = new FlatThemePreviewAll.PreviewDefaultButton();
helpButton = new FlatButton();
hSpacer2 = new JPanel(null);
toggleButtonLabel = new JLabel();
toggleButton1 = new JToggleButton();
toggleButton3 = new JToggleButton();
hSpacer1 = new JPanel(null);
checkBoxLabel = new JLabel();
checkBox1 = new JCheckBox();
checkBox3 = new JCheckBox();
hSpacer3 = new JPanel(null);
radioButtonLabel = new JLabel();
radioButton1 = new JRadioButton();
radioButton3 = new JRadioButton();
hSpacer4 = new JPanel(null);
comboBoxLabel = new JLabel();
comboBox1 = new FlatComboBox<>();
comboBox3 = new JComboBox<>();
spinnerLabel = new JLabel();
spinner1 = new JSpinner();
textFieldLabel = new JLabel();
focusedCheckBox = new JCheckBox();
JLabel labelLabel = new JLabel();
JLabel label1 = new JLabel();
FlatButton flatButton1 = new FlatButton();
JLabel buttonLabel = new JLabel();
JButton button1 = new JButton();
FlatThemePreviewAll.PreviewDefaultButton testDefaultButton1 = new FlatThemePreviewAll.PreviewDefaultButton();
FlatButton helpButton = new FlatButton();
JPanel hSpacer2 = new JPanel(null);
JLabel toggleButtonLabel = new JLabel();
JToggleButton toggleButton1 = new JToggleButton();
JToggleButton toggleButton3 = new JToggleButton();
JPanel hSpacer1 = new JPanel(null);
JLabel checkBoxLabel = new JLabel();
JCheckBox checkBox1 = new JCheckBox();
JCheckBox checkBox3 = new JCheckBox();
JPanel hSpacer3 = new JPanel(null);
JLabel radioButtonLabel = new JLabel();
JRadioButton radioButton1 = new JRadioButton();
JRadioButton radioButton3 = new JRadioButton();
JPanel hSpacer4 = new JPanel(null);
JLabel comboBoxLabel = new JLabel();
FlatComboBox<String> comboBox1 = new FlatComboBox<>();
JComboBox<String> comboBox3 = new JComboBox<>();
JLabel spinnerLabel = new JLabel();
JSpinner spinner1 = new JSpinner();
JLabel textFieldLabel = new JLabel();
textField1 = new FlatTextField();
formattedTextField1 = new FlatFormattedTextField();
passwordField1 = new FlatPasswordField();
textAreaLabel = new JLabel();
scrollPane1 = new JScrollPane();
textArea1 = new JTextArea();
scrollPane5 = new JScrollPane();
editorPane1 = new JEditorPane();
scrollPane9 = new JScrollPane();
textPane1 = new JTextPane();
menuBarLabel = new JLabel();
menuBar1 = new JMenuBar();
FlatFormattedTextField formattedTextField1 = new FlatFormattedTextField();
FlatPasswordField passwordField1 = new FlatPasswordField();
JLabel textAreaLabel = new JLabel();
JScrollPane scrollPane1 = new JScrollPane();
JTextArea textArea1 = new JTextArea();
JScrollPane scrollPane5 = new JScrollPane();
JEditorPane editorPane1 = new JEditorPane();
JScrollPane scrollPane9 = new JScrollPane();
JTextPane textPane1 = new JTextPane();
JLabel menuBarLabel = new JLabel();
JMenuBar menuBar1 = new JMenuBar();
menu2 = new JMenu();
menuItem3 = new JMenuItem();
menuItem4 = new JMenuItem();
checkBoxMenuItem2 = new JCheckBoxMenuItem();
checkBoxMenuItem3 = new JCheckBoxMenuItem();
radioButtonMenuItem4 = new JRadioButtonMenuItem();
radioButtonMenuItem5 = new JRadioButtonMenuItem();
menu4 = new JMenu();
menuItem6 = new JMenuItem();
menu5 = new JMenu();
menuItem7 = new JMenuItem();
menu3 = new JMenu();
menuItem5 = new JMenuItem();
menuItem8 = new JMenuItem();
menuItem9 = new JMenuItem();
scrollBarLabel = new JLabel();
scrollBar1 = new JScrollBar();
scrollBar5 = new FlatScrollBar();
separatorLabel = new JLabel();
separator1 = new JSeparator();
sliderLabel = new JLabel();
JMenuItem menuItem3 = new JMenuItem();
JMenuItem menuItem4 = new JMenuItem();
JCheckBoxMenuItem checkBoxMenuItem2 = new JCheckBoxMenuItem();
JCheckBoxMenuItem checkBoxMenuItem3 = new JCheckBoxMenuItem();
JRadioButtonMenuItem radioButtonMenuItem4 = new JRadioButtonMenuItem();
JRadioButtonMenuItem radioButtonMenuItem5 = new JRadioButtonMenuItem();
JMenu menu4 = new JMenu();
JMenuItem menuItem6 = new JMenuItem();
JMenu menu5 = new JMenu();
JMenuItem menuItem7 = new JMenuItem();
JMenu menu3 = new JMenu();
JMenuItem menuItem5 = new JMenuItem();
JMenuItem menuItem8 = new JMenuItem();
JMenuItem menuItem9 = new JMenuItem();
JLabel scrollBarLabel = new JLabel();
JScrollBar scrollBar1 = new JScrollBar();
FlatScrollBar scrollBar5 = new FlatScrollBar();
JLabel separatorLabel = new JLabel();
JSeparator separator1 = new JSeparator();
JLabel sliderLabel = new JLabel();
slider1 = new JSlider();
slider3 = new JSlider();
progressBarLabel = new JLabel();
JLabel progressBarLabel = new JLabel();
progressBar1 = new FlatProgressBar();
progressBar2 = new FlatProgressBar();
toolTipLabel = new JLabel();
toolTip1 = new JToolTip();
toolBarLabel = new JLabel();
JLabel toolTipLabel = new JLabel();
JToolTip toolTip1 = new JToolTip();
JLabel toolBarLabel = new JLabel();
toolBar1 = new JToolBar();
button4 = new JButton();
button6 = new JButton();
button7 = new JToggleButton();
button8 = new JToggleButton();
tabbedPaneLabel = new JLabel();
JButton button4 = new JButton();
JButton button6 = new JButton();
JToggleButton button7 = new JToggleButton();
JToggleButton button8 = new JToggleButton();
JLabel tabbedPaneLabel = new JLabel();
tabbedPane1 = new FlatThemePreviewAll.PreviewTabbedPane();
listTreeLabel = new JLabel();
splitPane1 = new JSplitPane();
scrollPane2 = new JScrollPane();
JLabel listTreeLabel = new JLabel();
JSplitPane splitPane1 = new JSplitPane();
JScrollPane scrollPane2 = new JScrollPane();
list1 = new JList<>();
scrollPane3 = new JScrollPane();
JScrollPane scrollPane3 = new JScrollPane();
tree1 = new JTree();
tableLabel = new JLabel();
scrollPane4 = new JScrollPane();
JLabel tableLabel = new JLabel();
JScrollPane scrollPane4 = new JScrollPane();
table1 = new FlatThemePreviewAll.PreviewTable();
internalFrameLabel = new JLabel();
JLabel internalFrameLabel = new JLabel();
desktopPane1 = new JDesktopPane();
internalFrame1 = new JInternalFrame();
internalFrame2 = new JInternalFrame();
@@ -263,6 +296,11 @@ class FlatThemePreviewAll
enabledCheckBox.addActionListener(e -> enabledChanged());
add(enabledCheckBox, "cell 0 0 2 1,alignx left,growx 0");
//---- focusedCheckBox ----
focusedCheckBox.setText("Focused");
focusedCheckBox.addActionListener(e -> focusedChanged());
add(focusedCheckBox, "cell 0 0 2 1");
//---- labelLabel ----
labelLabel.setText("JLabel:");
add(labelLabel, "cell 0 1");
@@ -729,90 +767,18 @@ class FlatThemePreviewAll
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JCheckBox enabledCheckBox;
private JLabel labelLabel;
private JLabel label1;
private FlatButton flatButton1;
private JLabel buttonLabel;
private JButton button1;
private FlatThemePreviewAll.PreviewDefaultButton testDefaultButton1;
private FlatButton helpButton;
private JPanel hSpacer2;
private JLabel toggleButtonLabel;
private JToggleButton toggleButton1;
private JToggleButton toggleButton3;
private JPanel hSpacer1;
private JLabel checkBoxLabel;
private JCheckBox checkBox1;
private JCheckBox checkBox3;
private JPanel hSpacer3;
private JLabel radioButtonLabel;
private JRadioButton radioButton1;
private JRadioButton radioButton3;
private JPanel hSpacer4;
private JLabel comboBoxLabel;
private FlatComboBox<String> comboBox1;
private JComboBox<String> comboBox3;
private JLabel spinnerLabel;
private JSpinner spinner1;
private JLabel textFieldLabel;
private JCheckBox focusedCheckBox;
private FlatTextField textField1;
private FlatFormattedTextField formattedTextField1;
private FlatPasswordField passwordField1;
private JLabel textAreaLabel;
private JScrollPane scrollPane1;
private JTextArea textArea1;
private JScrollPane scrollPane5;
private JEditorPane editorPane1;
private JScrollPane scrollPane9;
private JTextPane textPane1;
private JLabel menuBarLabel;
private JMenuBar menuBar1;
private JMenu menu2;
private JMenuItem menuItem3;
private JMenuItem menuItem4;
private JCheckBoxMenuItem checkBoxMenuItem2;
private JCheckBoxMenuItem checkBoxMenuItem3;
private JRadioButtonMenuItem radioButtonMenuItem4;
private JRadioButtonMenuItem radioButtonMenuItem5;
private JMenu menu4;
private JMenuItem menuItem6;
private JMenu menu5;
private JMenuItem menuItem7;
private JMenu menu3;
private JMenuItem menuItem5;
private JMenuItem menuItem8;
private JMenuItem menuItem9;
private JLabel scrollBarLabel;
private JScrollBar scrollBar1;
private FlatScrollBar scrollBar5;
private JLabel separatorLabel;
private JSeparator separator1;
private JLabel sliderLabel;
private JSlider slider1;
private JSlider slider3;
private JLabel progressBarLabel;
private FlatProgressBar progressBar1;
private FlatProgressBar progressBar2;
private JLabel toolTipLabel;
private JToolTip toolTip1;
private JLabel toolBarLabel;
private JToolBar toolBar1;
private JButton button4;
private JButton button6;
private JToggleButton button7;
private JToggleButton button8;
private JLabel tabbedPaneLabel;
private FlatThemePreviewAll.PreviewTabbedPane tabbedPane1;
private JLabel listTreeLabel;
private JSplitPane splitPane1;
private JScrollPane scrollPane2;
private JList<String> list1;
private JScrollPane scrollPane3;
private JTree tree1;
private JLabel tableLabel;
private JScrollPane scrollPane4;
private FlatThemePreviewAll.PreviewTable table1;
private JLabel internalFrameLabel;
private JDesktopPane desktopPane1;
private JInternalFrame internalFrame1;
private JInternalFrame internalFrame2;

View File

@@ -3,6 +3,9 @@ JFDML JFormDesigner: "7.0.4.0.360" Java: "16" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
auxiliary() {
"JavaCodeGenerator.defaultVariableLocal": true
}
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog,hidemode 3"
"$columnConstraints": "[fill][130,fill]"
@@ -13,10 +16,23 @@ new FormModel {
name: "enabledCheckBox"
"text": "Enabled"
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "enabledChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0 2 1,alignx left,growx 0"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "focusedCheckBox"
"text": "Focused"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "focusedChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "labelLabel"
"text": "JLabel:"
@@ -285,6 +301,9 @@ new FormModel {
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
name: "menu2"
"text": "JMenu"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "menuItem3"
"text": "JMenuItem"
@@ -426,6 +445,9 @@ new FormModel {
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatProgressBar" ) {
name: "progressBar1"
"value": 60
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 18"
} )
@@ -433,6 +455,9 @@ new FormModel {
name: "progressBar2"
"value": 50
"stringPainted": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 19"
} )
@@ -456,6 +481,9 @@ new FormModel {
} )
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
name: "toolBar1"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
add( new FormComponent( "javax.swing.JButton" ) {
name: "button4"
"icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.closedIcon" )
@@ -487,6 +515,9 @@ new FormModel {
} )
add( new FormContainer( "com.formdev.flatlaf.themeeditor.FlatThemePreviewAll$PreviewTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) {
name: "tabbedPane1"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 22"
} )
@@ -509,6 +540,9 @@ new FormModel {
addElement( "Item 2" )
addElement( "Item 3" )
}
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class java.lang.String ) {
"value": "left"
@@ -528,6 +562,9 @@ new FormModel {
userObject: "Item 3"
} )
} )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class java.lang.String ) {
"value": "right"
@@ -567,6 +604,9 @@ new FormModel {
add( null )
add( null )
} )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 24,height 70"
@@ -579,6 +619,9 @@ new FormModel {
} )
add( new FormContainer( "javax.swing.JDesktopPane", new FormLayoutManager( class javax.swing.JDesktopPane ) ) {
name: "desktopPane1"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
add( new FormContainer( "javax.swing.JInternalFrame", new FormLayoutManager( class java.awt.BorderLayout ) ) {
name: "internalFrame1"
"visible": true
@@ -587,6 +630,9 @@ new FormModel {
"maximizable": true
"iconifiable": true
"resizable": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( null ) {
"x": 5
"y": 5
@@ -599,6 +645,9 @@ new FormModel {
"maximizable": true
"resizable": true
"title": "Inactive"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( null ) {
"x": 5
"y": 50

View File

@@ -16,6 +16,8 @@
package com.formdev.flatlaf.themeeditor;
import java.awt.Component;
import java.util.Objects;
import java.util.function.Predicate;
import javax.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
@@ -31,76 +33,113 @@ class FlatThemePreviewButtons
initComponents();
}
private void buttonTypeChanged() {
Object buttonType = null;
if( squareButton.isSelected() )
buttonType = FlatClientProperties.BUTTON_TYPE_SQUARE;
else if( roundRectButton.isSelected() )
buttonType = FlatClientProperties.BUTTON_TYPE_ROUND_RECT;
else if( tabButton.isSelected() )
buttonType = FlatClientProperties.BUTTON_TYPE_TAB;
else if( toolBarButtonButton.isSelected() )
buttonType = FlatClientProperties.BUTTON_TYPE_TOOLBAR_BUTTON;
else if( borderlessButton.isSelected() )
buttonType = FlatClientProperties.BUTTON_TYPE_BORDERLESS;
for( Component c : getComponents() ) {
if( !(c instanceof AbstractButton) )
continue;
AbstractButton b = (AbstractButton) c;
if( !Objects.equals( b.getClientProperty( FlatClientProperties.BUTTON_TYPE ), FlatClientProperties.BUTTON_TYPE_HELP ) )
b.putClientProperty( FlatClientProperties.BUTTON_TYPE, buttonType );
}
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
label11 = new JLabel();
label5 = new JLabel();
label7 = new JLabel();
label6 = new JLabel();
label8 = new JLabel();
label1 = new JLabel();
testStateButton1 = new FlatThemePreviewButtons.TestStateButton();
testStateButton7 = new FlatThemePreviewButtons.TestStateButton();
testStateButton4 = new FlatThemePreviewButtons.TestStateButton();
testStateButton10 = new FlatThemePreviewButtons.TestStateButton();
label2 = new JLabel();
testStateButton2 = new FlatThemePreviewButtons.TestStateButton();
testStateButton8 = new FlatThemePreviewButtons.TestStateButton();
testStateButton5 = new FlatThemePreviewButtons.TestStateButton();
testStateButton11 = new FlatThemePreviewButtons.TestStateButton();
label3 = new JLabel();
testStateButton3 = new FlatThemePreviewButtons.TestStateButton();
testStateButton9 = new FlatThemePreviewButtons.TestStateButton();
testStateButton6 = new FlatThemePreviewButtons.TestStateButton();
testStateButton12 = new FlatThemePreviewButtons.TestStateButton();
label4 = new JLabel();
testStateButton13 = new FlatThemePreviewButtons.TestStateButton();
testStateButton14 = new FlatThemePreviewButtons.TestStateButton();
label10 = new JLabel();
button1 = new JButton();
testDefaultButton1 = new FlatThemePreviewButtons.TestDefaultButton();
label12 = new JLabel();
label13 = new JLabel();
label14 = new JLabel();
label15 = new JLabel();
label16 = new JLabel();
label17 = new JLabel();
testStateToggleButton1 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton5 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton9 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton12 = new FlatThemePreviewButtons.TestStateToggleButton();
label18 = new JLabel();
testStateToggleButton2 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton6 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton10 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton13 = new FlatThemePreviewButtons.TestStateToggleButton();
label19 = new JLabel();
testStateToggleButton3 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton7 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton11 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton14 = new FlatThemePreviewButtons.TestStateToggleButton();
label20 = new JLabel();
testStateToggleButton4 = new FlatThemePreviewButtons.TestStateToggleButton();
testStateToggleButton8 = new FlatThemePreviewButtons.TestStateToggleButton();
label21 = new JLabel();
toggleButton1 = new JToggleButton();
toggleButton2 = new JToggleButton();
label32 = new JLabel();
label9 = new JLabel();
label33 = new JLabel();
label22 = new JLabel();
testStateButton15 = new FlatThemePreviewButtons.TestStateButton();
testStateButton19 = new FlatThemePreviewButtons.TestStateButton();
label23 = new JLabel();
testStateButton16 = new FlatThemePreviewButtons.TestStateButton();
testStateButton20 = new FlatThemePreviewButtons.TestStateButton();
label24 = new JLabel();
testStateButton17 = new FlatThemePreviewButtons.TestStateButton();
testStateButton21 = new FlatThemePreviewButtons.TestStateButton();
label25 = new JLabel();
testStateButton18 = new FlatThemePreviewButtons.TestStateButton();
label26 = new JLabel();
button2 = new JButton();
JPanel panel1 = new JPanel();
JLabel buttonTypeLabel = new JLabel();
JToolBar buttonTypeToolBar1 = new JToolBar();
noneButton = new JToggleButton();
squareButton = new JToggleButton();
roundRectButton = new JToggleButton();
tabButton = new JToggleButton();
JToolBar buttonTypeToolBar2 = new JToolBar();
toolBarButtonButton = new JToggleButton();
borderlessButton = new JToggleButton();
JLabel label11 = new JLabel();
JLabel label27 = new JLabel();
JLabel label28 = new JLabel();
JLabel label5 = new JLabel();
JLabel label7 = new JLabel();
JLabel label6 = new JLabel();
JLabel label8 = new JLabel();
JLabel label1 = new JLabel();
FlatThemePreviewButtons.TestStateButton testStateButton1 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton7 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton4 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton10 = new FlatThemePreviewButtons.TestStateButton();
JLabel label2 = new JLabel();
FlatThemePreviewButtons.TestStateButton testStateButton2 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton8 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton5 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton11 = new FlatThemePreviewButtons.TestStateButton();
JLabel label3 = new JLabel();
FlatThemePreviewButtons.TestStateButton testStateButton3 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton9 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton6 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton12 = new FlatThemePreviewButtons.TestStateButton();
JLabel label4 = new JLabel();
FlatThemePreviewButtons.TestStateButton testStateButton13 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton14 = new FlatThemePreviewButtons.TestStateButton();
JLabel label10 = new JLabel();
JButton button1 = new JButton();
FlatThemePreviewButtons.TestDefaultButton testDefaultButton1 = new FlatThemePreviewButtons.TestDefaultButton();
JLabel label12 = new JLabel();
JLabel label29 = new JLabel();
JLabel label30 = new JLabel();
JLabel label13 = new JLabel();
JLabel label14 = new JLabel();
JLabel label15 = new JLabel();
JLabel label16 = new JLabel();
JLabel label17 = new JLabel();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton1 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton5 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton9 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton12 = new FlatThemePreviewButtons.TestStateToggleButton();
JLabel label18 = new JLabel();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton2 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton6 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton10 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton13 = new FlatThemePreviewButtons.TestStateToggleButton();
JLabel label19 = new JLabel();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton3 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton7 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton11 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton14 = new FlatThemePreviewButtons.TestStateToggleButton();
JLabel label20 = new JLabel();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton4 = new FlatThemePreviewButtons.TestStateToggleButton();
FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton8 = new FlatThemePreviewButtons.TestStateToggleButton();
JLabel label21 = new JLabel();
JToggleButton toggleButton1 = new JToggleButton();
JToggleButton toggleButton2 = new JToggleButton();
JLabel label32 = new JLabel();
JLabel label9 = new JLabel();
JLabel label33 = new JLabel();
JLabel label22 = new JLabel();
FlatThemePreviewButtons.TestStateButton testStateButton15 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton19 = new FlatThemePreviewButtons.TestStateButton();
JLabel label23 = new JLabel();
FlatThemePreviewButtons.TestStateButton testStateButton16 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton20 = new FlatThemePreviewButtons.TestStateButton();
JLabel label24 = new JLabel();
FlatThemePreviewButtons.TestStateButton testStateButton17 = new FlatThemePreviewButtons.TestStateButton();
FlatThemePreviewButtons.TestStateButton testStateButton21 = new FlatThemePreviewButtons.TestStateButton();
JLabel label25 = new JLabel();
FlatThemePreviewButtons.TestStateButton testStateButton18 = new FlatThemePreviewButtons.TestStateButton();
JLabel label26 = new JLabel();
JButton button2 = new JButton();
//======== this ========
setLayout(new MigLayout(
@@ -112,7 +151,9 @@ class FlatThemePreviewButtons
"[fill]" +
"[fill]para",
// rows
"[]para" +
"[]" +
"[]0" +
"[]" +
"[]" +
"[]" +
@@ -120,6 +161,7 @@ class FlatThemePreviewButtons
"[]unrel" +
"[]para" +
"[]" +
"[]0" +
"[]" +
"[]" +
"[]" +
@@ -134,78 +176,158 @@ class FlatThemePreviewButtons
"[]unrel" +
"[]"));
//======== panel1 ========
{
panel1.setLayout(new MigLayout(
"insets 0,hidemode 3",
// columns
"[fill]" +
"[fill]",
// rows
"[]0" +
"[]"));
//---- buttonTypeLabel ----
buttonTypeLabel.setText("Button type:");
panel1.add(buttonTypeLabel, "cell 0 0");
//======== buttonTypeToolBar1 ========
{
buttonTypeToolBar1.setFloatable(false);
buttonTypeToolBar1.setBorder(BorderFactory.createEmptyBorder());
//---- noneButton ----
noneButton.setText("none");
noneButton.setSelected(true);
noneButton.setFont(noneButton.getFont().deriveFont(noneButton.getFont().getSize() - 2f));
noneButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(noneButton);
//---- squareButton ----
squareButton.setText("square");
squareButton.setFont(squareButton.getFont().deriveFont(squareButton.getFont().getSize() - 2f));
squareButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(squareButton);
//---- roundRectButton ----
roundRectButton.setText("roundRect");
roundRectButton.setFont(roundRectButton.getFont().deriveFont(roundRectButton.getFont().getSize() - 2f));
roundRectButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(roundRectButton);
//---- tabButton ----
tabButton.setText("tab");
tabButton.setFont(tabButton.getFont().deriveFont(tabButton.getFont().getSize() - 2f));
tabButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar1.add(tabButton);
}
panel1.add(buttonTypeToolBar1, "cell 1 0");
//======== buttonTypeToolBar2 ========
{
buttonTypeToolBar2.setFloatable(false);
buttonTypeToolBar2.setBorder(BorderFactory.createEmptyBorder());
//---- toolBarButtonButton ----
toolBarButtonButton.setText("toolBarButton");
toolBarButtonButton.setFont(toolBarButtonButton.getFont().deriveFont(toolBarButtonButton.getFont().getSize() - 2f));
toolBarButtonButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar2.add(toolBarButtonButton);
//---- borderlessButton ----
borderlessButton.setText("borderless");
borderlessButton.setFont(borderlessButton.getFont().deriveFont(borderlessButton.getFont().getSize() - 2f));
borderlessButton.addActionListener(e -> buttonTypeChanged());
buttonTypeToolBar2.add(borderlessButton);
}
panel1.add(buttonTypeToolBar2, "cell 1 1");
}
add(panel1, "cell 0 0 5 1");
//---- label11 ----
label11.setText("JButton");
label11.setFont(label11.getFont().deriveFont(label11.getFont().getSize() + 4f));
add(label11, "cell 0 0 3 1");
add(label11, "cell 0 1 3 1");
//---- label27 ----
label27.setText("unfocused");
add(label27, "cell 1 2 2 1,alignx center,growx 0");
//---- label28 ----
label28.setText("focused");
add(label28, "cell 3 2 2 1,alignx center,growx 0");
//---- label5 ----
label5.setText("regular");
add(label5, "cell 1 1");
label5.setFont(label5.getFont().deriveFont(label5.getFont().getSize() - 2f));
add(label5, "cell 1 3");
//---- label7 ----
label7.setText("default");
add(label7, "cell 2 1");
label7.setFont(label7.getFont().deriveFont(label7.getFont().getSize() - 2f));
add(label7, "cell 2 3");
//---- label6 ----
label6.setText("focused");
add(label6, "cell 3 1");
label6.setText("regular");
label6.setFont(label6.getFont().deriveFont(label6.getFont().getSize() - 2f));
add(label6, "cell 3 3");
//---- label8 ----
label8.setText("default");
add(label8, "cell 4 1");
label8.setFont(label8.getFont().deriveFont(label8.getFont().getSize() - 2f));
add(label8, "cell 4 3");
//---- label1 ----
label1.setText("none");
add(label1, "cell 0 2");
add(label1, "cell 0 4");
//---- testStateButton1 ----
testStateButton1.setText("OK");
testStateButton1.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton1, "cell 1 2");
add(testStateButton1, "cell 1 4");
//---- testStateButton7 ----
testStateButton7.setText("OK");
testStateButton7.setStateDefault(true);
testStateButton7.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton7, "cell 2 2");
add(testStateButton7, "cell 2 4");
//---- testStateButton4 ----
testStateButton4.setText("OK");
testStateButton4.setStateFocused(true);
testStateButton4.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton4, "cell 3 2");
add(testStateButton4, "cell 3 4");
//---- testStateButton10 ----
testStateButton10.setText("OK");
testStateButton10.setStateFocused(true);
testStateButton10.setStateDefault(true);
testStateButton10.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton10, "cell 4 2");
add(testStateButton10, "cell 4 4");
//---- label2 ----
label2.setText("hover");
add(label2, "cell 0 3");
add(label2, "cell 0 5");
//---- testStateButton2 ----
testStateButton2.setText("OK");
testStateButton2.setStateHover(true);
testStateButton2.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton2, "cell 1 3");
add(testStateButton2, "cell 1 5");
//---- testStateButton8 ----
testStateButton8.setText("OK");
testStateButton8.setStateHover(true);
testStateButton8.setStateDefault(true);
testStateButton8.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton8, "cell 2 3");
add(testStateButton8, "cell 2 5");
//---- testStateButton5 ----
testStateButton5.setText("OK");
testStateButton5.setStateHover(true);
testStateButton5.setStateFocused(true);
testStateButton5.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton5, "cell 3 3");
add(testStateButton5, "cell 3 5");
//---- testStateButton11 ----
testStateButton11.setText("OK");
@@ -213,31 +335,31 @@ class FlatThemePreviewButtons
testStateButton11.setStateFocused(true);
testStateButton11.setStateDefault(true);
testStateButton11.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton11, "cell 4 3");
add(testStateButton11, "cell 4 5");
//---- label3 ----
label3.setText("pressed");
add(label3, "cell 0 4");
add(label3, "cell 0 6");
//---- testStateButton3 ----
testStateButton3.setText("OK");
testStateButton3.setStatePressed(true);
testStateButton3.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton3, "cell 1 4");
add(testStateButton3, "cell 1 6");
//---- testStateButton9 ----
testStateButton9.setText("OK");
testStateButton9.setStatePressed(true);
testStateButton9.setStateDefault(true);
testStateButton9.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton9, "cell 2 4");
add(testStateButton9, "cell 2 6");
//---- testStateButton6 ----
testStateButton6.setText("OK");
testStateButton6.setStatePressed(true);
testStateButton6.setStateFocused(true);
testStateButton6.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton6, "cell 3 4");
add(testStateButton6, "cell 3 6");
//---- testStateButton12 ----
testStateButton12.setText("OK");
@@ -245,320 +367,279 @@ class FlatThemePreviewButtons
testStateButton12.setStateFocused(true);
testStateButton12.setStateDefault(true);
testStateButton12.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton12, "cell 4 4");
add(testStateButton12, "cell 4 6");
//---- label4 ----
label4.setText("disabled");
add(label4, "cell 0 5");
add(label4, "cell 0 7");
//---- testStateButton13 ----
testStateButton13.setText("OK");
testStateButton13.setEnabled(false);
testStateButton13.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton13, "cell 1 5");
add(testStateButton13, "cell 1 7");
//---- testStateButton14 ----
testStateButton14.setText("OK");
testStateButton14.setEnabled(false);
testStateButton14.setStateDefault(true);
testStateButton14.putClientProperty("JComponent.minimumWidth", 0);
add(testStateButton14, "cell 2 5");
add(testStateButton14, "cell 2 7");
//---- label10 ----
label10.setText("try me");
add(label10, "cell 0 6");
add(label10, "cell 0 8");
//---- button1 ----
button1.setText("OK");
button1.putClientProperty("JComponent.minimumWidth", 0);
add(button1, "cell 1 6");
add(button1, "cell 1 8");
//---- testDefaultButton1 ----
testDefaultButton1.setText("OK");
testDefaultButton1.putClientProperty("JComponent.minimumWidth", 0);
add(testDefaultButton1, "cell 2 6");
add(testDefaultButton1, "cell 2 8");
//---- label12 ----
label12.setText("JToggleButton");
label12.setFont(label12.getFont().deriveFont(label12.getFont().getSize() + 4f));
add(label12, "cell 0 7 3 1");
add(label12, "cell 0 9 3 1");
//---- label29 ----
label29.setText("unfocused");
add(label29, "cell 1 10 2 1,alignx center,growx 0");
//---- label30 ----
label30.setText("focused");
add(label30, "cell 3 10 2 1,alignx center,growx 0");
//---- label13 ----
label13.setText("unsel.");
add(label13, "cell 1 8");
label13.setFont(label13.getFont().deriveFont(label13.getFont().getSize() - 2f));
add(label13, "cell 1 11");
//---- label14 ----
label14.setText("selected");
add(label14, "cell 2 8");
label14.setFont(label14.getFont().deriveFont(label14.getFont().getSize() - 2f));
add(label14, "cell 2 11");
//---- label15 ----
label15.setText("focused");
add(label15, "cell 3 8");
label15.setText("unsel.");
label15.setFont(label15.getFont().deriveFont(label15.getFont().getSize() - 2f));
add(label15, "cell 3 11");
//---- label16 ----
label16.setText("selected");
add(label16, "cell 4 8");
label16.setFont(label16.getFont().deriveFont(label16.getFont().getSize() - 2f));
add(label16, "cell 4 11");
//---- label17 ----
label17.setText("none");
add(label17, "cell 0 9");
add(label17, "cell 0 12");
//---- testStateToggleButton1 ----
testStateToggleButton1.setText("OK");
add(testStateToggleButton1, "cell 1 9");
add(testStateToggleButton1, "cell 1 12");
//---- testStateToggleButton5 ----
testStateToggleButton5.setText("OK");
testStateToggleButton5.setStateSelected(true);
add(testStateToggleButton5, "cell 2 9");
add(testStateToggleButton5, "cell 2 12");
//---- testStateToggleButton9 ----
testStateToggleButton9.setText("OK");
testStateToggleButton9.setStateFocused(true);
add(testStateToggleButton9, "cell 3 9");
add(testStateToggleButton9, "cell 3 12");
//---- testStateToggleButton12 ----
testStateToggleButton12.setText("OK");
testStateToggleButton12.setStateSelected(true);
testStateToggleButton12.setStateFocused(true);
add(testStateToggleButton12, "cell 4 9");
add(testStateToggleButton12, "cell 4 12");
//---- label18 ----
label18.setText("hover");
add(label18, "cell 0 10");
add(label18, "cell 0 13");
//---- testStateToggleButton2 ----
testStateToggleButton2.setText("OK");
testStateToggleButton2.setStateHover(true);
add(testStateToggleButton2, "cell 1 10");
add(testStateToggleButton2, "cell 1 13");
//---- testStateToggleButton6 ----
testStateToggleButton6.setText("OK");
testStateToggleButton6.setStateHover(true);
testStateToggleButton6.setStateSelected(true);
add(testStateToggleButton6, "cell 2 10");
add(testStateToggleButton6, "cell 2 13");
//---- testStateToggleButton10 ----
testStateToggleButton10.setText("OK");
testStateToggleButton10.setStateHover(true);
testStateToggleButton10.setStateFocused(true);
add(testStateToggleButton10, "cell 3 10");
add(testStateToggleButton10, "cell 3 13");
//---- testStateToggleButton13 ----
testStateToggleButton13.setText("OK");
testStateToggleButton13.setStateHover(true);
testStateToggleButton13.setStateSelected(true);
testStateToggleButton13.setStateFocused(true);
add(testStateToggleButton13, "cell 4 10");
add(testStateToggleButton13, "cell 4 13");
//---- label19 ----
label19.setText("pressed");
add(label19, "cell 0 11");
add(label19, "cell 0 14");
//---- testStateToggleButton3 ----
testStateToggleButton3.setText("OK");
testStateToggleButton3.setStatePressed(true);
add(testStateToggleButton3, "cell 1 11");
add(testStateToggleButton3, "cell 1 14");
//---- testStateToggleButton7 ----
testStateToggleButton7.setText("OK");
testStateToggleButton7.setStatePressed(true);
testStateToggleButton7.setStateSelected(true);
add(testStateToggleButton7, "cell 2 11");
add(testStateToggleButton7, "cell 2 14");
//---- testStateToggleButton11 ----
testStateToggleButton11.setText("OK");
testStateToggleButton11.setStatePressed(true);
testStateToggleButton11.setStateFocused(true);
add(testStateToggleButton11, "cell 3 11");
add(testStateToggleButton11, "cell 3 14");
//---- testStateToggleButton14 ----
testStateToggleButton14.setText("OK");
testStateToggleButton14.setStatePressed(true);
testStateToggleButton14.setStateSelected(true);
testStateToggleButton14.setStateFocused(true);
add(testStateToggleButton14, "cell 4 11");
add(testStateToggleButton14, "cell 4 14");
//---- label20 ----
label20.setText("disabled");
add(label20, "cell 0 12");
add(label20, "cell 0 15");
//---- testStateToggleButton4 ----
testStateToggleButton4.setText("OK");
testStateToggleButton4.setEnabled(false);
add(testStateToggleButton4, "cell 1 12");
add(testStateToggleButton4, "cell 1 15");
//---- testStateToggleButton8 ----
testStateToggleButton8.setText("OK");
testStateToggleButton8.setEnabled(false);
testStateToggleButton8.setStateSelected(true);
add(testStateToggleButton8, "cell 2 12");
add(testStateToggleButton8, "cell 2 15");
//---- label21 ----
label21.setText("try me");
add(label21, "cell 0 13");
add(label21, "cell 0 16");
//---- toggleButton1 ----
toggleButton1.setText("OK");
add(toggleButton1, "cell 1 13");
add(toggleButton1, "cell 1 16");
//---- toggleButton2 ----
toggleButton2.setText("OK");
toggleButton2.setSelected(true);
add(toggleButton2, "cell 2 13");
add(toggleButton2, "cell 2 16");
//---- label32 ----
label32.setText("Help Button");
label32.setFont(label32.getFont().deriveFont(label32.getFont().getSize() + 4f));
add(label32, "cell 0 14 2 1");
add(label32, "cell 0 17 2 1");
//---- label9 ----
label9.setText("regular");
add(label9, "cell 1 15");
label9.setText("unfocused");
add(label9, "cell 1 18 2 1,alignx center,growx 0");
//---- label33 ----
label33.setText("focused");
add(label33, "cell 2 15");
add(label33, "cell 3 18 2 1,alignx center,growx 0");
//---- label22 ----
label22.setText("none");
add(label22, "cell 0 16");
add(label22, "cell 0 19");
//---- testStateButton15 ----
testStateButton15.putClientProperty("JComponent.minimumWidth", 0);
testStateButton15.putClientProperty("JButton.buttonType", "help");
add(testStateButton15, "cell 1 16");
add(testStateButton15, "cell 1 19");
//---- testStateButton19 ----
testStateButton19.setStateFocused(true);
testStateButton19.putClientProperty("JComponent.minimumWidth", 0);
testStateButton19.putClientProperty("JButton.buttonType", "help");
add(testStateButton19, "cell 2 16");
add(testStateButton19, "cell 3 19");
//---- label23 ----
label23.setText("hover");
add(label23, "cell 0 17");
add(label23, "cell 0 20");
//---- testStateButton16 ----
testStateButton16.setStateHover(true);
testStateButton16.putClientProperty("JComponent.minimumWidth", 0);
testStateButton16.putClientProperty("JButton.buttonType", "help");
add(testStateButton16, "cell 1 17");
add(testStateButton16, "cell 1 20");
//---- testStateButton20 ----
testStateButton20.setStateHover(true);
testStateButton20.setStateFocused(true);
testStateButton20.putClientProperty("JComponent.minimumWidth", 0);
testStateButton20.putClientProperty("JButton.buttonType", "help");
add(testStateButton20, "cell 2 17");
add(testStateButton20, "cell 3 20");
//---- label24 ----
label24.setText("pressed");
add(label24, "cell 0 18");
add(label24, "cell 0 21");
//---- testStateButton17 ----
testStateButton17.setStatePressed(true);
testStateButton17.putClientProperty("JComponent.minimumWidth", 0);
testStateButton17.putClientProperty("JButton.buttonType", "help");
add(testStateButton17, "cell 1 18");
add(testStateButton17, "cell 1 21");
//---- testStateButton21 ----
testStateButton21.setStatePressed(true);
testStateButton21.setStateFocused(true);
testStateButton21.putClientProperty("JComponent.minimumWidth", 0);
testStateButton21.putClientProperty("JButton.buttonType", "help");
add(testStateButton21, "cell 2 18");
add(testStateButton21, "cell 3 21");
//---- label25 ----
label25.setText("disabled");
add(label25, "cell 0 19");
add(label25, "cell 0 22");
//---- testStateButton18 ----
testStateButton18.setEnabled(false);
testStateButton18.putClientProperty("JComponent.minimumWidth", 0);
testStateButton18.putClientProperty("JButton.buttonType", "help");
add(testStateButton18, "cell 1 19");
add(testStateButton18, "cell 1 22");
//---- label26 ----
label26.setText("try me");
add(label26, "cell 0 20");
add(label26, "cell 0 23");
//---- button2 ----
button2.putClientProperty("JComponent.minimumWidth", 0);
button2.putClientProperty("JButton.buttonType", "help");
add(button2, "cell 1 20");
add(button2, "cell 1 23");
//---- buttonGroup1 ----
ButtonGroup buttonGroup1 = new ButtonGroup();
buttonGroup1.add(noneButton);
buttonGroup1.add(squareButton);
buttonGroup1.add(roundRectButton);
buttonGroup1.add(tabButton);
buttonGroup1.add(toolBarButtonButton);
buttonGroup1.add(borderlessButton);
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JLabel label11;
private JLabel label5;
private JLabel label7;
private JLabel label6;
private JLabel label8;
private JLabel label1;
private FlatThemePreviewButtons.TestStateButton testStateButton1;
private FlatThemePreviewButtons.TestStateButton testStateButton7;
private FlatThemePreviewButtons.TestStateButton testStateButton4;
private FlatThemePreviewButtons.TestStateButton testStateButton10;
private JLabel label2;
private FlatThemePreviewButtons.TestStateButton testStateButton2;
private FlatThemePreviewButtons.TestStateButton testStateButton8;
private FlatThemePreviewButtons.TestStateButton testStateButton5;
private FlatThemePreviewButtons.TestStateButton testStateButton11;
private JLabel label3;
private FlatThemePreviewButtons.TestStateButton testStateButton3;
private FlatThemePreviewButtons.TestStateButton testStateButton9;
private FlatThemePreviewButtons.TestStateButton testStateButton6;
private FlatThemePreviewButtons.TestStateButton testStateButton12;
private JLabel label4;
private FlatThemePreviewButtons.TestStateButton testStateButton13;
private FlatThemePreviewButtons.TestStateButton testStateButton14;
private JLabel label10;
private JButton button1;
private FlatThemePreviewButtons.TestDefaultButton testDefaultButton1;
private JLabel label12;
private JLabel label13;
private JLabel label14;
private JLabel label15;
private JLabel label16;
private JLabel label17;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton1;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton5;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton9;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton12;
private JLabel label18;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton2;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton6;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton10;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton13;
private JLabel label19;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton3;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton7;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton11;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton14;
private JLabel label20;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton4;
private FlatThemePreviewButtons.TestStateToggleButton testStateToggleButton8;
private JLabel label21;
private JToggleButton toggleButton1;
private JToggleButton toggleButton2;
private JLabel label32;
private JLabel label9;
private JLabel label33;
private JLabel label22;
private FlatThemePreviewButtons.TestStateButton testStateButton15;
private FlatThemePreviewButtons.TestStateButton testStateButton19;
private JLabel label23;
private FlatThemePreviewButtons.TestStateButton testStateButton16;
private FlatThemePreviewButtons.TestStateButton testStateButton20;
private JLabel label24;
private FlatThemePreviewButtons.TestStateButton testStateButton17;
private FlatThemePreviewButtons.TestStateButton testStateButton21;
private JLabel label25;
private FlatThemePreviewButtons.TestStateButton testStateButton18;
private JLabel label26;
private JButton button2;
private JToggleButton noneButton;
private JToggleButton squareButton;
private JToggleButton roundRectButton;
private JToggleButton tabButton;
private JToggleButton toolBarButtonButton;
private JToggleButton borderlessButton;
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class TestStateButton ----------------------------------------------

View File

@@ -3,55 +3,164 @@ JFDML JFormDesigner: "7.0.4.0.360" Java: "16" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
auxiliary() {
"JavaCodeGenerator.defaultVariableLocal": true
}
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog,hidemode 3"
"$columnConstraints": "[fill][fill][fill]para[fill][fill]para"
"$rowConstraints": "[][][][][][]unrel[]para[][][][][][]unrel[]para[][][][][][]unrel[]"
"$rowConstraints": "[]para[][]0[][][][][]unrel[]para[][]0[][][][][]unrel[]para[][][][][][]unrel[]"
} ) {
name: "this"
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[fill][fill]"
"$rowConstraints": "[]0[]"
} ) {
name: "panel1"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "buttonTypeLabel"
"text": "Button type:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
name: "buttonTypeToolBar1"
"floatable": false
"border": &EmptyBorder0 new javax.swing.border.EmptyBorder( 0, 0, 0, 0 )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "noneButton"
"text": "none"
"$buttonGroup": new FormReference( "buttonGroup1" )
"selected": true
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "squareButton"
"text": "square"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "roundRectButton"
"text": "roundRect"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "tabButton"
"text": "tab"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
} )
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
name: "buttonTypeToolBar2"
"floatable": false
"border": #EmptyBorder0
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toolBarButtonButton"
"text": "toolBarButton"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) )
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "borderlessButton"
"text": "borderless"
"$buttonGroup": new FormReference( "buttonGroup1" )
"font": #SwingDerivedFont0
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "buttonTypeChanged", false ) )
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label11"
"text": "JButton"
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
"font": &SwingDerivedFont1 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0 3 1"
"value": "cell 0 1 3 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label27"
"text": "unfocused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label28"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 2 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label5"
"text": "regular"
"font": &SwingDerivedFont2 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
"value": "cell 1 3"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label7"
"text": "default"
"font": #SwingDerivedFont2
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
"value": "cell 2 3"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label6"
"text": "focused"
"text": "regular"
"font": #SwingDerivedFont2
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
"value": "cell 3 3"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label8"
"text": "default"
"font": #SwingDerivedFont2
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
"value": "cell 4 3"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1"
"text": "none"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
"value": "cell 0 4"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton1"
"text": "OK"
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2"
"value": "cell 1 4"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton7"
@@ -59,7 +168,7 @@ new FormModel {
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 2"
"value": "cell 2 4"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton4"
@@ -67,7 +176,7 @@ new FormModel {
"stateFocused": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 2"
"value": "cell 3 4"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton10"
@@ -76,13 +185,13 @@ new FormModel {
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 2"
"value": "cell 4 4"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label2"
"text": "hover"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
"value": "cell 0 5"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton2"
@@ -90,7 +199,7 @@ new FormModel {
"stateHover": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3"
"value": "cell 1 5"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton8"
@@ -99,7 +208,7 @@ new FormModel {
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 3"
"value": "cell 2 5"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton5"
@@ -108,7 +217,7 @@ new FormModel {
"stateFocused": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 3"
"value": "cell 3 5"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton11"
@@ -118,13 +227,13 @@ new FormModel {
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 3"
"value": "cell 4 5"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3"
"text": "pressed"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 4"
"value": "cell 0 6"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton3"
@@ -132,7 +241,7 @@ new FormModel {
"statePressed": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
"value": "cell 1 6"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton9"
@@ -141,7 +250,7 @@ new FormModel {
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 4"
"value": "cell 2 6"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton6"
@@ -150,7 +259,7 @@ new FormModel {
"stateFocused": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 4"
"value": "cell 3 6"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton12"
@@ -160,13 +269,13 @@ new FormModel {
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 4"
"value": "cell 4 6"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4"
"text": "disabled"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 5"
"value": "cell 0 7"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton13"
@@ -174,7 +283,7 @@ new FormModel {
"enabled": false
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 5"
"value": "cell 1 7"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton14"
@@ -183,84 +292,100 @@ new FormModel {
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 5"
"value": "cell 2 7"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label10"
"text": "try me"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 6"
"value": "cell 0 8"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button1"
"text": "OK"
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 6"
"value": "cell 1 8"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestDefaultButton" ) {
name: "testDefaultButton1"
"text": "OK"
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 6"
"value": "cell 2 8"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label12"
"text": "JToggleButton"
"font": #SwingDerivedFont0
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7 3 1"
"value": "cell 0 9 3 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label29"
"text": "unfocused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 10 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label30"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 10 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label13"
"text": "unsel."
"font": #SwingDerivedFont2
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 8"
"value": "cell 1 11"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label14"
"text": "selected"
"font": #SwingDerivedFont2
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 8"
"value": "cell 2 11"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label15"
"text": "focused"
"text": "unsel."
"font": #SwingDerivedFont2
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 8"
"value": "cell 3 11"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label16"
"text": "selected"
"font": #SwingDerivedFont2
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 8"
"value": "cell 4 11"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label17"
"text": "none"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 9"
"value": "cell 0 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton1"
"text": "OK"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 9"
"value": "cell 1 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton5"
"text": "OK"
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 9"
"value": "cell 2 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton9"
"text": "OK"
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 9"
"value": "cell 3 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton12"
@@ -268,20 +393,20 @@ new FormModel {
"stateSelected": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 9"
"value": "cell 4 12"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label18"
"text": "hover"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 10"
"value": "cell 0 13"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton2"
"text": "OK"
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 10"
"value": "cell 1 13"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton6"
@@ -289,7 +414,7 @@ new FormModel {
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 10"
"value": "cell 2 13"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton10"
@@ -297,7 +422,7 @@ new FormModel {
"stateHover": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 10"
"value": "cell 3 13"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton13"
@@ -306,20 +431,20 @@ new FormModel {
"stateSelected": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 10"
"value": "cell 4 13"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label19"
"text": "pressed"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 11"
"value": "cell 0 14"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton3"
"text": "OK"
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 11"
"value": "cell 1 14"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton7"
@@ -327,7 +452,7 @@ new FormModel {
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 11"
"value": "cell 2 14"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton11"
@@ -335,7 +460,7 @@ new FormModel {
"statePressed": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 11"
"value": "cell 3 14"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton14"
@@ -344,20 +469,20 @@ new FormModel {
"stateSelected": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 11"
"value": "cell 4 14"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label20"
"text": "disabled"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 12"
"value": "cell 0 15"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton4"
"text": "OK"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 12"
"value": "cell 1 15"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateToggleButton" ) {
name: "testStateToggleButton8"
@@ -365,58 +490,58 @@ new FormModel {
"enabled": false
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 12"
"value": "cell 2 15"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label21"
"text": "try me"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 13"
"value": "cell 0 16"
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton1"
"text": "OK"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 13"
"value": "cell 1 16"
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton2"
"text": "OK"
"selected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 13"
"value": "cell 2 16"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label32"
"text": "Help Button"
"font": #SwingDerivedFont0
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 14 2 1"
"value": "cell 0 17 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label9"
"text": "regular"
"text": "unfocused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 15"
"value": "cell 1 18 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label33"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 15"
"value": "cell 3 18 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label22"
"text": "none"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 16"
"value": "cell 0 19"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton15"
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 16"
"value": "cell 1 19"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton19"
@@ -424,13 +549,13 @@ new FormModel {
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 16"
"value": "cell 3 19"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label23"
"text": "hover"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 17"
"value": "cell 0 20"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton16"
@@ -438,7 +563,7 @@ new FormModel {
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 17"
"value": "cell 1 20"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton20"
@@ -447,13 +572,13 @@ new FormModel {
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 17"
"value": "cell 3 20"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label24"
"text": "pressed"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 18"
"value": "cell 0 21"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton17"
@@ -461,7 +586,7 @@ new FormModel {
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 18"
"value": "cell 1 21"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton21"
@@ -470,13 +595,13 @@ new FormModel {
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 18"
"value": "cell 3 21"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label25"
"text": "disabled"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 19"
"value": "cell 0 22"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewButtons$TestStateButton" ) {
name: "testStateButton18"
@@ -484,24 +609,29 @@ new FormModel {
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 19"
"value": "cell 1 22"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label26"
"text": "try me"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 20"
"value": "cell 0 23"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button2"
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 20"
"value": "cell 1 23"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"location": new java.awt.Point( 5, 0 )
"size": new java.awt.Dimension( 335, 685 )
} )
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
name: "buttonGroup1"
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 5, 765 )
} )
}
}

View File

@@ -33,58 +33,62 @@ class FlatThemePreviewSwitches
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
label22 = new JLabel();
label23 = new JLabel();
label28 = new JLabel();
label24 = new JLabel();
label29 = new JLabel();
label17 = new JLabel();
testStateCheckBox1 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox8 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox5 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox12 = new FlatThemePreviewSwitches.TestStateCheckBox();
label18 = new JLabel();
testStateCheckBox2 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox9 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox6 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox13 = new FlatThemePreviewSwitches.TestStateCheckBox();
label19 = new JLabel();
testStateCheckBox3 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox10 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox7 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox14 = new FlatThemePreviewSwitches.TestStateCheckBox();
label20 = new JLabel();
testStateCheckBox4 = new FlatThemePreviewSwitches.TestStateCheckBox();
testStateCheckBox11 = new FlatThemePreviewSwitches.TestStateCheckBox();
label21 = new JLabel();
checkBox1 = new JCheckBox();
checkBox2 = new JCheckBox();
label27 = new JLabel();
label25 = new JLabel();
label30 = new JLabel();
label26 = new JLabel();
label31 = new JLabel();
label36 = new JLabel();
testStateRadioButton1 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton8 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton5 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton9 = new FlatThemePreviewSwitches.TestStateRadioButton();
label35 = new JLabel();
testStateRadioButton2 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton10 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton6 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton11 = new FlatThemePreviewSwitches.TestStateRadioButton();
label34 = new JLabel();
testStateRadioButton3 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton12 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton7 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton13 = new FlatThemePreviewSwitches.TestStateRadioButton();
label33 = new JLabel();
testStateRadioButton4 = new FlatThemePreviewSwitches.TestStateRadioButton();
testStateRadioButton14 = new FlatThemePreviewSwitches.TestStateRadioButton();
label32 = new JLabel();
radioButton1 = new JRadioButton();
radioButton2 = new JRadioButton();
JLabel label22 = new JLabel();
JLabel label1 = new JLabel();
JLabel label2 = new JLabel();
JLabel label23 = new JLabel();
JLabel label28 = new JLabel();
JLabel label24 = new JLabel();
JLabel label29 = new JLabel();
JLabel label17 = new JLabel();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox1 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox8 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox5 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox12 = new FlatThemePreviewSwitches.TestStateCheckBox();
JLabel label18 = new JLabel();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox2 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox9 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox6 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox13 = new FlatThemePreviewSwitches.TestStateCheckBox();
JLabel label19 = new JLabel();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox3 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox10 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox7 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox14 = new FlatThemePreviewSwitches.TestStateCheckBox();
JLabel label20 = new JLabel();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox4 = new FlatThemePreviewSwitches.TestStateCheckBox();
FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox11 = new FlatThemePreviewSwitches.TestStateCheckBox();
JLabel label21 = new JLabel();
JCheckBox checkBox1 = new JCheckBox();
JCheckBox checkBox2 = new JCheckBox();
JLabel label27 = new JLabel();
JLabel label3 = new JLabel();
JLabel label4 = new JLabel();
JLabel label25 = new JLabel();
JLabel label30 = new JLabel();
JLabel label26 = new JLabel();
JLabel label31 = new JLabel();
JLabel label36 = new JLabel();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton1 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton8 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton5 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton9 = new FlatThemePreviewSwitches.TestStateRadioButton();
JLabel label35 = new JLabel();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton2 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton10 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton6 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton11 = new FlatThemePreviewSwitches.TestStateRadioButton();
JLabel label34 = new JLabel();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton3 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton12 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton7 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton13 = new FlatThemePreviewSwitches.TestStateRadioButton();
JLabel label33 = new JLabel();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton4 = new FlatThemePreviewSwitches.TestStateRadioButton();
FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton14 = new FlatThemePreviewSwitches.TestStateRadioButton();
JLabel label32 = new JLabel();
JRadioButton radioButton1 = new JRadioButton();
JRadioButton radioButton2 = new JRadioButton();
//======== this ========
setLayout(new MigLayout(
@@ -97,6 +101,7 @@ class FlatThemePreviewSwitches
"[fill]para",
// rows
"[]" +
"[]0" +
"[]" +
"[]" +
"[]" +
@@ -104,6 +109,7 @@ class FlatThemePreviewSwitches
"[]unrel" +
"[]para" +
"[]" +
"[]0" +
"[]" +
"[]" +
"[]" +
@@ -116,314 +122,286 @@ class FlatThemePreviewSwitches
label22.setFont(label22.getFont().deriveFont(label22.getFont().getSize() + 4f));
add(label22, "cell 0 0 3 1");
//---- label1 ----
label1.setText("unfocused");
add(label1, "cell 1 1 2 1,alignx center,growx 0");
//---- label2 ----
label2.setText("focused");
add(label2, "cell 3 1 2 1,alignx center,growx 0");
//---- label23 ----
label23.setText("unsel.");
add(label23, "cell 1 1");
label23.setFont(label23.getFont().deriveFont(label23.getFont().getSize() - 2f));
add(label23, "cell 1 2");
//---- label28 ----
label28.setText("selected");
add(label28, "cell 2 1");
label28.setFont(label28.getFont().deriveFont(label28.getFont().getSize() - 2f));
add(label28, "cell 2 2");
//---- label24 ----
label24.setText("focused");
add(label24, "cell 3 1");
label24.setText("unsel.");
label24.setFont(label24.getFont().deriveFont(label24.getFont().getSize() - 2f));
add(label24, "cell 3 2");
//---- label29 ----
label29.setText("selected");
add(label29, "cell 4 1");
label29.setFont(label29.getFont().deriveFont(label29.getFont().getSize() - 2f));
add(label29, "cell 4 2");
//---- label17 ----
label17.setText("none");
add(label17, "cell 0 2");
add(label17, "cell 0 3");
//---- testStateCheckBox1 ----
testStateCheckBox1.setText("text");
add(testStateCheckBox1, "cell 1 2");
add(testStateCheckBox1, "cell 1 3");
//---- testStateCheckBox8 ----
testStateCheckBox8.setText("text");
testStateCheckBox8.setStateSelected(true);
add(testStateCheckBox8, "cell 2 2");
add(testStateCheckBox8, "cell 2 3");
//---- testStateCheckBox5 ----
testStateCheckBox5.setText("text");
testStateCheckBox5.setStateFocused(true);
add(testStateCheckBox5, "cell 3 2");
add(testStateCheckBox5, "cell 3 3");
//---- testStateCheckBox12 ----
testStateCheckBox12.setText("text");
testStateCheckBox12.setStateFocused(true);
testStateCheckBox12.setStateSelected(true);
add(testStateCheckBox12, "cell 4 2");
add(testStateCheckBox12, "cell 4 3");
//---- label18 ----
label18.setText("hover");
add(label18, "cell 0 3");
add(label18, "cell 0 4");
//---- testStateCheckBox2 ----
testStateCheckBox2.setText("text");
testStateCheckBox2.setStateHover(true);
add(testStateCheckBox2, "cell 1 3");
add(testStateCheckBox2, "cell 1 4");
//---- testStateCheckBox9 ----
testStateCheckBox9.setText("text");
testStateCheckBox9.setStateHover(true);
testStateCheckBox9.setStateSelected(true);
add(testStateCheckBox9, "cell 2 3");
add(testStateCheckBox9, "cell 2 4");
//---- testStateCheckBox6 ----
testStateCheckBox6.setText("text");
testStateCheckBox6.setStateFocused(true);
testStateCheckBox6.setStateHover(true);
add(testStateCheckBox6, "cell 3 3");
add(testStateCheckBox6, "cell 3 4");
//---- testStateCheckBox13 ----
testStateCheckBox13.setText("text");
testStateCheckBox13.setStateFocused(true);
testStateCheckBox13.setStateHover(true);
testStateCheckBox13.setStateSelected(true);
add(testStateCheckBox13, "cell 4 3");
add(testStateCheckBox13, "cell 4 4");
//---- label19 ----
label19.setText("pressed");
add(label19, "cell 0 4");
add(label19, "cell 0 5");
//---- testStateCheckBox3 ----
testStateCheckBox3.setText("text");
testStateCheckBox3.setStatePressed(true);
add(testStateCheckBox3, "cell 1 4");
add(testStateCheckBox3, "cell 1 5");
//---- testStateCheckBox10 ----
testStateCheckBox10.setText("text");
testStateCheckBox10.setStatePressed(true);
testStateCheckBox10.setStateSelected(true);
add(testStateCheckBox10, "cell 2 4");
add(testStateCheckBox10, "cell 2 5");
//---- testStateCheckBox7 ----
testStateCheckBox7.setText("text");
testStateCheckBox7.setStateFocused(true);
testStateCheckBox7.setStatePressed(true);
add(testStateCheckBox7, "cell 3 4");
add(testStateCheckBox7, "cell 3 5");
//---- testStateCheckBox14 ----
testStateCheckBox14.setText("text");
testStateCheckBox14.setStateFocused(true);
testStateCheckBox14.setStatePressed(true);
testStateCheckBox14.setStateSelected(true);
add(testStateCheckBox14, "cell 4 4");
add(testStateCheckBox14, "cell 4 5");
//---- label20 ----
label20.setText("disabled");
add(label20, "cell 0 5");
add(label20, "cell 0 6");
//---- testStateCheckBox4 ----
testStateCheckBox4.setText("text");
testStateCheckBox4.setEnabled(false);
add(testStateCheckBox4, "cell 1 5");
add(testStateCheckBox4, "cell 1 6");
//---- testStateCheckBox11 ----
testStateCheckBox11.setText("text");
testStateCheckBox11.setEnabled(false);
testStateCheckBox11.setStateSelected(true);
add(testStateCheckBox11, "cell 2 5");
add(testStateCheckBox11, "cell 2 6");
//---- label21 ----
label21.setText("try me");
add(label21, "cell 0 6");
add(label21, "cell 0 7");
//---- checkBox1 ----
checkBox1.setText("text");
add(checkBox1, "cell 1 6");
add(checkBox1, "cell 1 7");
//---- checkBox2 ----
checkBox2.setText("text");
checkBox2.setSelected(true);
add(checkBox2, "cell 2 6");
add(checkBox2, "cell 2 7");
//---- label27 ----
label27.setText("JRadioButton");
label27.setFont(label27.getFont().deriveFont(label27.getFont().getSize() + 4f));
add(label27, "cell 0 7 3 1");
add(label27, "cell 0 8 3 1");
//---- label3 ----
label3.setText("unfocused");
add(label3, "cell 1 9 2 1,alignx center,growx 0");
//---- label4 ----
label4.setText("focused");
add(label4, "cell 3 9 2 1,alignx center,growx 0");
//---- label25 ----
label25.setText("unsel.");
add(label25, "cell 1 8");
label25.setFont(label25.getFont().deriveFont(label25.getFont().getSize() - 2f));
add(label25, "cell 1 10");
//---- label30 ----
label30.setText("selected");
add(label30, "cell 2 8");
label30.setFont(label30.getFont().deriveFont(label30.getFont().getSize() - 2f));
add(label30, "cell 2 10");
//---- label26 ----
label26.setText("focused");
add(label26, "cell 3 8");
label26.setText("unsel.");
label26.setFont(label26.getFont().deriveFont(label26.getFont().getSize() - 2f));
add(label26, "cell 3 10");
//---- label31 ----
label31.setText("selected");
add(label31, "cell 4 8");
label31.setFont(label31.getFont().deriveFont(label31.getFont().getSize() - 2f));
add(label31, "cell 4 10");
//---- label36 ----
label36.setText("none");
add(label36, "cell 0 9");
add(label36, "cell 0 11");
//---- testStateRadioButton1 ----
testStateRadioButton1.setText("text");
add(testStateRadioButton1, "cell 1 9");
add(testStateRadioButton1, "cell 1 11");
//---- testStateRadioButton8 ----
testStateRadioButton8.setText("text");
testStateRadioButton8.setStateSelected(true);
add(testStateRadioButton8, "cell 2 9");
add(testStateRadioButton8, "cell 2 11");
//---- testStateRadioButton5 ----
testStateRadioButton5.setText("text");
testStateRadioButton5.setStateFocused(true);
add(testStateRadioButton5, "cell 3 9");
add(testStateRadioButton5, "cell 3 11");
//---- testStateRadioButton9 ----
testStateRadioButton9.setText("text");
testStateRadioButton9.setStateFocused(true);
testStateRadioButton9.setStateSelected(true);
add(testStateRadioButton9, "cell 4 9");
add(testStateRadioButton9, "cell 4 11");
//---- label35 ----
label35.setText("hover");
add(label35, "cell 0 10");
add(label35, "cell 0 12");
//---- testStateRadioButton2 ----
testStateRadioButton2.setText("text");
testStateRadioButton2.setStateHover(true);
add(testStateRadioButton2, "cell 1 10");
add(testStateRadioButton2, "cell 1 12");
//---- testStateRadioButton10 ----
testStateRadioButton10.setText("text");
testStateRadioButton10.setStateHover(true);
testStateRadioButton10.setStateSelected(true);
add(testStateRadioButton10, "cell 2 10");
add(testStateRadioButton10, "cell 2 12");
//---- testStateRadioButton6 ----
testStateRadioButton6.setText("text");
testStateRadioButton6.setStateFocused(true);
testStateRadioButton6.setStateHover(true);
add(testStateRadioButton6, "cell 3 10");
add(testStateRadioButton6, "cell 3 12");
//---- testStateRadioButton11 ----
testStateRadioButton11.setText("text");
testStateRadioButton11.setStateFocused(true);
testStateRadioButton11.setStateHover(true);
testStateRadioButton11.setStateSelected(true);
add(testStateRadioButton11, "cell 4 10");
add(testStateRadioButton11, "cell 4 12");
//---- label34 ----
label34.setText("pressed");
add(label34, "cell 0 11");
add(label34, "cell 0 13");
//---- testStateRadioButton3 ----
testStateRadioButton3.setText("text");
testStateRadioButton3.setStatePressed(true);
add(testStateRadioButton3, "cell 1 11");
add(testStateRadioButton3, "cell 1 13");
//---- testStateRadioButton12 ----
testStateRadioButton12.setText("text");
testStateRadioButton12.setStatePressed(true);
testStateRadioButton12.setStateSelected(true);
add(testStateRadioButton12, "cell 2 11");
add(testStateRadioButton12, "cell 2 13");
//---- testStateRadioButton7 ----
testStateRadioButton7.setText("text");
testStateRadioButton7.setStateFocused(true);
testStateRadioButton7.setStatePressed(true);
add(testStateRadioButton7, "cell 3 11");
add(testStateRadioButton7, "cell 3 13");
//---- testStateRadioButton13 ----
testStateRadioButton13.setText("text");
testStateRadioButton13.setStateFocused(true);
testStateRadioButton13.setStatePressed(true);
testStateRadioButton13.setStateSelected(true);
add(testStateRadioButton13, "cell 4 11");
add(testStateRadioButton13, "cell 4 13");
//---- label33 ----
label33.setText("disabled");
add(label33, "cell 0 12");
add(label33, "cell 0 14");
//---- testStateRadioButton4 ----
testStateRadioButton4.setText("text");
testStateRadioButton4.setEnabled(false);
add(testStateRadioButton4, "cell 1 12");
add(testStateRadioButton4, "cell 1 14");
//---- testStateRadioButton14 ----
testStateRadioButton14.setText("text");
testStateRadioButton14.setEnabled(false);
testStateRadioButton14.setStateSelected(true);
add(testStateRadioButton14, "cell 2 12");
add(testStateRadioButton14, "cell 2 14");
//---- label32 ----
label32.setText("try me");
add(label32, "cell 0 13");
add(label32, "cell 0 15");
//---- radioButton1 ----
radioButton1.setText("text");
add(radioButton1, "cell 1 13");
add(radioButton1, "cell 1 15");
//---- radioButton2 ----
radioButton2.setText("text");
radioButton2.setSelected(true);
add(radioButton2, "cell 2 13");
add(radioButton2, "cell 2 15");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JLabel label22;
private JLabel label23;
private JLabel label28;
private JLabel label24;
private JLabel label29;
private JLabel label17;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox1;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox8;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox5;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox12;
private JLabel label18;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox2;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox9;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox6;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox13;
private JLabel label19;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox3;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox10;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox7;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox14;
private JLabel label20;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox4;
private FlatThemePreviewSwitches.TestStateCheckBox testStateCheckBox11;
private JLabel label21;
private JCheckBox checkBox1;
private JCheckBox checkBox2;
private JLabel label27;
private JLabel label25;
private JLabel label30;
private JLabel label26;
private JLabel label31;
private JLabel label36;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton1;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton8;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton5;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton9;
private JLabel label35;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton2;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton10;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton6;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton11;
private JLabel label34;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton3;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton12;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton7;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton13;
private JLabel label33;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton4;
private FlatThemePreviewSwitches.TestStateRadioButton testStateRadioButton14;
private JLabel label32;
private JRadioButton radioButton1;
private JRadioButton radioButton2;
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class TestStateCheckBox --------------------------------------------

View File

@@ -3,10 +3,13 @@ JFDML JFormDesigner: "7.0.4.0.360" Java: "16" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
auxiliary() {
"JavaCodeGenerator.defaultVariableLocal": true
}
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog,hidemode 3"
"$columnConstraints": "[fill][fill][fill]para[fill][fill]para"
"$rowConstraints": "[][][][][][]unrel[]para[][][][][][]unrel[]"
"$rowConstraints": "[][]0[][][][][]unrel[]para[][]0[][][][][]unrel[]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
@@ -16,55 +19,71 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0 3 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1"
"text": "unfocused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label2"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label23"
"text": "unsel."
"font": &SwingDerivedFont1 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
"value": "cell 1 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label28"
"text": "selected"
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
"value": "cell 2 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label24"
"text": "focused"
"text": "unsel."
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
"value": "cell 3 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label29"
"text": "selected"
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
"value": "cell 4 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label17"
"text": "none"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
"value": "cell 0 3"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2"
"value": "cell 1 3"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox8"
"text": "text"
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 2"
"value": "cell 2 3"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox5"
"text": "text"
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 2"
"value": "cell 3 3"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox12"
@@ -72,20 +91,20 @@ new FormModel {
"stateFocused": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 2"
"value": "cell 4 3"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label18"
"text": "hover"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
"value": "cell 0 4"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox2"
"text": "text"
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3"
"value": "cell 1 4"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox9"
@@ -93,7 +112,7 @@ new FormModel {
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 3"
"value": "cell 2 4"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox6"
@@ -101,7 +120,7 @@ new FormModel {
"stateFocused": true
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 3"
"value": "cell 3 4"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox13"
@@ -110,20 +129,20 @@ new FormModel {
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 3"
"value": "cell 4 4"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label19"
"text": "pressed"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 4"
"value": "cell 0 5"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox3"
"text": "text"
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
"value": "cell 1 5"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox10"
@@ -131,7 +150,7 @@ new FormModel {
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 4"
"value": "cell 2 5"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox7"
@@ -139,7 +158,7 @@ new FormModel {
"stateFocused": true
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 4"
"value": "cell 3 5"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox14"
@@ -148,20 +167,20 @@ new FormModel {
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 4"
"value": "cell 4 5"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label20"
"text": "disabled"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 5"
"value": "cell 0 6"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox4"
"text": "text"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 5"
"value": "cell 1 6"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateCheckBox" ) {
name: "testStateCheckBox11"
@@ -169,83 +188,99 @@ new FormModel {
"enabled": false
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 5"
"value": "cell 2 6"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label21"
"text": "try me"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 6"
"value": "cell 0 7"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "checkBox1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 6"
"value": "cell 1 7"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "checkBox2"
"text": "text"
"selected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 6"
"value": "cell 2 7"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label27"
"text": "JRadioButton"
"font": #SwingDerivedFont0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7 3 1"
"value": "cell 0 8 3 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3"
"text": "unfocused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 9 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 9 2 1,alignx center,growx 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label25"
"text": "unsel."
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 8"
"value": "cell 1 10"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label30"
"text": "selected"
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 8"
"value": "cell 2 10"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label26"
"text": "focused"
"text": "unsel."
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 8"
"value": "cell 3 10"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label31"
"text": "selected"
"font": #SwingDerivedFont1
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 8"
"value": "cell 4 10"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label36"
"text": "none"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 9"
"value": "cell 0 11"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 9"
"value": "cell 1 11"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton8"
"text": "text"
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 9"
"value": "cell 2 11"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton5"
"text": "text"
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 9"
"value": "cell 3 11"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton9"
@@ -253,20 +288,20 @@ new FormModel {
"stateFocused": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 9"
"value": "cell 4 11"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label35"
"text": "hover"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 10"
"value": "cell 0 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton2"
"text": "text"
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 10"
"value": "cell 1 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton10"
@@ -274,7 +309,7 @@ new FormModel {
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 10"
"value": "cell 2 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton6"
@@ -282,7 +317,7 @@ new FormModel {
"stateFocused": true
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 10"
"value": "cell 3 12"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton11"
@@ -291,20 +326,20 @@ new FormModel {
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 10"
"value": "cell 4 12"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label34"
"text": "pressed"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 11"
"value": "cell 0 13"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton3"
"text": "text"
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 11"
"value": "cell 1 13"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton12"
@@ -312,7 +347,7 @@ new FormModel {
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 11"
"value": "cell 2 13"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton7"
@@ -320,7 +355,7 @@ new FormModel {
"stateFocused": true
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 11"
"value": "cell 3 13"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton13"
@@ -329,20 +364,20 @@ new FormModel {
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 11"
"value": "cell 4 13"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label33"
"text": "disabled"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 12"
"value": "cell 0 14"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton4"
"text": "text"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 12"
"value": "cell 1 14"
} )
add( new FormComponent( "com.formdev.flatlaf.themeeditor.FlatThemePreviewSwitches$TestStateRadioButton" ) {
name: "testStateRadioButton14"
@@ -350,26 +385,26 @@ new FormModel {
"enabled": false
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 12"
"value": "cell 2 14"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label32"
"text": "try me"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 13"
"value": "cell 0 15"
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "radioButton1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 13"
"value": "cell 1 15"
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "radioButton2"
"text": "text"
"selected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 13"
"value": "cell 2 15"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )