diff --git a/CHANGELOG.md b/CHANGELOG.md index e7c28844..0ce35e54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ FlatLaf Change Log ================== +## 1.0-rc3-SNAPSHOT + +#### Fixed bugs + +- Label and ToolTip: Fixed font sizes for ``, ``, ``, `` + and `` tags in HTML text. + + ## 1.0-rc2 #### New features and improvements diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLabelUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLabelUI.java index 2bfafc52..78371eb3 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLabelUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLabelUI.java @@ -22,6 +22,9 @@ import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.beans.PropertyChangeEvent; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JLabel; @@ -96,18 +99,20 @@ public class FlatLabelUI } /** - * Checks whether text contains HTML headings and adds a special CSS rule to - * re-calculate heading font sizes based on current component font size. + * Checks whether text contains HTML tags that use "absolute-size" keywords + * (e.g. "x-large") for font-size in default style sheet + * (see javax/swing/text/html/default.css). + * If yes, adds a special CSS rule (BASE_SIZE) to the HTML text, which + * re-calculates font sizes based on current component font size. */ static void updateHTMLRenderer( JComponent c, String text, boolean always ) { if( BasicHTML.isHTMLString( text ) && c.getClientProperty( "html.disable" ) != Boolean.TRUE && - text.contains( "" ); + // BASE_SIZE rule is parsed in javax.swing.text.html.StyleSheet.addRule() String style = ""; if( headIndex < 0 ) style = "" + style + ""; @@ -122,6 +127,44 @@ public class FlatLabelUI BasicHTML.updateRenderer( c, text ); } + private static Set tagsUseFontSizeSet; + + private static boolean needsFontBaseSize( String text ) { + if( tagsUseFontSizeSet == null ) { + // tags that use font-size in javax/swing/text/html/default.css + tagsUseFontSizeSet = new HashSet<>( Arrays.asList( + "h1", "h2", "h3", "h4", "h5", "h6", "code", "kbd", "big", "small", "samp" ) ); + } + + // search for tags in HTML text + int textLength = text.length(); + for( int i = 6; i < textLength - 1; i++ ) { + if( text.charAt( i ) == '<' ) { + switch( text.charAt( i + 1 ) ) { + // first letters of tags in tagsUseFontSizeSet + case 'b': case 'B': + case 'c': case 'C': + case 'h': case 'H': + case 'k': case 'K': + case 's': case 'S': + int tagBegin = i + 1; + for( i += 2; i < textLength; i++ ) { + if( !Character.isLetterOrDigit( text.charAt( i ) ) ) { + String tag = text.substring( tagBegin, i ).toLowerCase(); + if( tagsUseFontSizeSet.contains( tag ) ) + return true; + + break; + } + } + break; + } + } + } + + return false; + } + static Graphics createGraphicsHTMLTextYCorrection( Graphics g, JComponent c ) { return (c.getClientProperty( BasicHTML.propertyKey ) != null) ? HiDPIUtils.createGraphicsTextYCorrection( (Graphics2D) g ) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolTipUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolTipUI.java index a4be7a4d..8428f0ae 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolTipUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolTipUI.java @@ -71,7 +71,7 @@ public class FlatToolTipUI if( sharedPropertyChangedListener == null ) { sharedPropertyChangedListener = e -> { String name = e.getPropertyName(); - if( name == "text" || name == "font" || name == "foreground" ) { + if( name == "tiptext" || name == "font" || name == "foreground" ) { JToolTip toolTip = (JToolTip) e.getSource(); FlatLabelUI.updateHTMLRenderer( toolTip, toolTip.getTipText(), false ); } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.java index 265eca32..b9056331 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.java @@ -55,73 +55,110 @@ public class FlatHtmlTest private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents - labelLabel = new JLabel(); - editorPaneLabel = new JLabel(); - textPaneLabel = new JLabel(); - toolTipLabel = new JLabel(); - panel1 = new JPanel(); - label5 = new JLabel(); - label6 = new JLabel(); - label7 = new JLabel(); - label3 = new JLabel(); - button1 = new JButton(); - button2 = new JButton(); - label11 = new JLabel(); - toggleButton1 = new JToggleButton(); - toggleButton2 = new JToggleButton(); - label12 = new JLabel(); - checkBox1 = new JCheckBox(); - checkBox2 = new JCheckBox(); - label13 = new JLabel(); - radioButton1 = new JRadioButton(); - radioButton2 = new JRadioButton(); - label8 = new JLabel(); - menu1 = new JMenu(); - menu2 = new JMenu(); - label4 = new JLabel(); - menuItem1 = new JMenuItem(); - menuItem2 = new JMenuItem(); - label9 = new JLabel(); - checkBoxMenuItem1 = new JCheckBoxMenuItem(); - checkBoxMenuItem2 = new JCheckBoxMenuItem(); - label10 = new JLabel(); - radioButtonMenuItem1 = new JRadioButtonMenuItem(); - radioButtonMenuItem2 = new JRadioButtonMenuItem(); - label14 = new JLabel(); - label15 = new JLabel(); - label16 = new JLabel(); - label17 = new JLabel(); - comboBox1 = new JComboBox<>(); - comboBox2 = new JComboBox<>(); - label18 = new JLabel(); - xHyperlink1 = new JXHyperlink(); - xHyperlink2 = new JXHyperlink(); + JLabel labelLabel = new JLabel(); + JLabel editorPaneLabel = new JLabel(); + JLabel textPaneLabel = new JLabel(); + JLabel toolTipLabel = new JLabel(); + JPanel panel1 = new JPanel(); + JLabel label5 = new JLabel(); + JLabel label6 = new JLabel(); + JLabel label7 = new JLabel(); + JLabel label3 = new JLabel(); + JButton button1 = new JButton(); + JButton button2 = new JButton(); + JLabel label11 = new JLabel(); + JToggleButton toggleButton1 = new JToggleButton(); + JToggleButton toggleButton2 = new JToggleButton(); + JLabel label12 = new JLabel(); + JCheckBox checkBox1 = new JCheckBox(); + JCheckBox checkBox2 = new JCheckBox(); + JLabel label13 = new JLabel(); + JRadioButton radioButton1 = new JRadioButton(); + JRadioButton radioButton2 = new JRadioButton(); + JLabel label8 = new JLabel(); + JMenu menu1 = new JMenu(); + JMenu menu2 = new JMenu(); + JLabel label4 = new JLabel(); + JMenuItem menuItem1 = new JMenuItem(); + JMenuItem menuItem2 = new JMenuItem(); + JLabel label9 = new JLabel(); + JCheckBoxMenuItem checkBoxMenuItem1 = new JCheckBoxMenuItem(); + JCheckBoxMenuItem checkBoxMenuItem2 = new JCheckBoxMenuItem(); + JLabel label10 = new JLabel(); + JRadioButtonMenuItem radioButtonMenuItem1 = new JRadioButtonMenuItem(); + JRadioButtonMenuItem radioButtonMenuItem2 = new JRadioButtonMenuItem(); + JLabel label14 = new JLabel(); + JLabel label15 = new JLabel(); + JLabel label16 = new JLabel(); + JLabel label17 = new JLabel(); + JComboBox comboBox1 = new JComboBox<>(); + JComboBox comboBox2 = new JComboBox<>(); + JLabel label18 = new JLabel(); + JXHyperlink xHyperlink1 = new JXHyperlink(); + JXHyperlink xHyperlink2 = new JXHyperlink(); label1 = new JLabel(); - scrollPane15 = new JScrollPane(); + JScrollPane scrollPane15 = new JScrollPane(); editorPane1 = new JEditorPane(); - scrollPane16 = new JScrollPane(); + JScrollPane scrollPane16 = new JScrollPane(); textPane1 = new JTextPane(); toolTip1 = new JToolTip(); label2 = new JLabel(); - scrollPane17 = new JScrollPane(); + JScrollPane scrollPane17 = new JScrollPane(); editorPane2 = new JEditorPane(); - scrollPane18 = new JScrollPane(); + JScrollPane scrollPane18 = new JScrollPane(); textPane2 = new JTextPane(); toolTip2 = new JToolTip(); + panel2 = new JPanel(); + JLabel label22 = new JLabel(); + JLabel label19 = new JLabel(); + JLabel label20 = new JLabel(); + JLabel label25 = new JLabel(); + JLabel label28 = new JLabel(); + JLabel label31 = new JLabel(); + JLabel label23 = new JLabel(); + JLabel label35 = new JLabel(); + JLabel label41 = new JLabel(); + JLabel label37 = new JLabel(); + JLabel label32 = new JLabel(); + JLabel label36 = new JLabel(); + JLabel label30 = new JLabel(); + JLabel label29 = new JLabel(); + JLabel label34 = new JLabel(); + JLabel label40 = new JLabel(); + JLabel label39 = new JLabel(); + JLabel label49 = new JLabel(); + JLabel label50 = new JLabel(); + JLabel label43 = new JLabel(); + JLabel label42 = new JLabel(); + JLabel label51 = new JLabel(); + JLabel label26 = new JLabel(); + JLabel label38 = new JLabel(); + JLabel label27 = new JLabel(); + JLabel label45 = new JLabel(); + JLabel label52 = new JLabel(); + JLabel label44 = new JLabel(); + JLabel label21 = new JLabel(); + JLabel label24 = new JLabel(); + JLabel label46 = new JLabel(); + JLabel label47 = new JLabel(); + JLabel label53 = new JLabel(); + JLabel label48 = new JLabel(); + JLabel label54 = new JLabel(); + JLabel label56 = new JLabel(); //======== this ======== setLayout(new MigLayout( "ltr,insets dialog,hidemode 3", // columns - "[fill]" + - "[fill]" + - "[fill]" + - "[fill]" + + "[grow,sizegroup 1,fill]" + + "[grow,sizegroup 1,fill]" + + "[grow,sizegroup 1,fill]" + + "[grow,sizegroup 1,fill]" + "[fill]", // rows "[]" + - "[top]" + - "[top]")); + "[fill]" + + "[grow,fill]")); //---- labelLabel ---- labelLabel.setText("JLabel:"); @@ -325,10 +362,11 @@ public class FlatHtmlTest xHyperlink2.setText("Some text"); panel1.add(xHyperlink2, "cell 2 11"); } - add(panel1, "cell 4 0 1 3,aligny top,growy 0"); + add(panel1, "cell 4 0 1 2,aligny top,growy 0"); //---- label1 ---- - label1.setText("HTML
Sample content
text with link

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6

