From 9b3a22c4ca380f4c028cd470814d6b2a5b6d50f1 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Thu, 21 Jan 2021 23:58:22 +0100 Subject: [PATCH] FlatComponents2Test: simplified layout and reduced frame size --- .../flatlaf/testing/FlatComponents2Test.java | 542 ++++++++-------- .../flatlaf/testing/FlatComponents2Test.jfd | 606 +++++++++--------- 2 files changed, 567 insertions(+), 581 deletions(-) diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java index 7ab84473..af2d3def 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java @@ -393,12 +393,9 @@ public class FlatComponents2Test private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents - JLabel textFieldLabel = new JLabel(); JTextField textField1 = new JTextField(); JTextField textField2 = new JTextField(); JTextField textField3 = new JTextField(); - JTextField textField4 = new JTextField(); - JLabel label3 = new JLabel(); JPanel panel1 = new JPanel(); JLabel listLabel = new JLabel(); JLabel listRowCountLabel = new JLabel(); @@ -407,6 +404,12 @@ public class FlatComponents2Test list1 = new JList<>(); JScrollPane scrollPane2 = new JScrollPane(); list2 = new JList<>(); + JPanel panel3 = new JPanel(); + JLabel tableLabel = new JLabel(); + JLabel tableRowCountLabel = new JLabel(); + tableRowCountSpinner = new JSpinner(); + table1ScrollPane = new JScrollPane(); + table1 = new JTable(); JPanel panel2 = new JPanel(); JLabel treeLabel = new JLabel(); JLabel treeRowCountLabel = new JLabel(); @@ -415,42 +418,38 @@ public class FlatComponents2Test tree1 = new JTree(); JScrollPane scrollPane4 = new JScrollPane(); tree2 = new JTree(); + JLabel label1 = new JLabel(); + xTable1ScrollPane = new JScrollPane(); + xTable1 = new JXTable(); + JPanel panel4 = new JPanel(); + JLabel label3 = new JLabel(); + JLabel label4 = new JLabel(); + JLabel label5 = new JLabel(); JScrollPane scrollPane5 = new JScrollPane(); xTree1 = new JXTree(); - JPanel panel3 = new JPanel(); - JLabel tableLabel = new JLabel(); - JLabel tableRowCountLabel = new JLabel(); - tableRowCountSpinner = new JSpinner(); - table1ScrollPane = new JScrollPane(); - table1 = new JTable(); - JPanel optionsPanel = new JPanel(); + JScrollPane scrollPane6 = new JScrollPane(); + checkBoxTree1 = new CheckBoxTree(); + JLabel label2 = new JLabel(); + xTreeTable1ScrollPane = new JScrollPane(); + xTreeTable1 = new JXTreeTable(); + JPanel panel5 = new JPanel(); dndCheckBox = new JCheckBox(); - JPanel tableOptionsPanel = new JPanel(); - JLabel autoResizeModeLabel = new JLabel(); - autoResizeModeField = new JComboBox<>(); - showHorizontalLinesCheckBox = new JCheckBox(); - rowHeaderCheckBox = new JCheckBox(); - showVerticalLinesCheckBox = new JCheckBox(); - intercellSpacingCheckBox = new JCheckBox(); - redGridColorCheckBox = new JCheckBox(); - rowSelectionCheckBox = new JCheckBox(); - columnSelectionCheckBox = new JCheckBox(); - tableHeaderButtonCheckBox = new JCheckBox(); JPanel treeOptionsPanel = new JPanel(); JLabel treeRendererLabel = new JLabel(); treeRendererComboBox = new JComboBox<>(); treeWideSelectionCheckBox = new JCheckBox(); treePaintSelectionCheckBox = new JCheckBox(); - JPanel panel4 = new JPanel(); - JLabel label4 = new JLabel(); - JScrollPane scrollPane6 = new JScrollPane(); - checkBoxTree1 = new CheckBoxTree(); - JLabel label1 = new JLabel(); - xTable1ScrollPane = new JScrollPane(); - xTable1 = new JXTable(); - JLabel label2 = new JLabel(); - xTreeTable1ScrollPane = new JScrollPane(); - xTreeTable1 = new JXTreeTable(); + JPanel tableOptionsPanel = new JPanel(); + JLabel autoResizeModeLabel = new JLabel(); + autoResizeModeField = new JComboBox<>(); + showHorizontalLinesCheckBox = new JCheckBox(); + rowSelectionCheckBox = new JCheckBox(); + showVerticalLinesCheckBox = new JCheckBox(); + columnSelectionCheckBox = new JCheckBox(); + intercellSpacingCheckBox = new JCheckBox(); + rowHeaderCheckBox = new JCheckBox(); + redGridColorCheckBox = new JCheckBox(); + tableHeaderButtonCheckBox = new JCheckBox(); //======== this ======== setLayout(new MigLayout( @@ -461,39 +460,26 @@ public class FlatComponents2Test "[200,grow,sizegroup 1,fill]" + "[fill]" + "[200,grow,sizegroup 1,fill]" + - "[200,grow,sizegroup 1,fill]" + - "[grow,sizegroup 1,fill]", + "[200,grow,sizegroup 1,fill]", // rows "[]" + "[150,grow,sizegroup 1,fill]" + "[150,grow,sizegroup 1,fill]" + - "[150,grow,sizegroup 1,fill]")); - - //---- textFieldLabel ---- - textFieldLabel.setText("JTextField:"); - add(textFieldLabel, "cell 0 0"); + "[150,grow,sizegroup 1,fill]" + + "[fill]")); //---- textField1 ---- - textField1.setText("editable"); + textField1.setText("item"); add(textField1, "cell 1 0,growx"); //---- textField2 ---- - textField2.setText("disabled"); + textField2.setText("item (check vertical text alignment)"); textField2.setEnabled(false); add(textField2, "cell 2 0,growx"); //---- textField3 ---- - textField3.setText("editable"); - add(textField3, "cell 4 0,growx"); - - //---- textField4 ---- - textField4.setText("disabled"); - textField4.setEnabled(false); - add(textField4, "cell 5 0,growx"); - - //---- label3 ---- - label3.setText("JXTree:"); - add(label3, "cell 6 0"); + textField3.setText("item"); + add(textField3, "cell 4 0 2 1,growx"); //======== panel1 ======== { @@ -537,58 +523,6 @@ public class FlatComponents2Test } add(scrollPane2, "cell 2 1"); - //======== panel2 ======== - { - panel2.setLayout(new MigLayout( - "insets 0,hidemode 3", - // columns - "[fill]", - // rows - "[]" + - "[grow]" + - "[]" + - "[]")); - - //---- treeLabel ---- - treeLabel.setText("JTree:"); - panel2.add(treeLabel, "cell 0 0,aligny top,growy 0"); - - //---- treeRowCountLabel ---- - treeRowCountLabel.setText("Row count:"); - panel2.add(treeRowCountLabel, "cell 0 2"); - - //---- treeRowCountSpinner ---- - treeRowCountSpinner.setModel(new SpinnerNumberModel(20, 20, null, 20)); - treeRowCountSpinner.addChangeListener(e -> treeRowCountChanged()); - panel2.add(treeRowCountSpinner, "cell 0 3"); - } - add(panel2, "cell 3 1"); - - //======== scrollPane3 ======== - { - - //---- tree1 ---- - tree1.setShowsRootHandles(true); - tree1.setEditable(true); - scrollPane3.setViewportView(tree1); - } - add(scrollPane3, "cell 4 1"); - - //======== scrollPane4 ======== - { - - //---- tree2 ---- - tree2.setEnabled(false); - scrollPane4.setViewportView(tree2); - } - add(scrollPane4, "cell 5 1"); - - //======== scrollPane5 ======== - { - scrollPane5.setViewportView(xTree1); - } - add(scrollPane5, "cell 6 1"); - //======== panel3 ======== { panel3.setLayout(new MigLayout( @@ -614,7 +548,7 @@ public class FlatComponents2Test tableRowCountSpinner.addChangeListener(e -> tableRowCountChanged()); panel3.add(tableRowCountSpinner, "cell 0 3"); } - add(panel3, "cell 0 2"); + add(panel3, "cell 3 1"); //======== table1ScrollPane ======== { @@ -623,176 +557,100 @@ public class FlatComponents2Test table1.setAutoCreateRowSorter(true); table1ScrollPane.setViewportView(table1); } - add(table1ScrollPane, "cell 1 2 2 1,width 300"); + add(table1ScrollPane, "cell 4 1 2 1,width 300"); - //======== optionsPanel ======== + //======== panel2 ======== { - optionsPanel.setLayout(new MigLayout( - "ltr,insets 0,hidemode 3", + panel2.setLayout(new MigLayout( + "insets 0,hidemode 3", // columns - "[200]" + - "[200]", + "[fill]", // rows "[]" + - "[150,grow,sizegroup 1,fill]")); - - //---- dndCheckBox ---- - dndCheckBox.setText("enable drag and drop (for lists, trees and tables)"); - dndCheckBox.setMnemonic('D'); - dndCheckBox.addActionListener(e -> dndChanged()); - optionsPanel.add(dndCheckBox, "cell 0 0 2 1"); - - //======== tableOptionsPanel ======== - { - tableOptionsPanel.setBorder(new TitledBorder("JTable Control")); - tableOptionsPanel.setLayout(new MigLayout( - "hidemode 3", - // columns - "[]", - // rows - "[]" + - "[]0" + - "[]0" + - "[]0" + - "[]0" + - "[]0" + - "[]0" + - "[]0" + - "[]")); - - //---- autoResizeModeLabel ---- - autoResizeModeLabel.setText("Auto resize mode:"); - tableOptionsPanel.add(autoResizeModeLabel, "cell 0 0"); - - //---- autoResizeModeField ---- - autoResizeModeField.setModel(new DefaultComboBoxModel<>(new String[] { - "off", - "nextColumn", - "subsequentColumns", - "lastColumn", - "allColumns" - })); - autoResizeModeField.setSelectedIndex(2); - autoResizeModeField.addActionListener(e -> autoResizeModeChanged()); - tableOptionsPanel.add(autoResizeModeField, "cell 0 0"); - - //---- showHorizontalLinesCheckBox ---- - showHorizontalLinesCheckBox.setText("show horizontal lines"); - showHorizontalLinesCheckBox.addActionListener(e -> showHorizontalLinesChanged()); - tableOptionsPanel.add(showHorizontalLinesCheckBox, "cell 0 1"); - - //---- rowHeaderCheckBox ---- - rowHeaderCheckBox.setText("row header"); - rowHeaderCheckBox.addActionListener(e -> rowHeaderChanged()); - tableOptionsPanel.add(rowHeaderCheckBox, "cell 0 1"); - - //---- showVerticalLinesCheckBox ---- - showVerticalLinesCheckBox.setText("show vertical lines"); - showVerticalLinesCheckBox.addActionListener(e -> showVerticalLinesChanged()); - tableOptionsPanel.add(showVerticalLinesCheckBox, "cell 0 2"); - - //---- intercellSpacingCheckBox ---- - intercellSpacingCheckBox.setText("intercell spacing"); - intercellSpacingCheckBox.addActionListener(e -> intercellSpacingChanged()); - tableOptionsPanel.add(intercellSpacingCheckBox, "cell 0 3"); - - //---- redGridColorCheckBox ---- - redGridColorCheckBox.setText("red grid color"); - redGridColorCheckBox.addActionListener(e -> redGridColorChanged()); - tableOptionsPanel.add(redGridColorCheckBox, "cell 0 4"); - - //---- rowSelectionCheckBox ---- - rowSelectionCheckBox.setText("row selection"); - rowSelectionCheckBox.setSelected(true); - rowSelectionCheckBox.addActionListener(e -> rowSelectionChanged()); - tableOptionsPanel.add(rowSelectionCheckBox, "cell 0 5"); - - //---- columnSelectionCheckBox ---- - columnSelectionCheckBox.setText("column selection"); - columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged()); - tableOptionsPanel.add(columnSelectionCheckBox, "cell 0 6"); - - //---- tableHeaderButtonCheckBox ---- - tableHeaderButtonCheckBox.setText("show button in table header"); - tableHeaderButtonCheckBox.addActionListener(e -> tableHeaderButtonChanged()); - tableOptionsPanel.add(tableHeaderButtonCheckBox, "cell 0 8"); - } - optionsPanel.add(tableOptionsPanel, "cell 0 1"); - - //======== treeOptionsPanel ======== - { - treeOptionsPanel.setBorder(new TitledBorder("JTree Control")); - treeOptionsPanel.setLayout(new MigLayout( - "hidemode 3", - // columns - "[fill]", - // rows - "[]" + - "[]0" + - "[]")); - - //---- treeRendererLabel ---- - treeRendererLabel.setText("Renderer:"); - treeOptionsPanel.add(treeRendererLabel, "cell 0 0"); - - //---- treeRendererComboBox ---- - treeRendererComboBox.setModel(new DefaultComboBoxModel<>(new String[] { - "default", - "defaultSubclass", - "label", - "swingxDefault", - "jideCheckBox", - "jideStyled" - })); - treeRendererComboBox.addActionListener(e -> treeRendererChanged()); - treeOptionsPanel.add(treeRendererComboBox, "cell 0 0"); - - //---- treeWideSelectionCheckBox ---- - treeWideSelectionCheckBox.setText("wide selection"); - treeWideSelectionCheckBox.addActionListener(e -> treeWideSelectionChanged()); - treeOptionsPanel.add(treeWideSelectionCheckBox, "cell 0 1"); - - //---- treePaintSelectionCheckBox ---- - treePaintSelectionCheckBox.setText("paint selection"); - treePaintSelectionCheckBox.setSelected(true); - treePaintSelectionCheckBox.addActionListener(e -> treePaintSelectionChanged()); - treeOptionsPanel.add(treePaintSelectionCheckBox, "cell 0 2"); - } - optionsPanel.add(treeOptionsPanel, "cell 1 1"); - } - add(optionsPanel, "cell 3 2 3 1"); - - //======== panel4 ======== - { - panel4.setLayout(new MigLayout( - "ltr,insets 0,hidemode 3", - // columns - "[grow,sizegroup 1,fill]", - // rows + "[grow]" + "[]" + - "[150,grow,sizegroup 1,fill]")); + "[]")); - //---- label4 ---- - label4.setText("JIDE CheckBoxTree:"); - panel4.add(label4, "cell 0 0"); + //---- treeLabel ---- + treeLabel.setText("JTree:"); + panel2.add(treeLabel, "cell 0 0,aligny top,growy 0"); - //======== scrollPane6 ======== - { - scrollPane6.setViewportView(checkBoxTree1); - } - panel4.add(scrollPane6, "cell 0 1"); + //---- treeRowCountLabel ---- + treeRowCountLabel.setText("Row count:"); + panel2.add(treeRowCountLabel, "cell 0 2"); + + //---- treeRowCountSpinner ---- + treeRowCountSpinner.setModel(new SpinnerNumberModel(20, 20, null, 20)); + treeRowCountSpinner.addChangeListener(e -> treeRowCountChanged()); + panel2.add(treeRowCountSpinner, "cell 0 3"); } - add(panel4, "cell 6 2"); + add(panel2, "cell 0 2"); + + //======== scrollPane3 ======== + { + + //---- tree1 ---- + tree1.setShowsRootHandles(true); + tree1.setEditable(true); + scrollPane3.setViewportView(tree1); + } + add(scrollPane3, "cell 1 2"); + + //======== scrollPane4 ======== + { + + //---- tree2 ---- + tree2.setEnabled(false); + scrollPane4.setViewportView(tree2); + } + add(scrollPane4, "cell 2 2"); //---- label1 ---- label1.setText("JXTable:"); - add(label1, "cell 0 3,aligny top,growy 0"); + add(label1, "cell 3 2,aligny top,growy 0"); //======== xTable1ScrollPane ======== { xTable1ScrollPane.setViewportView(xTable1); } - add(xTable1ScrollPane, "cell 1 3 2 1"); + add(xTable1ScrollPane, "cell 4 2 2 1"); + + //======== panel4 ======== + { + panel4.setLayout(new MigLayout( + "insets 0,hidemode 3", + // columns + "[fill]", + // rows + "[]" + + "[]0" + + "[]")); + + //---- label3 ---- + label3.setText("JXTree:"); + panel4.add(label3, "cell 0 0"); + + //---- label4 ---- + label4.setText("CheckBoxTree:"); + panel4.add(label4, "cell 0 1"); + + //---- label5 ---- + label5.setText("(JIDE)"); + panel4.add(label5, "cell 0 2"); + } + add(panel4, "cell 0 3"); + + //======== scrollPane5 ======== + { + scrollPane5.setViewportView(xTree1); + } + add(scrollPane5, "cell 1 3"); + + //======== scrollPane6 ======== + { + scrollPane6.setViewportView(checkBoxTree1); + } + add(scrollPane6, "cell 2 3"); //---- label2 ---- label2.setText("JXTreeTable:"); @@ -803,6 +661,140 @@ public class FlatComponents2Test xTreeTable1ScrollPane.setViewportView(xTreeTable1); } add(xTreeTable1ScrollPane, "cell 4 3 2 1"); + + //======== panel5 ======== + { + panel5.setBorder(new TitledBorder("General Control")); + panel5.setLayout(new MigLayout( + "hidemode 3", + // columns + "[fill]" + + "[fill]", + // rows + "[]")); + + //---- dndCheckBox ---- + dndCheckBox.setText("enable drag and drop"); + dndCheckBox.setMnemonic('D'); + dndCheckBox.addActionListener(e -> dndChanged()); + panel5.add(dndCheckBox, "cell 0 0"); + } + add(panel5, "cell 1 4"); + + //======== treeOptionsPanel ======== + { + treeOptionsPanel.setBorder(new TitledBorder("JTree Control")); + treeOptionsPanel.setLayout(new MigLayout( + "hidemode 3", + // columns + "[fill]", + // rows + "[]" + + "[]0" + + "[]")); + + //---- treeRendererLabel ---- + treeRendererLabel.setText("Renderer:"); + treeOptionsPanel.add(treeRendererLabel, "cell 0 0"); + + //---- treeRendererComboBox ---- + treeRendererComboBox.setModel(new DefaultComboBoxModel<>(new String[] { + "default", + "defaultSubclass", + "label", + "swingxDefault", + "jideCheckBox", + "jideStyled" + })); + treeRendererComboBox.addActionListener(e -> treeRendererChanged()); + treeOptionsPanel.add(treeRendererComboBox, "cell 0 0"); + + //---- treeWideSelectionCheckBox ---- + treeWideSelectionCheckBox.setText("wide selection"); + treeWideSelectionCheckBox.addActionListener(e -> treeWideSelectionChanged()); + treeOptionsPanel.add(treeWideSelectionCheckBox, "cell 0 1"); + + //---- treePaintSelectionCheckBox ---- + treePaintSelectionCheckBox.setText("paint selection"); + treePaintSelectionCheckBox.setSelected(true); + treePaintSelectionCheckBox.addActionListener(e -> treePaintSelectionChanged()); + treeOptionsPanel.add(treePaintSelectionCheckBox, "cell 0 2"); + } + add(treeOptionsPanel, "cell 2 4"); + + //======== tableOptionsPanel ======== + { + tableOptionsPanel.setBorder(new TitledBorder("JTable Control")); + tableOptionsPanel.setLayout(new MigLayout( + "hidemode 3", + // columns + "[]" + + "[fill]", + // rows + "[]" + + "[]0" + + "[]0" + + "[]0" + + "[]0")); + + //---- autoResizeModeLabel ---- + autoResizeModeLabel.setText("Auto resize mode:"); + tableOptionsPanel.add(autoResizeModeLabel, "cell 0 0 2 1"); + + //---- autoResizeModeField ---- + autoResizeModeField.setModel(new DefaultComboBoxModel<>(new String[] { + "off", + "nextColumn", + "subsequentColumns", + "lastColumn", + "allColumns" + })); + autoResizeModeField.setSelectedIndex(2); + autoResizeModeField.addActionListener(e -> autoResizeModeChanged()); + tableOptionsPanel.add(autoResizeModeField, "cell 0 0 2 1"); + + //---- showHorizontalLinesCheckBox ---- + showHorizontalLinesCheckBox.setText("show horizontal lines"); + showHorizontalLinesCheckBox.addActionListener(e -> showHorizontalLinesChanged()); + tableOptionsPanel.add(showHorizontalLinesCheckBox, "cell 0 1"); + + //---- rowSelectionCheckBox ---- + rowSelectionCheckBox.setText("row selection"); + rowSelectionCheckBox.setSelected(true); + rowSelectionCheckBox.addActionListener(e -> rowSelectionChanged()); + tableOptionsPanel.add(rowSelectionCheckBox, "cell 1 1"); + + //---- showVerticalLinesCheckBox ---- + showVerticalLinesCheckBox.setText("show vertical lines"); + showVerticalLinesCheckBox.addActionListener(e -> showVerticalLinesChanged()); + tableOptionsPanel.add(showVerticalLinesCheckBox, "cell 0 2"); + + //---- columnSelectionCheckBox ---- + columnSelectionCheckBox.setText("column selection"); + columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged()); + tableOptionsPanel.add(columnSelectionCheckBox, "cell 1 2"); + + //---- intercellSpacingCheckBox ---- + intercellSpacingCheckBox.setText("intercell spacing"); + intercellSpacingCheckBox.addActionListener(e -> intercellSpacingChanged()); + tableOptionsPanel.add(intercellSpacingCheckBox, "cell 0 3"); + + //---- rowHeaderCheckBox ---- + rowHeaderCheckBox.setText("row header"); + rowHeaderCheckBox.addActionListener(e -> rowHeaderChanged()); + tableOptionsPanel.add(rowHeaderCheckBox, "cell 1 3"); + + //---- redGridColorCheckBox ---- + redGridColorCheckBox.setText("red grid color"); + redGridColorCheckBox.addActionListener(e -> redGridColorChanged()); + tableOptionsPanel.add(redGridColorCheckBox, "cell 0 4"); + + //---- tableHeaderButtonCheckBox ---- + tableHeaderButtonCheckBox.setText("show button in table header"); + tableHeaderButtonCheckBox.addActionListener(e -> tableHeaderButtonChanged()); + tableOptionsPanel.add(tableHeaderButtonCheckBox, "cell 1 4"); + } + add(tableOptionsPanel, "cell 4 4 2 1"); // JFormDesigner - End of component initialization //GEN-END:initComponents } @@ -810,31 +802,31 @@ public class FlatComponents2Test private JSpinner listRowCountSpinner; private JList list1; private JList list2; - private JSpinner treeRowCountSpinner; - private JTree tree1; - private JTree tree2; - private JXTree xTree1; private JSpinner tableRowCountSpinner; private JScrollPane table1ScrollPane; private JTable table1; + private JSpinner treeRowCountSpinner; + private JTree tree1; + private JTree tree2; + private JScrollPane xTable1ScrollPane; + private JXTable xTable1; + private JXTree xTree1; + private CheckBoxTree checkBoxTree1; + private JScrollPane xTreeTable1ScrollPane; + private JXTreeTable xTreeTable1; private JCheckBox dndCheckBox; - private JComboBox autoResizeModeField; - private JCheckBox showHorizontalLinesCheckBox; - private JCheckBox rowHeaderCheckBox; - private JCheckBox showVerticalLinesCheckBox; - private JCheckBox intercellSpacingCheckBox; - private JCheckBox redGridColorCheckBox; - private JCheckBox rowSelectionCheckBox; - private JCheckBox columnSelectionCheckBox; - private JCheckBox tableHeaderButtonCheckBox; private JComboBox treeRendererComboBox; private JCheckBox treeWideSelectionCheckBox; private JCheckBox treePaintSelectionCheckBox; - private CheckBoxTree checkBoxTree1; - private JScrollPane xTable1ScrollPane; - private JXTable xTable1; - private JScrollPane xTreeTable1ScrollPane; - private JXTreeTable xTreeTable1; + private JComboBox autoResizeModeField; + private JCheckBox showHorizontalLinesCheckBox; + private JCheckBox rowSelectionCheckBox; + private JCheckBox showVerticalLinesCheckBox; + private JCheckBox columnSelectionCheckBox; + private JCheckBox intercellSpacingCheckBox; + private JCheckBox rowHeaderCheckBox; + private JCheckBox redGridColorCheckBox; + private JCheckBox tableHeaderButtonCheckBox; // JFormDesigner - End of variables declaration //GEN-END:variables private final String[] randomRowStrings = new String[1000]; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd index e5935f29..bb5d3db7 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.jfd @@ -8,47 +8,28 @@ new FormModel { } add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "ltr,insets dialog,hidemode 3" - "$columnConstraints": "[][200,grow,sizegroup 1,fill][200,grow,sizegroup 1,fill][fill][200,grow,sizegroup 1,fill][200,grow,sizegroup 1,fill][grow,sizegroup 1,fill]" - "$rowConstraints": "[][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill]" + "$columnConstraints": "[][200,grow,sizegroup 1,fill][200,grow,sizegroup 1,fill][fill][200,grow,sizegroup 1,fill][200,grow,sizegroup 1,fill]" + "$rowConstraints": "[][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][fill]" } ) { name: "this" - add( new FormComponent( "javax.swing.JLabel" ) { - name: "textFieldLabel" - "text": "JTextField:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "textField1" - "text": "editable" + "text": "item" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 0,growx" } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "textField2" - "text": "disabled" + "text": "item (check vertical text alignment)" "enabled": false }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 0,growx" } ) add( new FormComponent( "javax.swing.JTextField" ) { name: "textField3" - "text": "editable" + "text": "item" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 0,growx" - } ) - add( new FormComponent( "javax.swing.JTextField" ) { - name: "textField4" - "text": "disabled" - "enabled": false - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 0,growx" - } ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "label3" - "text": "JXTree:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 6 0" + "value": "cell 4 0 2 1,growx" } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$columnConstraints": "[fill]" @@ -110,77 +91,6 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 1" } ) - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$layoutConstraints": "insets 0,hidemode 3" - "$columnConstraints": "[fill]" - "$rowConstraints": "[][grow][][]" - } ) { - name: "panel2" - add( new FormComponent( "javax.swing.JLabel" ) { - name: "treeLabel" - "text": "JTree:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0,aligny top,growy 0" - } ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "treeRowCountLabel" - "text": "Row count:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2" - } ) - add( new FormComponent( "javax.swing.JSpinner" ) { - name: "treeRowCountSpinner" - "model": new javax.swing.SpinnerNumberModel { - minimum: 20 - stepSize: 20 - value: 20 - } - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "treeRowCountChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 3" - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 1" - } ) - add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { - name: "scrollPane3" - add( new FormComponent( "javax.swing.JTree" ) { - name: "tree1" - "showsRootHandles": true - "editable": true - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 1" - } ) - add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { - name: "scrollPane4" - add( new FormComponent( "javax.swing.JTree" ) { - name: "tree2" - "enabled": false - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 5 1" - } ) - add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { - name: "scrollPane5" - add( new FormComponent( "org.jdesktop.swingx.JXTree" ) { - name: "xTree1" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 6 1" - } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets 0,hidemode 3" "$columnConstraints": "[fill]" @@ -214,7 +124,7 @@ new FormModel { "value": "cell 0 3" } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2" + "value": "cell 3 1" } ) add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { name: "table1ScrollPane" @@ -229,230 +139,73 @@ new FormModel { } } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 2 2 1,width 300" + "value": "cell 4 1 2 1,width 300" } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$columnConstraints": "[200][200]" - "$rowConstraints": "[][150,grow,sizegroup 1,fill]" - "$layoutConstraints": "ltr,insets 0,hidemode 3" + "$layoutConstraints": "insets 0,hidemode 3" + "$columnConstraints": "[fill]" + "$rowConstraints": "[][grow][][]" } ) { - name: "optionsPanel" - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "dndCheckBox" - "text": "enable drag and drop (for lists, trees and tables)" - "mnemonic": 68 + name: "panel2" + add( new FormComponent( "javax.swing.JLabel" ) { + name: "treeLabel" + "text": "JTree:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0,aligny top,growy 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "treeRowCountLabel" + "text": "Row count:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JSpinner" ) { + name: "treeRowCountSpinner" + "model": new javax.swing.SpinnerNumberModel { + minimum: 20 + stepSize: 20 + value: 20 + } auxiliary() { "JavaCodeGenerator.variableLocal": false } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "dndChanged", false ) ) + addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "treeRowCountChanged", false ) ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0 2 1" - } ) - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$layoutConstraints": "hidemode 3" - "$columnConstraints": "[]" - "$rowConstraints": "[][]0[]0[]0[]0[]0[]0[]0[]" - } ) { - name: "tableOptionsPanel" - "border": new javax.swing.border.TitledBorder( "JTable Control" ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "autoResizeModeLabel" - "text": "Auto resize mode:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormComponent( "javax.swing.JComboBox" ) { - name: "autoResizeModeField" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "off" - addElement( "off" ) - addElement( "nextColumn" ) - addElement( "subsequentColumns" ) - addElement( "lastColumn" ) - addElement( "allColumns" ) - } - "selectedIndex": 2 - auxiliary() { - "JavaCodeGenerator.variableLocal": false - "JavaCodeGenerator.typeParameters": "String" - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "autoResizeModeChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "showHorizontalLinesCheckBox" - "text": "show horizontal lines" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showHorizontalLinesChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "rowHeaderCheckBox" - "text": "row header" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowHeaderChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "showVerticalLinesCheckBox" - "text": "show vertical lines" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showVerticalLinesChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "intercellSpacingCheckBox" - "text": "intercell spacing" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "intercellSpacingChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 3" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "redGridColorCheckBox" - "text": "red grid color" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "redGridColorChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 4" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "rowSelectionCheckBox" - "text": "row selection" - "selected": true - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowSelectionChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 5" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "columnSelectionCheckBox" - "text": "column selection" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "columnSelectionChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 6" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "tableHeaderButtonCheckBox" - "text": "show button in table header" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tableHeaderButtonChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 8" - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1" - } ) - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$layoutConstraints": "hidemode 3" - "$columnConstraints": "[fill]" - "$rowConstraints": "[][]0[]" - } ) { - name: "treeOptionsPanel" - "border": new javax.swing.border.TitledBorder( "JTree Control" ) - add( new FormComponent( "javax.swing.JLabel" ) { - name: "treeRendererLabel" - "text": "Renderer:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormComponent( "javax.swing.JComboBox" ) { - name: "treeRendererComboBox" - "model": new javax.swing.DefaultComboBoxModel { - selectedItem: "default" - addElement( "default" ) - addElement( "defaultSubclass" ) - addElement( "label" ) - addElement( "swingxDefault" ) - addElement( "jideCheckBox" ) - addElement( "jideStyled" ) - } - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treeRendererChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "treeWideSelectionCheckBox" - "text": "wide selection" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treeWideSelectionChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1" - } ) - add( new FormComponent( "javax.swing.JCheckBox" ) { - name: "treePaintSelectionCheckBox" - "text": "paint selection" - "selected": true - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treePaintSelectionChanged", false ) ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 2" - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 1" + "value": "cell 0 3" } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 3 2 3 1" + "value": "cell 0 2" } ) - add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { - "$columnConstraints": "[grow,sizegroup 1,fill]" - "$rowConstraints": "[][150,grow,sizegroup 1,fill]" - "$layoutConstraints": "ltr,insets 0,hidemode 3" - } ) { - name: "panel4" - add( new FormComponent( "javax.swing.JLabel" ) { - name: "label4" - "text": "JIDE CheckBoxTree:" - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 0" - } ) - add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { - name: "scrollPane6" - add( new FormComponent( "com.jidesoft.swing.CheckBoxTree" ) { - name: "checkBoxTree1" - auxiliary() { - "JavaCodeGenerator.variableLocal": false - } - } ) - }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 1" + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane3" + add( new FormComponent( "javax.swing.JTree" ) { + name: "tree1" + "showsRootHandles": true + "editable": true + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 6 2" + "value": "cell 1 2" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane4" + add( new FormComponent( "javax.swing.JTree" ) { + name: "tree2" + "enabled": false + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 2" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label1" "text": "JXTable:" }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 0 3,aligny top,growy 0" + "value": "cell 3 2,aligny top,growy 0" } ) add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { name: "xTable1ScrollPane" @@ -466,7 +219,56 @@ new FormModel { } } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 3 2 1" + "value": "cell 4 2 2 1" + } ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "insets 0,hidemode 3" + "$columnConstraints": "[fill]" + "$rowConstraints": "[][]0[]" + } ) { + name: "panel4" + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label3" + "text": "JXTree:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label4" + "text": "CheckBoxTree:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label5" + "text": "(JIDE)" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane5" + add( new FormComponent( "org.jdesktop.swingx.JXTree" ) { + name: "xTree1" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 3" + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane6" + add( new FormComponent( "com.jidesoft.swing.CheckBoxTree" ) { + name: "checkBoxTree1" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 3" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label2" @@ -488,9 +290,201 @@ new FormModel { }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 4 3 2 1" } ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "hidemode 3" + "$columnConstraints": "[fill][fill]" + "$rowConstraints": "[]" + } ) { + name: "panel5" + "border": new javax.swing.border.TitledBorder( "General Control" ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "dndCheckBox" + "text": "enable drag and drop" + "mnemonic": 68 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "dndChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 4" + } ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "hidemode 3" + "$columnConstraints": "[fill]" + "$rowConstraints": "[][]0[]" + } ) { + name: "treeOptionsPanel" + "border": new javax.swing.border.TitledBorder( "JTree Control" ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "treeRendererLabel" + "text": "Renderer:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JComboBox" ) { + name: "treeRendererComboBox" + "model": new javax.swing.DefaultComboBoxModel { + selectedItem: "default" + addElement( "default" ) + addElement( "defaultSubclass" ) + addElement( "label" ) + addElement( "swingxDefault" ) + addElement( "jideCheckBox" ) + addElement( "jideStyled" ) + } + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treeRendererChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "treeWideSelectionCheckBox" + "text": "wide selection" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treeWideSelectionChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "treePaintSelectionCheckBox" + "text": "paint selection" + "selected": true + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treePaintSelectionChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 4" + } ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "hidemode 3" + "$columnConstraints": "[][fill]" + "$rowConstraints": "[][]0[]0[]0[]0" + } ) { + name: "tableOptionsPanel" + "border": new javax.swing.border.TitledBorder( "JTable Control" ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "autoResizeModeLabel" + "text": "Auto resize mode:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0 2 1" + } ) + add( new FormComponent( "javax.swing.JComboBox" ) { + name: "autoResizeModeField" + "model": new javax.swing.DefaultComboBoxModel { + selectedItem: "off" + addElement( "off" ) + addElement( "nextColumn" ) + addElement( "subsequentColumns" ) + addElement( "lastColumn" ) + addElement( "allColumns" ) + } + "selectedIndex": 2 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + "JavaCodeGenerator.typeParameters": "String" + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "autoResizeModeChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0 2 1" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "showHorizontalLinesCheckBox" + "text": "show horizontal lines" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showHorizontalLinesChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "rowSelectionCheckBox" + "text": "row selection" + "selected": true + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowSelectionChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 1" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "showVerticalLinesCheckBox" + "text": "show vertical lines" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showVerticalLinesChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "columnSelectionCheckBox" + "text": "column selection" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "columnSelectionChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 2" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "intercellSpacingCheckBox" + "text": "intercell spacing" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "intercellSpacingChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "rowHeaderCheckBox" + "text": "row header" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowHeaderChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 3" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "redGridColorCheckBox" + "text": "red grid color" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "redGridColorChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 4" + } ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "tableHeaderButtonCheckBox" + "text": "show button in table header" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tableHeaderButtonChanged", false ) ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 4" + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 4 2 1" + } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) - "size": new java.awt.Dimension( 1235, 825 ) + "size": new java.awt.Dimension( 950, 600 ) } ) } }