support CompoundBorder as component border with FlatBorder on the outside

This commit is contained in:
Karl Tauber
2020-05-19 23:24:00 +02:00
parent 815e23b930
commit 2a0403a988
5 changed files with 933 additions and 14 deletions

View File

@@ -32,7 +32,6 @@ import javax.swing.JSpinner;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.LookAndFeel; import javax.swing.LookAndFeel;
import javax.swing.UIManager; import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource; import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicTextFieldUI; import javax.swing.plaf.basic.BasicTextFieldUI;
@@ -152,14 +151,12 @@ public class FlatTextFieldUI
} }
static void paintBackground( Graphics g, JTextComponent c, boolean isIntelliJTheme ) { static void paintBackground( Graphics g, JTextComponent c, boolean isIntelliJTheme ) {
Border border = c.getBorder();
// do not paint background if: // do not paint background if:
// - not opaque and // - not opaque and
// - border is not a flat border and // - border is not a flat border and
// - opaque was explicitly set (to false) // - opaque was explicitly set (to false)
// (same behaviour as in AquaTextFieldUI) // (same behaviour as in AquaTextFieldUI)
if( !c.isOpaque() && !(border instanceof FlatBorder) && FlatUIUtils.hasOpaqueBeenExplicitlySet( c ) ) if( !c.isOpaque() && FlatUIUtils.getOutsideFlatBorder( c ) == null && FlatUIUtils.hasOpaqueBeenExplicitlySet( c ) )
return; return;
float focusWidth = FlatUIUtils.getBorderFocusWidth( c ); float focusWidth = FlatUIUtils.getBorderFocusWidth( c );

View File

@@ -40,6 +40,7 @@ import javax.swing.JComponent;
import javax.swing.LookAndFeel; import javax.swing.LookAndFeel;
import javax.swing.UIManager; import javax.swing.UIManager;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
import javax.swing.plaf.UIResource; import javax.swing.plaf.UIResource;
import com.formdev.flatlaf.FlatClientProperties; import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.util.DerivedColor; import com.formdev.flatlaf.util.DerivedColor;
@@ -152,9 +153,9 @@ public class FlatUIUtils
* Returns the scaled thickness of the outer focus border for the given component. * Returns the scaled thickness of the outer focus border for the given component.
*/ */
public static float getBorderFocusWidth( JComponent c ) { public static float getBorderFocusWidth( JComponent c ) {
Border border = c.getBorder(); FlatBorder border = getOutsideFlatBorder( c );
return (border instanceof FlatBorder) return (border != null)
? UIScale.scale( (float) ((FlatBorder)border).getFocusWidth( c ) ) ? UIScale.scale( (float) border.getFocusWidth( c ) )
: 0; : 0;
} }
@@ -162,9 +163,9 @@ public class FlatUIUtils
* Returns the scaled arc diameter of the border for the given component. * Returns the scaled arc diameter of the border for the given component.
*/ */
public static float getBorderArc( JComponent c ) { public static float getBorderArc( JComponent c ) {
Border border = c.getBorder(); FlatBorder border = getOutsideFlatBorder( c );
return (border instanceof FlatBorder) return (border != null)
? UIScale.scale( (float) ((FlatBorder)border).getArc( c ) ) ? UIScale.scale( (float) border.getArc( c ) )
: 0; : 0;
} }
@@ -172,6 +173,18 @@ public class FlatUIUtils
return getBorderArc( c ) >= c.getHeight(); return getBorderArc( c ) >= c.getHeight();
} }
public static FlatBorder getOutsideFlatBorder( JComponent c ) {
Border border = c.getBorder();
for(;;) {
if( border instanceof FlatBorder )
return (FlatBorder) border;
else if( border instanceof CompoundBorder )
border = ((CompoundBorder)border).getOutsideBorder();
else
return null;
}
}
/** /**
* Sets rendering hints used for painting. * Sets rendering hints used for painting.
*/ */

View File