Paragraph


Col 1Col 2
abcdef
  • item 1
  • item 2
"); + label1.setText("HTML
Sample content
text with link

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6

Paragraph

Address

Col 1Col 2
abcdef
  • item 1
  • item 2
"); + label1.setVerticalAlignment(SwingConstants.TOP); add(label1, "cell 0 1"); //======== scrollPane15 ======== @@ -357,6 +395,7 @@ public class FlatHtmlTest //---- label2 ---- label2.setText("text"); + label2.setVerticalAlignment(SwingConstants.TOP); add(label2, "cell 0 2"); //======== scrollPane17 ======== @@ -367,7 +406,7 @@ public class FlatHtmlTest editorPane2.setText("text"); scrollPane17.setViewportView(editorPane2); } - add(scrollPane17, "cell 1 2,grow"); + add(scrollPane17, "cell 1 2"); //======== scrollPane18 ======== { @@ -382,6 +421,175 @@ public class FlatHtmlTest //---- toolTip2 ---- toolTip2.setTipText("text"); add(toolTip2, "cell 3 2"); + + //======== panel2 ======== + { + panel2.setLayout(new MigLayout( + "insets 0,hidemode 3", + // columns + "[fill]para" + + "[fill]" + + "[fill]" + + "[fill]" + + "[fill]" + + "[fill]" + + "[fill]", + // rows + "[]" + + "[]" + + "[]" + + "[]" + + "[]" + + "[]para" + + "[]para" + + "[]" + + "[]")); + + //---- label22 ---- + label22.setText("plain"); + panel2.add(label22, "cell 0 0"); + + //---- label19 ---- + label19.setText("

