mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-15 00:07:12 -06:00
Typography: added typography/fonts to demo
This commit is contained in:
@@ -130,6 +130,19 @@ class BasicComponentsPanel
|
|||||||
JTextField leadingIconTextField = new JTextField();
|
JTextField leadingIconTextField = new JTextField();
|
||||||
JTextField trailingIconTextField = new JTextField();
|
JTextField trailingIconTextField = new JTextField();
|
||||||
JTextField iconsTextField = new JTextField();
|
JTextField iconsTextField = new JTextField();
|
||||||
|
JLabel fontsLabel = new JLabel();
|
||||||
|
JLabel h00Label = new JLabel();
|
||||||
|
JLabel h0Label = new JLabel();
|
||||||
|
JLabel h1Label = new JLabel();
|
||||||
|
JLabel h2Label = new JLabel();
|
||||||
|
JLabel h3Label = new JLabel();
|
||||||
|
JLabel h4Label = new JLabel();
|
||||||
|
JLabel largeLabel = new JLabel();
|
||||||
|
JLabel defaultLabel = new JLabel();
|
||||||
|
JLabel mediumLabel = new JLabel();
|
||||||
|
JLabel smallLabel = new JLabel();
|
||||||
|
JLabel miniLabel = new JLabel();
|
||||||
|
JLabel monospacedLabel = new JLabel();
|
||||||
JPopupMenu popupMenu1 = new JPopupMenu();
|
JPopupMenu popupMenu1 = new JPopupMenu();
|
||||||
JMenuItem cutMenuItem = new JMenuItem();
|
JMenuItem cutMenuItem = new JMenuItem();
|
||||||
JMenuItem copyMenuItem = new JMenuItem();
|
JMenuItem copyMenuItem = new JMenuItem();
|
||||||
@@ -160,6 +173,7 @@ class BasicComponentsPanel
|
|||||||
"[]para" +
|
"[]para" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
|
"[]" +
|
||||||
"[]"));
|
"[]"));
|
||||||
|
|
||||||
//---- labelLabel ----
|
//---- labelLabel ----
|
||||||
@@ -667,6 +681,69 @@ class BasicComponentsPanel
|
|||||||
iconsTextField.setText("text");
|
iconsTextField.setText("text");
|
||||||
add(iconsTextField, "cell 3 14,growx");
|
add(iconsTextField, "cell 3 14,growx");
|
||||||
|
|
||||||
|
//---- fontsLabel ----
|
||||||
|
fontsLabel.setText("Typography / Fonts:");
|
||||||
|
add(fontsLabel, "cell 0 15");
|
||||||
|
|
||||||
|
//---- h00Label ----
|
||||||
|
h00Label.setText("H00");
|
||||||
|
h00Label.putClientProperty("FlatLaf.styleClass", "h00");
|
||||||
|
add(h00Label, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- h0Label ----
|
||||||
|
h0Label.setText("H0");
|
||||||
|
h0Label.putClientProperty("FlatLaf.styleClass", "h0");
|
||||||
|
add(h0Label, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- h1Label ----
|
||||||
|
h1Label.setText("H1");
|
||||||
|
h1Label.putClientProperty("FlatLaf.styleClass", "h1");
|
||||||
|
add(h1Label, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- h2Label ----
|
||||||
|
h2Label.setText("H2");
|
||||||
|
h2Label.putClientProperty("FlatLaf.styleClass", "h2");
|
||||||
|
add(h2Label, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- h3Label ----
|
||||||
|
h3Label.setText("H3");
|
||||||
|
h3Label.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
|
add(h3Label, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- h4Label ----
|
||||||
|
h4Label.setText("H4");
|
||||||
|
h4Label.putClientProperty("FlatLaf.styleClass", "h4");
|
||||||
|
add(h4Label, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- largeLabel ----
|
||||||
|
largeLabel.setText("large");
|
||||||
|
largeLabel.putClientProperty("FlatLaf.styleClass", "large");
|
||||||
|
add(largeLabel, "cell 1 15 5 1,gapx 30");
|
||||||
|
|
||||||
|
//---- defaultLabel ----
|
||||||
|
defaultLabel.setText("default/regular");
|
||||||
|
add(defaultLabel, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- mediumLabel ----
|
||||||
|
mediumLabel.setText("medium");
|
||||||
|
mediumLabel.putClientProperty("FlatLaf.styleClass", "medium");
|
||||||
|
add(mediumLabel, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- smallLabel ----
|
||||||
|
smallLabel.setText("small");
|
||||||
|
smallLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
|
add(smallLabel, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- miniLabel ----
|
||||||
|
miniLabel.setText("mini");
|
||||||
|
miniLabel.putClientProperty("FlatLaf.styleClass", "mini");
|
||||||
|
add(miniLabel, "cell 1 15 5 1");
|
||||||
|
|
||||||
|
//---- monospacedLabel ----
|
||||||
|
monospacedLabel.setText("monospaced");
|
||||||
|
monospacedLabel.putClientProperty("FlatLaf.styleClass", "monospaced");
|
||||||
|
add(monospacedLabel, "cell 1 15 5 1,gapx 30");
|
||||||
|
|
||||||
//======== popupMenu1 ========
|
//======== popupMenu1 ========
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ new FormModel {
|
|||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "insets dialog,hidemode 3"
|
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[][sizegroup 1][sizegroup 1][sizegroup 1][][]"
|
"$columnConstraints": "[][sizegroup 1][sizegroup 1][sizegroup 1][][]"
|
||||||
"$rowConstraints": "[][][][][][][][][][][][]para[][][]"
|
"$rowConstraints": "[][][][][][][][][][][][]para[][][][]"
|
||||||
} ) {
|
} ) {
|
||||||
name: "this"
|
name: "this"
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
@@ -671,9 +671,98 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 3 14,growx"
|
"value": "cell 3 14,growx"
|
||||||
} )
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "fontsLabel"
|
||||||
|
"text": "Typography / Fonts:"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 15"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "h00Label"
|
||||||
|
"text": "H00"
|
||||||
|
"$client.FlatLaf.styleClass": "h00"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "h0Label"
|
||||||
|
"text": "H0"
|
||||||
|
"$client.FlatLaf.styleClass": "h0"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "h1Label"
|
||||||
|
"text": "H1"
|
||||||
|
"$client.FlatLaf.styleClass": "h1"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "h2Label"
|
||||||
|
"text": "H2"
|
||||||
|
"$client.FlatLaf.styleClass": "h2"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "h3Label"
|
||||||
|
"text": "H3"
|
||||||
|
"$client.FlatLaf.styleClass": "h3"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "h4Label"
|
||||||
|
"text": "H4"
|
||||||
|
"$client.FlatLaf.styleClass": "h4"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "largeLabel"
|
||||||
|
"text": "large"
|
||||||
|
"$client.FlatLaf.styleClass": "large"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1,gapx 30"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "defaultLabel"
|
||||||
|
"text": "default/regular"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "mediumLabel"
|
||||||
|
"text": "medium"
|
||||||
|
"$client.FlatLaf.styleClass": "medium"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "smallLabel"
|
||||||
|
"text": "small"
|
||||||
|
"$client.FlatLaf.styleClass": "small"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "miniLabel"
|
||||||
|
"text": "mini"
|
||||||
|
"$client.FlatLaf.styleClass": "mini"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "monospacedLabel"
|
||||||
|
"text": "monospaced"
|
||||||
|
"$client.FlatLaf.styleClass": "monospaced"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 15 5 1,gapx 30"
|
||||||
|
} )
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 0, 0 )
|
"location": new java.awt.Point( 0, 0 )
|
||||||
"size": new java.awt.Dimension( 920, 480 )
|
"size": new java.awt.Dimension( 920, 550 )
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JPopupMenu", new FormLayoutManager( class javax.swing.JPopupMenu ) ) {
|
add( new FormContainer( "javax.swing.JPopupMenu", new FormLayoutManager( class javax.swing.JPopupMenu ) ) {
|
||||||
name: "popupMenu1"
|
name: "popupMenu1"
|
||||||
@@ -693,7 +782,7 @@ new FormModel {
|
|||||||
"mnemonic": 80
|
"mnemonic": 80
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 0, 500 )
|
"location": new java.awt.Point( 0, 570 )
|
||||||
"size": new java.awt.Dimension( 91, 87 )
|
"size": new java.awt.Dimension( 91, 87 )
|
||||||
} )
|
} )
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user