@@ -21,7 +21,6 @@ import java.awt.Insets;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.util.function.Function; import java.util.function.Function;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.border.Border;
/** /**
* Support for MigLayout visual paddings. * Support for MigLayout visual paddings.
@@ -75,9 +74,9 @@ public class MigLayoutVisualPadding
return; return;
install( c, c2 -> { install( c, c2 -> {
Border border = c2.getBorder(); FlatBorder border = FlatUIUtils.getOutsideFlatBorder( c2 );
if( border instanceof FlatBorder ) { if( border != null ) {
int focusWidth = ((FlatBorder)border).getFocusWidth( c2 ); int focusWidth = border.getFocusWidth( c2 );
return new Insets( focusWidth, focusWidth, focusWidth, focusWidth ); return new Insets( focusWidth, focusWidth, focusWidth, focusWidth );
} else } else
return null; return null;

View File

@@ -0,0 +1,500 @@
/*
* Copyright 2020 FormDev Software GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.formdev.flatlaf.testing;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.plaf.basic.BasicComboBoxEditor;
import com.formdev.flatlaf.icons.FlatFileViewFloppyDriveIcon;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.swing.*;
/**
* @author Karl Tauber
*/
public class FlatCustomBordersTest
extends FlatTestPanel
{
private static final Color RED = new Color( 0x60ff0000, true );
private static final Color GREEN = new Color( 0x6000ff00, true );
private static final Color MAGENTA = new Color( 0x60ff00ff, true );
private static final Color ORANGE = new Color( 0x60ffc800, true );
public static void main( String[] args ) {
SwingUtilities.invokeLater( () -> {
FlatTestFrame frame = FlatTestFrame.create( args, "FlatCustomBordersTest" );
frame.showFrame( FlatCustomBordersTest::new );
} );
}
FlatCustomBordersTest() {
initComponents();
applyCustomBorders();
}
@Override
public void updateUI() {
super.updateUI();
if( textField2 != null )
applyCustomBorders();
}
private void applyCustomBorders() {
LineBorder lineBorder = new LineBorder( MAGENTA, UIScale.scale( 3 ) );
applyCustomInsideBorder( button2, "Button.border" );
applyCustomInsideBorder( button6, "Button.border" );
applyCustomOutsideBorder( button3, "Button.border" );
applyCustomOutsideBorder( button7, "Button.border" );
button4.setBorder( lineBorder );
button8.setBorder( lineBorder );
applyCustomInsideBorder( comboBox2, "ComboBox.border" );
applyCustomInsideBorder( comboBox6, "ComboBox.border" );
applyCustomOutsideBorder( comboBox3, "ComboBox.border" );
applyCustomOutsideBorder( comboBox7, "ComboBox.border" );
comboBox4.setBorder( lineBorder );
comboBox8.setBorder( lineBorder );
applyCustomInsideBorder( comboBox10, "ComboBox.border" );
applyCustomInsideBorder( comboBox14, "ComboBox.border" );
applyCustomOutsideBorder( comboBox11, "ComboBox.border" );
applyCustomOutsideBorder( comboBox15, "ComboBox.border" );
comboBox12.setBorder( lineBorder );
comboBox16.setBorder( lineBorder );
applyCustomInsideBorder( spinner2, "Spinner.border" );
applyCustomInsideBorder( spinner6, "Spinner.border" );
applyCustomOutsideBorder( spinner3, "Spinner.border" );
applyCustomOutsideBorder( spinner7, "Spinner.border" );
spinner4.setBorder( lineBorder );
spinner8.setBorder( lineBorder );
applyCustomInsideBorder( textField2, "TextField.border" );
applyCustomInsideBorder( textField6, "TextField.border" );
applyCustomOutsideBorder( textField3, "TextField.border" );
applyCustomOutsideBorder( textField7, "TextField.border" );
textField4.setBorder( lineBorder );
textField8.setBorder( lineBorder );
applyCustomComboBoxEditorBorder( comboBox17 );
applyCustomComboBoxEditorBorder( comboBox18 );
applyCustomComboBoxEditorBorderWithIcon( comboBox19 );
applyCustomComboBoxEditorBorderWithIcon( comboBox20 );
}
private void applyCustomInsideBorder( JComponent c, String uiKey ) {
c.setBorder( new CompoundBorder( UIManager.getBorder( uiKey ), new LineBorder( RED, UIScale.scale( 3 ) ) ) );
}
private void applyCustomOutsideBorder( JComponent c, String uiKey ) {
c.setBorder( new CompoundBorder( new LineBorder( GREEN, UIScale.scale( 3 ) ), UIManager.getBorder( uiKey ) ) );
}
private void applyCustomComboBoxEditorBorder( JComboBox<String> comboBox ) {
applyCustomComboBoxEditorBorder( comboBox, new LineBorder( ORANGE, UIScale.scale( 3 ) ) );
}
private void applyCustomComboBoxEditorBorderWithIcon( JComboBox<String> comboBox ) {
applyCustomComboBoxEditorBorder( comboBox, new BorderWithIcon() );
}
private void applyCustomComboBoxEditorBorder( JComboBox<String> comboBox, Border border ) {
JTextField customTextField = new JTextField();
customTextField.setBorder( border );
comboBox.setEditor( new BasicComboBoxEditor() {
@Override
protected JTextField createEditorComponent() {
return customTextField;
}
} );
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
label1 = new JLabel();
label3 = new JLabel();
label4 = new JLabel();
label2 = new JLabel();
label8 = new JLabel();
label9 = new JLabel();
label7 = new JLabel();
button1 = new JButton();
button2 = new JButton();
button3 = new JButton();
button4 = new JButton();
button5 = new JButton();
button6 = new JButton();
button7 = new JButton();
button8 = new JButton();
label5 = new JLabel();
comboBox1 = new JComboBox<>();
comboBox2 = new JComboBox<>();
comboBox3 = new JComboBox<>();
comboBox4 = new JComboBox<>();
comboBox5 = new JComboBox<>();
comboBox6 = new JComboBox<>();
comboBox7 = new JComboBox<>();
comboBox8 = new JComboBox<>();
comboBox9 = new JComboBox<>();
comboBox10 = new JComboBox<>();
comboBox11 = new JComboBox<>();
comboBox12 = new JComboBox<>();
comboBox17 = new JComboBox<>();
comboBox19 = new JComboBox<>();
comboBox13 = new JComboBox<>();
comboBox14 = new JComboBox<>();
comboBox15 = new JComboBox<>();
comboBox16 = new JComboBox<>();
comboBox18 = new JComboBox<>();
comboBox20 = new JComboBox<>();
label6 = new JLabel();
spinner1 = new JSpinner();
spinner2 = new JSpinner();
spinner3 = new JSpinner();
spinner4 = new JSpinner();
spinner5 = new JSpinner();
spinner6 = new JSpinner();
spinner7 = new JSpinner();
spinner8 = new JSpinner();
textFieldLabel = new JLabel();
textField1 = new JTextField();
textField2 = new JTextField();
textField3 = new JTextField();
textField4 = new JTextField();
textField5 = new JTextField();
textField6 = new JTextField();
textField7 = new JTextField();
textField8 = new JTextField();
//======== this ========
setLayout(new MigLayout(
"ltr,insets dialog,hidemode 3",
// columns
"[]" +
"[fill]" +
"[fill]" +
"[fill]" +
"[fill]" +
"[fill]" +
"[fill]",
// rows
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]" +
"[]"));
//---- label1 ----
label1.setText("plain");
add(label1, "cell 1 0");
//---- label3 ----
label3.setText("custom inside");
add(label3, "cell 2 0");
//---- label4 ----
label4.setText("custom outside");
add(label4, "cell 3 0");
//---- label2 ----
label2.setText("LineBorder");
add(label2, "cell 4 0");
//---- label8 ----
label8.setText("custom editor");
add(label8, "cell 5 0");
//---- label9 ----
label9.setText("with icon");
add(label9, "cell 6 0");
//---- label7 ----
label7.setText("JButton:");
add(label7, "cell 0 1");
//---- button1 ----
button1.setText("text");
add(button1, "cell 1 1");
//---- button2 ----
button2.setText("text");
add(button2, "cell 2 1");
//---- button3 ----
button3.setText("text");
add(button3, "cell 3 1");
//---- button4 ----
button4.setText("text");
add(button4, "cell 4 1");
//---- button5 ----
button5.setText("text");
button5.putClientProperty("JButton.buttonType", "roundRect");
add(button5, "cell 1 2");
//---- button6 ----
button6.setText("text");
button6.putClientProperty("JButton.buttonType", "roundRect");
add(button6, "cell 2 2");
//---- button7 ----
button7.setText("text");
button7.putClientProperty("JButton.buttonType", "roundRect");
add(button7, "cell 3 2");
//---- button8 ----
button8.setText("text");
button8.putClientProperty("JButton.buttonType", "roundRect");
add(button8, "cell 4 2");
//---- label5 ----
label5.setText("JComboBox:");
add(label5, "cell 0 3");
add(comboBox1, "cell 1 3");
add(comboBox2, "cell 2 3");
add(comboBox3, "cell 3 3");
add(comboBox4, "cell 4 3");
//---- comboBox5 ----
comboBox5.putClientProperty("JComponent.roundRect", true);
add(comboBox5, "cell 1 4");
//---- comboBox6 ----
comboBox6.putClientProperty("JComponent.roundRect", true);
add(comboBox6, "cell 2 4");
//---- comboBox7 ----
comboBox7.putClientProperty("JComponent.roundRect", true);
add(comboBox7, "cell 3 4");
//---- comboBox8 ----
comboBox8.putClientProperty("JComponent.roundRect", true);
add(comboBox8, "cell 4 4");
//---- comboBox9 ----
comboBox9.setEditable(true);
add(comboBox9, "cell 1 5");
//---- comboBox10 ----
comboBox10.setEditable(true);
add(comboBox10, "cell 2 5");
//---- comboBox11 ----
comboBox11.setEditable(true);
add(comboBox11, "cell 3 5");
//---- comboBox12 ----
comboBox12.setEditable(true);
add(comboBox12, "cell 4 5");
//---- comboBox17 ----
comboBox17.setEditable(true);
add(comboBox17, "cell 5 5");
//---- comboBox19 ----
comboBox19.setEditable(true);
add(comboBox19, "cell 6 5");
//---- comboBox13 ----
comboBox13.putClientProperty("JComponent.roundRect", true);
comboBox13.setEditable(true);
add(comboBox13, "cell 1 6");
//---- comboBox14 ----
comboBox14.putClientProperty("JComponent.roundRect", true);
comboBox14.setEditable(true);
add(comboBox14, "cell 2 6");
//---- comboBox15 ----
comboBox15.putClientProperty("JComponent.roundRect", true);
comboBox15.setEditable(true);
add(comboBox15, "cell 3 6");
//---- comboBox16 ----
comboBox16.putClientProperty("JComponent.roundRect", true);
comboBox16.setEditable(true);
add(comboBox16, "cell 4 6");
//---- comboBox18 ----
comboBox18.putClientProperty("JComponent.roundRect", true);
comboBox18.setEditable(true);
add(comboBox18, "cell 5 6");
//---- comboBox20 ----
comboBox20.putClientProperty("JComponent.roundRect", true);
comboBox20.setEditable(true);
add(comboBox20, "cell 6 6");
//---- label6 ----
label6.setText("JSpinner:");
add(label6, "cell 0 7");
add(spinner1, "cell 1 7");
add(spinner2, "cell 2 7");
add(spinner3, "cell 3 7");
add(spinner4, "cell 4 7");
//---- spinner5 ----
spinner5.putClientProperty("JComponent.roundRect", true);
add(spinner5, "cell 1 8");
//---- spinner6 ----
spinner6.putClientProperty("JComponent.roundRect", true);
add(spinner6, "cell 2 8");
//---- spinner7 ----
spinner7.putClientProperty("JComponent.roundRect", true);
add(spinner7, "cell 3 8");
//---- spinner8 ----
spinner8.putClientProperty("JComponent.roundRect", true);
add(spinner8, "cell 4 8");
//---- textFieldLabel ----
textFieldLabel.setText("JTextField:");
add(textFieldLabel, "cell 0 9");
//---- textField1 ----
textField1.setText("text");
textField1.putClientProperty("JComponent.roundRect", false);
add(textField1, "cell 1 9,growx");
//---- textField2 ----
textField2.putClientProperty("JComponent.roundRect", false);
textField2.setText("text");
add(textField2, "cell 2 9");
//---- textField3 ----
textField3.setText("text");
add(textField3, "cell 3 9");
//---- textField4 ----
textField4.putClientProperty("JComponent.roundRect", false);
textField4.setText("text");
add(textField4, "cell 4 9");
//---- textField5 ----
textField5.setText("text");
textField5.putClientProperty("JComponent.roundRect", true);
add(textField5, "cell 1 10,growx");
//---- textField6 ----
textField6.putClientProperty("JComponent.roundRect", true);
textField6.setText("text");
add(textField6, "cell 2 10");
//---- textField7 ----
textField7.setText("text");
textField7.putClientProperty("JComponent.roundRect", true);
add(textField7, "cell 3 10");
//---- textField8 ----
textField8.putClientProperty("JComponent.roundRect", true);
textField8.setText("text");
add(textField8, "cell 4 10");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JLabel label1;
private JLabel label3;
private JLabel label4;
private JLabel label2;
private JLabel label8;
private JLabel label9;
private JLabel label7;
private JButton button1;
private JButton button2;
private JButton button3;
private JButton button4;
private JButton button5;
private JButton button6;
private JButton button7;
private JButton button8;
private JLabel label5;
private JComboBox<String> comboBox1;
private JComboBox<String> comboBox2;
private JComboBox<String> comboBox3;
private JComboBox<String> comboBox4;
private JComboBox<String> comboBox5;
private JComboBox<String> comboBox6;
private JComboBox<String> comboBox7;
private JComboBox<String> comboBox8;
private JComboBox<String> comboBox9;
private JComboBox<String> comboBox10;
private JComboBox<String> comboBox11;
private JComboBox<String> comboBox12;
private JComboBox<String> comboBox17;
private JComboBox<String> comboBox19;
private JComboBox<String> comboBox13;
private JComboBox<String> comboBox14;
private JComboBox<String> comboBox15;
private JComboBox<String> comboBox16;
private JComboBox<String> comboBox18;
private JComboBox<String> comboBox20;
private JLabel label6;
private JSpinner spinner1;
private JSpinner spinner2;
private JSpinner spinner3;
private JSpinner spinner4;
private JSpinner spinner5;
private JSpinner spinner6;
private JSpinner spinner7;
private JSpinner spinner8;
private JLabel textFieldLabel;
private JTextField textField1;
private JTextField textField2;
private JTextField textField3;
private JTextField textField4;
private JTextField textField5;
private JTextField textField6;
private JTextField textField7;
private JTextField textField8;
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class BorderWithIcon -----------------------------------------------
private static class BorderWithIcon
implements Border
{
private final FlatFileViewFloppyDriveIcon icon = new FlatFileViewFloppyDriveIcon();
@Override
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
icon.paintIcon( c, g, x + width - icon.getIconWidth() - 2, y + ((height - icon.getIconHeight()) / 2) );
}
@Override
public boolean isBorderOpaque() {
return false;
}
@Override
public Insets getBorderInsets( Component c ) {
return new Insets( 0, 0, 0, icon.getIconWidth() + 4 );
}
}
}