h1

"); + panel2.add(label19, "cell 1 0"); + + //---- label20 ---- + label20.setText("

h2

"); + panel2.add(label20, "cell 2 0"); + + //---- label25 ---- + label25.setText("

h3

"); + panel2.add(label25, "cell 3 0"); + + //---- label28 ---- + label28.setText("

h4

"); + panel2.add(label28, "cell 4 0"); + + //---- label31 ---- + label31.setText("
h5
"); + panel2.add(label31, "cell 5 0"); + + //---- label23 ---- + label23.setText("
h6
"); + panel2.add(label23, "cell 6 0"); + + //---- label35 ---- + label35.setText("plain"); + panel2.add(label35, "cell 0 1"); + + //---- label41 ---- + label41.setText("strong"); + panel2.add(label41, "cell 1 1"); + + //---- label37 ---- + label37.setText("b"); + panel2.add(label37, "cell 2 1"); + + //---- label32 ---- + label32.setText("em"); + panel2.add(label32, "cell 3 1"); + + //---- label36 ---- + label36.setText("i"); + panel2.add(label36, "cell 4 1"); + + //---- label30 ---- + label30.setText("cite"); + panel2.add(label30, "cell 5 1"); + + //---- label29 ---- + label29.setText("dfn"); + panel2.add(label29, "cell 6 1"); + + //---- label34 ---- + label34.setText("plain"); + panel2.add(label34, "cell 0 2"); + + //---- label40 ---- + label40.setText("strike"); + panel2.add(label40, "cell 1 2"); + + //---- label39 ---- + label39.setText("s"); + panel2.add(label39, "cell 2 2"); + + //---- label49 ---- + label49.setText("body"); + panel2.add(label49, "cell 3 2"); + + //---- label50 ---- + label50.setText("a"); + panel2.add(label50, "cell 4 2"); + + //---- label43 ---- + label43.setText("u"); + panel2.add(label43, "cell 5 2"); + + //---- label42 ---- + label42.setText("var"); + panel2.add(label42, "cell 6 2"); + + //---- label51 ---- + label51.setText("plain"); + panel2.add(label51, "cell 0 3"); + + //---- label26 ---- + label26.setText("code"); + panel2.add(label26, "cell 1 3"); + + //---- label38 ---- + label38.setText("kbd"); + panel2.add(label38, "cell 2 3"); + + //---- label27 ---- + label27.setText("samp"); + panel2.add(label27, "cell 3 3"); + + //---- label45 ---- + label45.setText("tt"); + panel2.add(label45, "cell 4 3"); + + //---- label52 ---- + label52.setText("plain"); + panel2.add(label52, "cell 0 4"); + + //---- label44 ---- + label44.setText("
pre
"); + panel2.add(label44, "cell 1 4"); + + //---- label21 ---- + label21.setText("big"); + panel2.add(label21, "cell 2 4"); + + //---- label24 ---- + label24.setText("small"); + panel2.add(label24, "cell 3 4"); + + //---- label46 ---- + label46.setText("sub"); + panel2.add(label46, "cell 4 4"); + + //---- label47 ---- + label47.setText("sup"); + panel2.add(label47, "cell 5 4"); + + //---- label53 ---- + label53.setText("plain"); + panel2.add(label53, "cell 0 5"); + + //---- label48 ---- + label48.setText("
address
"); + panel2.add(label48, "cell 1 5"); + + //---- label54 ---- + label54.setText("Test whether inserted rule affects display:"); + panel2.add(label54, "cell 0 7 7 1"); + + //---- label56 ---- + label56.setText("leading red trailing"); + panel2.add(label56, "cell 0 8 7 1"); + } + add(panel2, "cell 4 2"); // JFormDesigner - End of component initialization //GEN-END:initComponents } @@ -399,65 +607,29 @@ public class FlatHtmlTest increaseFontSize( editorPane2, editorPane1.getFont() ); increaseFontSize( textPane2, textPane1.getFont() ); increaseFontSize( toolTip2, toolTip1.getFont() ); + + Font largeLabelFont = increaseFontSize( UIManager.getFont( "Label.font" ) ); + for( Component c : panel2.getComponents() ) + c.setFont( largeLabelFont ); } private void increaseFontSize( JComponent c, Font baseFont ) { - c.setFont( baseFont.deriveFont( Font.PLAIN, baseFont.getSize() + UIScale.scale( 10f ) ) ); + c.setFont( increaseFontSize( baseFont ) ); + } + + private Font increaseFontSize( Font baseFont ) { + return baseFont.deriveFont( Font.PLAIN, baseFont.getSize() + UIScale.scale( 10f ) ); } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables - private JLabel labelLabel; - private JLabel editorPaneLabel; - private JLabel textPaneLabel; - private JLabel toolTipLabel; - private JPanel panel1; - private JLabel label5; - private JLabel label6; - private JLabel label7; - private JLabel label3; - private JButton button1; - private JButton button2; - private JLabel label11; - private JToggleButton toggleButton1; - private JToggleButton toggleButton2; - private JLabel label12; - private JCheckBox checkBox1; - private JCheckBox checkBox2; - private JLabel label13; - private JRadioButton radioButton1; - private JRadioButton radioButton2; - private JLabel label8; - private JMenu menu1; - private JMenu menu2; - private JLabel label4; - private JMenuItem menuItem1; - private JMenuItem menuItem2; - private JLabel label9; - private JCheckBoxMenuItem checkBoxMenuItem1; - private JCheckBoxMenuItem checkBoxMenuItem2; - private JLabel label10; - private JRadioButtonMenuItem radioButtonMenuItem1; - private JRadioButtonMenuItem radioButtonMenuItem2; - private JLabel label14; - private JLabel label15; - private JLabel label16; - private JLabel label17; - private JComboBox comboBox1; - private JComboBox comboBox2; - private JLabel label18; - private JXHyperlink xHyperlink1; - private JXHyperlink xHyperlink2; private JLabel label1; - private JScrollPane scrollPane15; private JEditorPane editorPane1; - private JScrollPane scrollPane16; private JTextPane textPane1; private JToolTip toolTip1; private JLabel label2; - private JScrollPane scrollPane17; private JEditorPane editorPane2; - private JScrollPane scrollPane18; private JTextPane textPane2; private JToolTip toolTip2; + private JPanel panel2; // JFormDesigner - End of variables declaration //GEN-END:variables } diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.jfd index 38574374..05001e47 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatHtmlTest.jfd @@ -3,10 +3,13 @@ JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8" new FormModel { contentType: "form/swing" root: new FormRoot { + auxiliary() { + "JavaCodeGenerator.defaultVariableLocal": true + } 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]" - "$rowConstraints": "[][top][top]" + "$columnConstraints": "[grow,sizegroup 1,fill][grow,sizegroup 1,fill][grow,sizegroup 1,fill][grow,sizegroup 1,fill][fill]" + "$rowConstraints": "[][fill][grow,fill]" } ) { name: "this" add( new FormComponent( "javax.swing.JLabel" ) { @@ -274,11 +277,15 @@ new FormModel { "value": "cell 2 11" } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 4 0 1 3,aligny top,growy 0" + "value": "cell 4 0 1 2,aligny top,growy 0" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label1" - "text": "HTML
Sample content
text with link

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6

Paragraph


Col 1Col 2
abcdef
  • item 1
  • item 2
" + "text": "HTML
Sample content
text with link

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6

Paragraph

Address

Col 1Col 2
abcdef
  • item 1
  • item 2
" + "verticalAlignment": 1 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 1" } ) @@ -288,6 +295,9 @@ new FormModel { name: "editorPane1" "contentType": "text/html" "text": "text" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 1,grow" @@ -298,6 +308,9 @@ new FormModel { name: "textPane1" "contentType": "text/html" "text": "text" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 1" @@ -305,12 +318,19 @@ new FormModel { add( new FormComponent( "javax.swing.JToolTip" ) { name: "toolTip1" "tipText": "text" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 1" } ) add( new FormComponent( "javax.swing.JLabel" ) { name: "label2" "text": "text" + "verticalAlignment": 1 + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 0 2" } ) @@ -320,9 +340,12 @@ new FormModel { name: "editorPane2" "contentType": "text/html" "text": "text" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { - "value": "cell 1 2,grow" + "value": "cell 1 2" } ) add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { name: "scrollPane18" @@ -330,6 +353,9 @@ new FormModel { name: "textPane2" "contentType": "text/html" "text": "text" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } } ) }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 2" @@ -337,12 +363,243 @@ new FormModel { add( new FormComponent( "javax.swing.JToolTip" ) { name: "toolTip2" "tipText": "text" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 3 2" } ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + "$layoutConstraints": "insets 0,hidemode 3" + "$columnConstraints": "[fill]para[fill][fill][fill][fill][fill][fill]" + "$rowConstraints": "[][][][][][]para[]para[][]" + } ) { + name: "panel2" + auxiliary() { + "JavaCodeGenerator.variableLocal": false + } + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label22" + "text": "plain" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label19" + "text": "

h1

" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label20" + "text": "

h2

" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label25" + "text": "

h3

" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label28" + "text": "

h4

" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label31" + "text": "
h5
" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label23" + "text": "
h6
" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 6 0" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label35" + "text": "plain" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label41" + "text": "strong" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label37" + "text": "b" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label32" + "text": "em" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label36" + "text": "i" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label30" + "text": "cite" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label29" + "text": "dfn" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 6 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label34" + "text": "plain" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label40" + "text": "strike" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label39" + "text": "s" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label49" + "text": "body" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label50" + "text": "a" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label43" + "text": "u" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label42" + "text": "var" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 6 2" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label51" + "text": "plain" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 3" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label26" + "text": "code" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 3" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label38" + "text": "kbd" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 3" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label27" + "text": "samp" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 3" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label45" + "text": "tt" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 3" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label52" + "text": "plain" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 4" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label44" + "text": "
pre
" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 4" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label21" + "text": "big" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 2 4" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label24" + "text": "small" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 3 4" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label46" + "text": "sub" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 4" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label47" + "text": "sup" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 5 4" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label53" + "text": "plain" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 5" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label48" + "text": "
address
" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 1 5" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label54" + "text": "Test whether inserted rule affects display:" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 7 7 1" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label56" + "text": "leading red trailing" + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 0 8 7 1" + } ) + }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { + "value": "cell 4 2" + } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 ) - "size": new java.awt.Dimension( 820, 755 ) + "size": new java.awt.Dimension( 905, 815 ) } ) } }