View File

@@ -0,0 +1,410 @@
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[][fill][fill][fill][fill][fill][fill]"
"$rowConstraints": "[][][][][][][][][][][]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1"
"text": "plain"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3"
"text": "custom inside"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4"
"text": "custom outside"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label2"
"text": "LineBorder"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label8"
"text": "custom editor"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label9"
"text": "with icon"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label7"
"text": "JButton:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button2"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button3"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button4"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button5"
"text": "text"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button6"
"text": "text"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 2"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button7"
"text": "text"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 2"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button8"
"text": "text"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label5"
"text": "JComboBox:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox1"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox2"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox3"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox4"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 3"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox5"
"$client.JComponent.roundRect": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox6"
"$client.JComponent.roundRect": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 4"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox7"
"$client.JComponent.roundRect": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 4"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox8"
"$client.JComponent.roundRect": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 4"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox9"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox10"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox11"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox12"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox17"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox19"
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 5"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox13"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox14"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox15"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox16"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox18"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 6"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox20"
"$client.JComponent.roundRect": true
"editable": true
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 6"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label6"
"text": "JSpinner:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner2"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner3"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner4"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 7"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner5"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 8"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner6"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 8"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner7"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 8"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "spinner8"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 8"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "textFieldLabel"
"text": "JTextField:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 9"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField1"
"text": "text"
"$client.JComponent.roundRect": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 9,growx"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField2"
"$client.JComponent.roundRect": false
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 9"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField3"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 9"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField4"
"$client.JComponent.roundRect": false
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 9"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField5"
"text": "text"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 10,growx"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField6"
"$client.JComponent.roundRect": true
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 10"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField7"
"text": "text"
"$client.JComponent.roundRect": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 10"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField8"
"$client.JComponent.roundRect": true
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 10"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 790, 715 )
} )
}
}