mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Merge PR #396: Typography
This commit is contained in:
@@ -22,6 +22,10 @@ import javax.swing.text.DefaultEditorKit;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.formdev.flatlaf.icons.FlatSearchIcon;
|
||||
import net.miginfocom.layout.AC;
|
||||
import net.miginfocom.layout.BoundSize;
|
||||
import net.miginfocom.layout.ConstraintParser;
|
||||
import net.miginfocom.layout.DimConstraint;
|
||||
import net.miginfocom.swing.*;
|
||||
|
||||
/**
|
||||
@@ -130,6 +134,22 @@ class BasicComponentsPanel
|
||||
JTextField leadingIconTextField = new JTextField();
|
||||
JTextField trailingIconTextField = 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 lightLabel = new JLabel();
|
||||
JLabel semiboldLabel = new JLabel();
|
||||
JLabel fontZoomLabel = 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();
|
||||
JMenuItem cutMenuItem = new JMenuItem();
|
||||
JMenuItem copyMenuItem = new JMenuItem();
|
||||
@@ -160,6 +180,8 @@ class BasicComponentsPanel
|
||||
"[]para" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]0" +
|
||||
"[]"));
|
||||
|
||||
//---- labelLabel ----
|
||||
@@ -667,6 +689,85 @@ class BasicComponentsPanel
|
||||
iconsTextField.setText("text");
|
||||
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");
|
||||
|
||||
//---- lightLabel ----
|
||||
lightLabel.setText("light");
|
||||
lightLabel.putClientProperty("FlatLaf.style", "font: 200% $light.font");
|
||||
add(lightLabel, "cell 1 15 5 1,gapx 30");
|
||||
|
||||
//---- semiboldLabel ----
|
||||
semiboldLabel.setText("semibold");
|
||||
semiboldLabel.putClientProperty("FlatLaf.style", "font: 200% $semibold.font");
|
||||
add(semiboldLabel, "cell 1 15 5 1");
|
||||
|
||||
//---- fontZoomLabel ----
|
||||
fontZoomLabel.setText("(200%)");
|
||||
fontZoomLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
fontZoomLabel.setEnabled(false);
|
||||
add(fontZoomLabel, "cell 1 15 5 1");
|
||||
|
||||
//---- largeLabel ----
|
||||
largeLabel.setText("large");
|
||||
largeLabel.putClientProperty("FlatLaf.styleClass", "large");
|
||||
add(largeLabel, "cell 1 16 5 1");
|
||||
|
||||
//---- defaultLabel ----
|
||||
defaultLabel.setText("default");
|
||||
add(defaultLabel, "cell 1 16 5 1");
|
||||
|
||||
//---- mediumLabel ----
|
||||
mediumLabel.setText("medium");
|
||||
mediumLabel.putClientProperty("FlatLaf.styleClass", "medium");
|
||||
add(mediumLabel, "cell 1 16 5 1");
|
||||
|
||||
//---- smallLabel ----
|
||||
smallLabel.setText("small");
|
||||
smallLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
add(smallLabel, "cell 1 16 5 1");
|
||||
|
||||
//---- miniLabel ----
|
||||
miniLabel.setText("mini");
|
||||
miniLabel.putClientProperty("FlatLaf.styleClass", "mini");
|
||||
add(miniLabel, "cell 1 16 5 1");
|
||||
|
||||
//---- monospacedLabel ----
|
||||
monospacedLabel.setText("monospaced");
|
||||
monospacedLabel.putClientProperty("FlatLaf.styleClass", "monospaced");
|
||||
add(monospacedLabel, "cell 1 16 5 1,gapx 30");
|
||||
|
||||
//======== popupMenu1 ========
|
||||
{
|
||||
|
||||
@@ -705,37 +806,55 @@ class BasicComponentsPanel
|
||||
if( FlatLafDemo.screenshotsMode ) {
|
||||
// hide some components
|
||||
Component[] hiddenComponents = {
|
||||
labelLabel, label1, label2,
|
||||
button13, button14, button15, button16, comboBox5, comboBox6,
|
||||
textField6, passwordField5,
|
||||
|
||||
textFieldLabel, textField2, textField4, textField6,
|
||||
formattedTextFieldLabel, formattedTextField1, formattedTextField2, formattedTextField3, formattedTextField4, formattedTextField5,
|
||||
passwordFieldLabel, passwordField1, passwordField2, passwordField3, passwordField4, passwordField5,
|
||||
textAreaLabel, scrollPane1, scrollPane2, scrollPane3, scrollPane4, textArea5,
|
||||
editorPaneLabel, scrollPane5, scrollPane6, scrollPane7, scrollPane8, editorPane5,
|
||||
textPaneLabel, scrollPane9, scrollPane10, scrollPane11, scrollPane12, textPane5,
|
||||
|
||||
errorHintsLabel, errorHintsTextField, errorHintsComboBox, errorHintsSpinner,
|
||||
warningHintsLabel, warningHintsTextField, warningHintsComboBox, warningHintsSpinner,
|
||||
|
||||
fontZoomLabel,
|
||||
};
|
||||
for( Component c : hiddenComponents )
|
||||
c.setVisible( false );
|
||||
|
||||
// move leading/trailing icon fields and password fields some rows up
|
||||
Component[] formattedTextFields = { formattedTextFieldLabel, formattedTextField1, formattedTextField2, formattedTextField3, formattedTextField4 };
|
||||
Component[] passwordFields = { passwordFieldLabel, passwordField1, passwordField2, passwordField3, passwordField4 };
|
||||
Component[] iconsFields = { iconsLabel, leadingIconTextField, trailingIconTextField, iconsTextField };
|
||||
// update layout (change row gaps to zero)
|
||||
MigLayout layout = (MigLayout) getLayout();
|
||||
for( int i = 0; i < iconsFields.length; i++ ) {
|
||||
Object cons = layout.getComponentConstraints( passwordFields[i] );
|
||||
layout.setComponentConstraints( iconsFields[i], cons );
|
||||
}
|
||||
for( int i = 0; i < passwordFields.length; i++ ) {
|
||||
Object cons = layout.getComponentConstraints( formattedTextFields[i] );
|
||||
layout.setComponentConstraints( passwordFields[i], cons );
|
||||
}
|
||||
Object rowCons = layout.getRowConstraints();
|
||||
AC ac = (rowCons instanceof String)
|
||||
? ConstraintParser.parseColumnConstraints( (String) rowCons )
|
||||
: (AC) rowCons;
|
||||
BoundSize zeroGap = ConstraintParser.parseBoundSize( "0", true, true );
|
||||
DimConstraint[] rows = ac.getConstaints();
|
||||
rows[6].setGapBefore( zeroGap );
|
||||
rows[7].setGapBefore( zeroGap );
|
||||
rows[8].setGapBefore( zeroGap );
|
||||
rows[9].setGapBefore( zeroGap );
|
||||
rows[10].setGapBefore( zeroGap );
|
||||
rows[11].setGapBefore( zeroGap );
|
||||
rows[11].setGapAfter( zeroGap );
|
||||
rows[12].setGapBefore( zeroGap );
|
||||
rows[13].setGapBefore( zeroGap );
|
||||
rows[15].setGapBefore( zeroGap );
|
||||
layout.setRowConstraints( ac );
|
||||
|
||||
// move two text field into same row as spinners
|
||||
spinnerLabel.setText( "JSpinner / JTextField:" );
|
||||
layout.setComponentConstraints( textField1, "cell 3 5,growx" );
|
||||
layout.setComponentConstraints( textField3, "cell 4 5,growx" );
|
||||
|
||||
// make "Not editable disabled" combobox smaller
|
||||
Object cons = layout.getComponentConstraints( comboBox4 );
|
||||
layout.setComponentConstraints( comboBox4, cons + ",width 50:50" );
|
||||
|
||||
revalidate();
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ new FormModel {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||
"$columnConstraints": "[][sizegroup 1][sizegroup 1][sizegroup 1][][]"
|
||||
"$rowConstraints": "[][][][][][][][][][][][]para[][][]"
|
||||
"$rowConstraints": "[][][][][][][][][][][][]para[][][][]0[]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
@@ -671,9 +671,120 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"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: "lightLabel"
|
||||
"text": "light"
|
||||
"$client.FlatLaf.style": "font: 200% $light.font"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 15 5 1,gapx 30"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "semiboldLabel"
|
||||
"text": "semibold"
|
||||
"$client.FlatLaf.style": "font: 200% $semibold.font"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 15 5 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "fontZoomLabel"
|
||||
"text": "(200%)"
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
"enabled": false
|
||||
}, 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 16 5 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "defaultLabel"
|
||||
"text": "default"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 16 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 16 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 16 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 16 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 16 5 1,gapx 30"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"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 ) ) {
|
||||
name: "popupMenu1"
|
||||
@@ -693,7 +804,7 @@ new FormModel {
|
||||
"mnemonic": 80
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 500 )
|
||||
"location": new java.awt.Point( 0, 570 )
|
||||
"size": new java.awt.Dimension( 91, 87 )
|
||||
} )
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import java.util.prefs.Preferences;
|
||||
import javax.swing.*;
|
||||
import javax.swing.text.DefaultEditorKit;
|
||||
import javax.swing.text.StyleContext;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import com.formdev.flatlaf.FlatDarculaLaf;
|
||||
import com.formdev.flatlaf.FlatDarkLaf;
|
||||
import com.formdev.flatlaf.FlatIntelliJLaf;
|
||||
@@ -50,7 +51,6 @@ import com.formdev.flatlaf.ui.JBRCustomDecorations;
|
||||
import com.formdev.flatlaf.util.ColorFunctions;
|
||||
import com.formdev.flatlaf.util.LoggingFacade;
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
import net.miginfocom.layout.ConstraintParser;
|
||||
import net.miginfocom.layout.LC;
|
||||
import net.miginfocom.layout.UnitValue;
|
||||
@@ -160,8 +160,7 @@ class DemoFrame
|
||||
|
||||
private void aboutActionPerformed() {
|
||||
JLabel titleLabel = new JLabel( "FlatLaf Demo" );
|
||||
Font titleFont = titleLabel.getFont();
|
||||
titleLabel.setFont( titleFont.deriveFont( (float) titleFont.getSize() + UIScale.scale( 6 ) ) );
|
||||
titleLabel.putClientProperty( FlatClientProperties.STYLE_CLASS, "h1" );
|
||||
|
||||
String link = "https://www.formdev.com/flatlaf/";
|
||||
JLabel linkLabel = new JLabel( "<html><a href=\"#\">" + link + "</a></html>" );
|
||||
|
||||
@@ -444,7 +444,7 @@ class TabsPanel
|
||||
|
||||
//---- tabPlacementLabel ----
|
||||
tabPlacementLabel.setText("Tab placement");
|
||||
tabPlacementLabel.setFont(tabPlacementLabel.getFont().deriveFont(tabPlacementLabel.getFont().getSize() + 4f));
|
||||
tabPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabPlacementLabel.setName("tabPlacementLabel");
|
||||
panel1.add(tabPlacementLabel, "cell 0 0");
|
||||
|
||||
@@ -457,28 +457,28 @@ class TabsPanel
|
||||
//---- topPlacementButton ----
|
||||
topPlacementButton.setText("top");
|
||||
topPlacementButton.setSelected(true);
|
||||
topPlacementButton.setFont(topPlacementButton.getFont().deriveFont(topPlacementButton.getFont().getSize() - 2f));
|
||||
topPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
topPlacementButton.setName("topPlacementButton");
|
||||
topPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||
tabPlacementToolBar.add(topPlacementButton);
|
||||
|
||||
//---- bottomPlacementButton ----
|
||||
bottomPlacementButton.setText("bottom");
|
||||
bottomPlacementButton.setFont(bottomPlacementButton.getFont().deriveFont(bottomPlacementButton.getFont().getSize() - 2f));
|
||||
bottomPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
bottomPlacementButton.setName("bottomPlacementButton");
|
||||
bottomPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||
tabPlacementToolBar.add(bottomPlacementButton);
|
||||
|
||||
//---- leftPlacementButton ----
|
||||
leftPlacementButton.setText("left");
|
||||
leftPlacementButton.setFont(leftPlacementButton.getFont().deriveFont(leftPlacementButton.getFont().getSize() - 2f));
|
||||
leftPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
leftPlacementButton.setName("leftPlacementButton");
|
||||
leftPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||
tabPlacementToolBar.add(leftPlacementButton);
|
||||
|
||||
//---- rightPlacementButton ----
|
||||
rightPlacementButton.setText("right");
|
||||
rightPlacementButton.setFont(rightPlacementButton.getFont().deriveFont(rightPlacementButton.getFont().getSize() - 2f));
|
||||
rightPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
rightPlacementButton.setName("rightPlacementButton");
|
||||
rightPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||
tabPlacementToolBar.add(rightPlacementButton);
|
||||
@@ -486,14 +486,14 @@ class TabsPanel
|
||||
|
||||
//---- scrollButton ----
|
||||
scrollButton.setText("scroll");
|
||||
scrollButton.setFont(scrollButton.getFont().deriveFont(scrollButton.getFont().getSize() - 2f));
|
||||
scrollButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollButton.setName("scrollButton");
|
||||
scrollButton.addActionListener(e -> scrollChanged());
|
||||
tabPlacementToolBar.add(scrollButton);
|
||||
|
||||
//---- borderButton ----
|
||||
borderButton.setText("border");
|
||||
borderButton.setFont(borderButton.getFont().deriveFont(borderButton.getFont().getSize() - 2f));
|
||||
borderButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
borderButton.setName("borderButton");
|
||||
borderButton.addActionListener(e -> borderChanged());
|
||||
tabPlacementToolBar.add(borderButton);
|
||||
@@ -508,7 +508,7 @@ class TabsPanel
|
||||
|
||||
//---- tabLayoutLabel ----
|
||||
tabLayoutLabel.setText("Tab layout");
|
||||
tabLayoutLabel.setFont(tabLayoutLabel.getFont().deriveFont(tabLayoutLabel.getFont().getSize() + 4f));
|
||||
tabLayoutLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabLayoutLabel.setName("tabLayoutLabel");
|
||||
panel1.add(tabLayoutLabel, "cell 0 2");
|
||||
|
||||
@@ -520,15 +520,15 @@ class TabsPanel
|
||||
|
||||
//---- scrollTabLayoutButton ----
|
||||
scrollTabLayoutButton.setText("scroll");
|
||||
scrollTabLayoutButton.setFont(scrollTabLayoutButton.getFont().deriveFont(scrollTabLayoutButton.getFont().getSize() - 2f));
|
||||
scrollTabLayoutButton.setSelected(true);
|
||||
scrollTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollTabLayoutButton.setName("scrollTabLayoutButton");
|
||||
scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged());
|
||||
tabLayoutToolBar.add(scrollTabLayoutButton);
|
||||
|
||||
//---- wrapTabLayoutButton ----
|
||||
wrapTabLayoutButton.setText("wrap");
|
||||
wrapTabLayoutButton.setFont(wrapTabLayoutButton.getFont().deriveFont(wrapTabLayoutButton.getFont().getSize() - 2f));
|
||||
wrapTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
wrapTabLayoutButton.setName("wrapTabLayoutButton");
|
||||
wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged());
|
||||
tabLayoutToolBar.add(wrapTabLayoutButton);
|
||||
@@ -538,14 +538,14 @@ class TabsPanel
|
||||
//---- scrollLayoutNoteLabel ----
|
||||
scrollLayoutNoteLabel.setText("(use mouse wheel to scroll; arrow button shows hidden tabs)");
|
||||
scrollLayoutNoteLabel.setEnabled(false);
|
||||
scrollLayoutNoteLabel.setFont(scrollLayoutNoteLabel.getFont().deriveFont(scrollLayoutNoteLabel.getFont().getSize() - 2f));
|
||||
scrollLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollLayoutNoteLabel.setName("scrollLayoutNoteLabel");
|
||||
panel1.add(scrollLayoutNoteLabel, "cell 0 3");
|
||||
|
||||
//---- wrapLayoutNoteLabel ----
|
||||
wrapLayoutNoteLabel.setText("(probably better to use scroll layout?)");
|
||||
wrapLayoutNoteLabel.setEnabled(false);
|
||||
wrapLayoutNoteLabel.setFont(wrapLayoutNoteLabel.getFont().deriveFont(wrapLayoutNoteLabel.getFont().getSize() - 2f));
|
||||
wrapLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
wrapLayoutNoteLabel.setName("wrapLayoutNoteLabel");
|
||||
panel1.add(wrapLayoutNoteLabel, "cell 0 3");
|
||||
|
||||
@@ -563,7 +563,7 @@ class TabsPanel
|
||||
|
||||
//---- closableTabsLabel ----
|
||||
closableTabsLabel.setText("Closable tabs");
|
||||
closableTabsLabel.setFont(closableTabsLabel.getFont().deriveFont(closableTabsLabel.getFont().getSize() + 4f));
|
||||
closableTabsLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
closableTabsLabel.setName("closableTabsLabel");
|
||||
panel1.add(closableTabsLabel, "cell 0 5");
|
||||
|
||||
@@ -575,22 +575,22 @@ class TabsPanel
|
||||
|
||||
//---- squareCloseButton ----
|
||||
squareCloseButton.setText("square");
|
||||
squareCloseButton.setFont(squareCloseButton.getFont().deriveFont(squareCloseButton.getFont().getSize() - 2f));
|
||||
squareCloseButton.setSelected(true);
|
||||
squareCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
squareCloseButton.setName("squareCloseButton");
|
||||
squareCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||
closableTabsToolBar.add(squareCloseButton);
|
||||
|
||||
//---- circleCloseButton ----
|
||||
circleCloseButton.setText("circle");
|
||||
circleCloseButton.setFont(circleCloseButton.getFont().deriveFont(circleCloseButton.getFont().getSize() - 2f));
|
||||
circleCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
circleCloseButton.setName("circleCloseButton");
|
||||
circleCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||
closableTabsToolBar.add(circleCloseButton);
|
||||
|
||||
//---- redCrossCloseButton ----
|
||||
redCrossCloseButton.setText("red cross");
|
||||
redCrossCloseButton.setFont(redCrossCloseButton.getFont().deriveFont(redCrossCloseButton.getFont().getSize() - 2f));
|
||||
redCrossCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
redCrossCloseButton.setName("redCrossCloseButton");
|
||||
redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||
closableTabsToolBar.add(redCrossCloseButton);
|
||||
@@ -605,7 +605,7 @@ class TabsPanel
|
||||
|
||||
//---- tabAreaComponentsLabel ----
|
||||
tabAreaComponentsLabel.setText("Custom tab area components");
|
||||
tabAreaComponentsLabel.setFont(tabAreaComponentsLabel.getFont().deriveFont(tabAreaComponentsLabel.getFont().getSize() + 4f));
|
||||
tabAreaComponentsLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabAreaComponentsLabel.setName("tabAreaComponentsLabel");
|
||||
panel1.add(tabAreaComponentsLabel, "cell 0 7");
|
||||
|
||||
@@ -617,16 +617,16 @@ class TabsPanel
|
||||
|
||||
//---- leadingComponentButton ----
|
||||
leadingComponentButton.setText("leading");
|
||||
leadingComponentButton.setFont(leadingComponentButton.getFont().deriveFont(leadingComponentButton.getFont().getSize() - 2f));
|
||||
leadingComponentButton.setSelected(true);
|
||||
leadingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
leadingComponentButton.setName("leadingComponentButton");
|
||||
leadingComponentButton.addActionListener(e -> customComponentsChanged());
|
||||
tabAreaComponentsToolBar.add(leadingComponentButton);
|
||||
|
||||
//---- trailingComponentButton ----
|
||||
trailingComponentButton.setText("trailing");
|
||||
trailingComponentButton.setFont(trailingComponentButton.getFont().deriveFont(trailingComponentButton.getFont().getSize() - 2f));
|
||||
trailingComponentButton.setSelected(true);
|
||||
trailingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
trailingComponentButton.setName("trailingComponentButton");
|
||||
trailingComponentButton.addActionListener(e -> customComponentsChanged());
|
||||
tabAreaComponentsToolBar.add(trailingComponentButton);
|
||||
@@ -664,14 +664,14 @@ class TabsPanel
|
||||
|
||||
//---- tabIconPlacementLabel ----
|
||||
tabIconPlacementLabel.setText("Tab icon placement");
|
||||
tabIconPlacementLabel.setFont(tabIconPlacementLabel.getFont().deriveFont(tabIconPlacementLabel.getFont().getSize() + 4f));
|
||||
tabIconPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabIconPlacementLabel.setName("tabIconPlacementLabel");
|
||||
panel2.add(tabIconPlacementLabel, "cell 0 0");
|
||||
|
||||
//---- tabIconPlacementNodeLabel ----
|
||||
tabIconPlacementNodeLabel.setText("(top/bottom/leading/trailing)");
|
||||
tabIconPlacementNodeLabel.setEnabled(false);
|
||||
tabIconPlacementNodeLabel.setFont(tabIconPlacementNodeLabel.getFont().deriveFont(tabIconPlacementNodeLabel.getFont().getSize() - 2f));
|
||||
tabIconPlacementNodeLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabIconPlacementNodeLabel.setName("tabIconPlacementNodeLabel");
|
||||
panel2.add(tabIconPlacementNodeLabel, "cell 0 1");
|
||||
|
||||
@@ -701,14 +701,14 @@ class TabsPanel
|
||||
|
||||
//---- tabAreaAlignmentLabel ----
|
||||
tabAreaAlignmentLabel.setText("Tab area alignment");
|
||||
tabAreaAlignmentLabel.setFont(tabAreaAlignmentLabel.getFont().deriveFont(tabAreaAlignmentLabel.getFont().getSize() + 4f));
|
||||
tabAreaAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabAreaAlignmentLabel.setName("tabAreaAlignmentLabel");
|
||||
panel2.add(tabAreaAlignmentLabel, "cell 0 6");
|
||||
|
||||
//---- tabAreaAlignmentNoteLabel ----
|
||||
tabAreaAlignmentNoteLabel.setText("(leading/center/trailing/fill)");
|
||||
tabAreaAlignmentNoteLabel.setEnabled(false);
|
||||
tabAreaAlignmentNoteLabel.setFont(tabAreaAlignmentNoteLabel.getFont().deriveFont(tabAreaAlignmentNoteLabel.getFont().getSize() - 2f));
|
||||
tabAreaAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabAreaAlignmentNoteLabel.setName("tabAreaAlignmentNoteLabel");
|
||||
panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7");
|
||||
|
||||
@@ -759,14 +759,14 @@ class TabsPanel
|
||||
|
||||
//---- tabWidthModeLabel ----
|
||||
tabWidthModeLabel.setText("Tab width mode");
|
||||
tabWidthModeLabel.setFont(tabWidthModeLabel.getFont().deriveFont(tabWidthModeLabel.getFont().getSize() + 4f));
|
||||
tabWidthModeLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabWidthModeLabel.setName("tabWidthModeLabel");
|
||||
panel3.add(tabWidthModeLabel, "cell 0 0");
|
||||
|
||||
//---- tabWidthModeNoteLabel ----
|
||||
tabWidthModeNoteLabel.setText("(preferred/equal/compact)");
|
||||
tabWidthModeNoteLabel.setFont(tabWidthModeNoteLabel.getFont().deriveFont(tabWidthModeNoteLabel.getFont().getSize() - 2f));
|
||||
tabWidthModeNoteLabel.setEnabled(false);
|
||||
tabWidthModeNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabWidthModeNoteLabel.setName("tabWidthModeNoteLabel");
|
||||
panel3.add(tabWidthModeNoteLabel, "cell 0 1");
|
||||
|
||||
@@ -790,7 +790,7 @@ class TabsPanel
|
||||
|
||||
//---- minMaxTabWidthLabel ----
|
||||
minMaxTabWidthLabel.setText("Minimum/maximum tab width");
|
||||
minMaxTabWidthLabel.setFont(minMaxTabWidthLabel.getFont().deriveFont(minMaxTabWidthLabel.getFont().getSize() + 4f));
|
||||
minMaxTabWidthLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
minMaxTabWidthLabel.setName("minMaxTabWidthLabel");
|
||||
panel3.add(minMaxTabWidthLabel, "cell 0 5");
|
||||
|
||||
@@ -808,7 +808,7 @@ class TabsPanel
|
||||
|
||||
//---- tabAlignmentLabel ----
|
||||
tabAlignmentLabel.setText("Tab title alignment");
|
||||
tabAlignmentLabel.setFont(tabAlignmentLabel.getFont().deriveFont(tabAlignmentLabel.getFont().getSize() + 4f));
|
||||
tabAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||
tabAlignmentLabel.setName("tabAlignmentLabel");
|
||||
panel3.add(tabAlignmentLabel, "cell 0 8");
|
||||
|
||||
@@ -829,14 +829,14 @@ class TabsPanel
|
||||
//---- tabAlignmentNoteLabel ----
|
||||
tabAlignmentNoteLabel.setText("(leading/center/trailing)");
|
||||
tabAlignmentNoteLabel.setEnabled(false);
|
||||
tabAlignmentNoteLabel.setFont(tabAlignmentNoteLabel.getFont().deriveFont(tabAlignmentNoteLabel.getFont().getSize() - 2f));
|
||||
tabAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabAlignmentNoteLabel.setName("tabAlignmentNoteLabel");
|
||||
panel5.add(tabAlignmentNoteLabel, "cell 0 0");
|
||||
|
||||
//---- tabAlignmentNoteLabel2 ----
|
||||
tabAlignmentNoteLabel2.setText("(trailing)");
|
||||
tabAlignmentNoteLabel2.setEnabled(false);
|
||||
tabAlignmentNoteLabel2.setFont(tabAlignmentNoteLabel2.getFont().deriveFont(tabAlignmentNoteLabel2.getFont().getSize() - 2f));
|
||||
tabAlignmentNoteLabel2.putClientProperty("FlatLaf.styleClass", "small");
|
||||
tabAlignmentNoteLabel2.setName("tabAlignmentNoteLabel2");
|
||||
panel5.add(tabAlignmentNoteLabel2, "cell 1 0,alignx right,growx 0");
|
||||
|
||||
@@ -901,22 +901,22 @@ class TabsPanel
|
||||
|
||||
//---- scrollAsNeededSingleButton ----
|
||||
scrollAsNeededSingleButton.setText("asNeededSingle");
|
||||
scrollAsNeededSingleButton.setFont(scrollAsNeededSingleButton.getFont().deriveFont(scrollAsNeededSingleButton.getFont().getSize() - 2f));
|
||||
scrollAsNeededSingleButton.setSelected(true);
|
||||
scrollAsNeededSingleButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollAsNeededSingleButton.setName("scrollAsNeededSingleButton");
|
||||
scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||
scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton);
|
||||
|
||||
//---- scrollAsNeededButton ----
|
||||
scrollAsNeededButton.setText("asNeeded");
|
||||
scrollAsNeededButton.setFont(scrollAsNeededButton.getFont().deriveFont(scrollAsNeededButton.getFont().getSize() - 2f));
|
||||
scrollAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollAsNeededButton.setName("scrollAsNeededButton");
|
||||
scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||
scrollButtonsPolicyToolBar.add(scrollAsNeededButton);
|
||||
|
||||
//---- scrollNeverButton ----
|
||||
scrollNeverButton.setText("never");
|
||||
scrollNeverButton.setFont(scrollNeverButton.getFont().deriveFont(scrollNeverButton.getFont().getSize() - 2f));
|
||||
scrollNeverButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollNeverButton.setName("scrollNeverButton");
|
||||
scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||
scrollButtonsPolicyToolBar.add(scrollNeverButton);
|
||||
@@ -936,15 +936,15 @@ class TabsPanel
|
||||
|
||||
//---- scrollBothButton ----
|
||||
scrollBothButton.setText("both");
|
||||
scrollBothButton.setFont(scrollBothButton.getFont().deriveFont(scrollBothButton.getFont().getSize() - 2f));
|
||||
scrollBothButton.setSelected(true);
|
||||
scrollBothButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollBothButton.setName("scrollBothButton");
|
||||
scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged());
|
||||
scrollButtonsPlacementToolBar.add(scrollBothButton);
|
||||
|
||||
//---- scrollTrailingButton ----
|
||||
scrollTrailingButton.setText("trailing");
|
||||
scrollTrailingButton.setFont(scrollTrailingButton.getFont().deriveFont(scrollTrailingButton.getFont().getSize() - 2f));
|
||||
scrollTrailingButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
scrollTrailingButton.setName("scrollTrailingButton");
|
||||
scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged());
|
||||
scrollButtonsPlacementToolBar.add(scrollTrailingButton);
|
||||
@@ -970,15 +970,15 @@ class TabsPanel
|
||||
|
||||
//---- popupAsNeededButton ----
|
||||
popupAsNeededButton.setText("asNeeded");
|
||||
popupAsNeededButton.setFont(popupAsNeededButton.getFont().deriveFont(popupAsNeededButton.getFont().getSize() - 2f));
|
||||
popupAsNeededButton.setSelected(true);
|
||||
popupAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
popupAsNeededButton.setName("popupAsNeededButton");
|
||||
popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged());
|
||||
tabsPopupPolicyToolBar.add(popupAsNeededButton);
|
||||
|
||||
//---- popupNeverButton ----
|
||||
popupNeverButton.setText("never");
|
||||
popupNeverButton.setFont(popupNeverButton.getFont().deriveFont(popupNeverButton.getFont().getSize() - 2f));
|
||||
popupNeverButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
popupNeverButton.setName("popupNeverButton");
|
||||
popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged());
|
||||
tabsPopupPolicyToolBar.add(popupNeverButton);
|
||||
@@ -997,15 +997,15 @@ class TabsPanel
|
||||
|
||||
//---- underlinedTabTypeButton ----
|
||||
underlinedTabTypeButton.setText("underlined");
|
||||
underlinedTabTypeButton.setFont(underlinedTabTypeButton.getFont().deriveFont(underlinedTabTypeButton.getFont().getSize() - 2f));
|
||||
underlinedTabTypeButton.setSelected(true);
|
||||
underlinedTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
underlinedTabTypeButton.setName("underlinedTabTypeButton");
|
||||
underlinedTabTypeButton.addActionListener(e -> tabTypeChanged());
|
||||
tabTypeToolBar.add(underlinedTabTypeButton);
|
||||
|
||||
//---- cardTabTypeButton ----
|
||||
cardTabTypeButton.setText("card");
|
||||
cardTabTypeButton.setFont(cardTabTypeButton.getFont().deriveFont(cardTabTypeButton.getFont().getSize() - 2f));
|
||||
cardTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||
cardTabTypeButton.setName("cardTabTypeButton");
|
||||
cardTabTypeButton.addActionListener(e -> tabTypeChanged());
|
||||
tabTypeToolBar.add(cardTabTypeButton);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.2.0.298" Java: "15" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "7.0.5.0.382" Java: "16" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -22,7 +22,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "tabPlacementLabel"
|
||||
"text": "Tab placement"
|
||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -38,28 +38,28 @@ new FormModel {
|
||||
"text": "top"
|
||||
"selected": true
|
||||
"$buttonGroup": new FormReference( "tabPlacementButtonGroup" )
|
||||
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "bottomPlacementButton"
|
||||
"text": "bottom"
|
||||
"$buttonGroup": new FormReference( "tabPlacementButtonGroup" )
|
||||
"font": #SwingDerivedFont0
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "leftPlacementButton"
|
||||
"text": "left"
|
||||
"$buttonGroup": new FormReference( "tabPlacementButtonGroup" )
|
||||
"font": #SwingDerivedFont0
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "rightPlacementButton"
|
||||
"text": "right"
|
||||
"$buttonGroup": new FormReference( "tabPlacementButtonGroup" )
|
||||
"font": #SwingDerivedFont0
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabPlacementChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToolBar$Separator" ) {
|
||||
@@ -68,13 +68,13 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "scrollButton"
|
||||
"text": "scroll"
|
||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "borderButton"
|
||||
"text": "border"
|
||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "borderChanged", false ) )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
@@ -88,7 +88,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "tabLayoutLabel"
|
||||
"text": "Tab layout"
|
||||
"font": &SwingDerivedFont1 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -103,15 +103,15 @@ new FormModel {
|
||||
name: "scrollTabLayoutButton"
|
||||
"text": "scroll"
|
||||
"$buttonGroup": new FormReference( "tabLayoutButtonGroup" )
|
||||
"font": &SwingDerivedFont2 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"selected": true
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabLayoutChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "wrapTabLayoutButton"
|
||||
"text": "wrap"
|
||||
"$buttonGroup": new FormReference( "tabLayoutButtonGroup" )
|
||||
"font": #SwingDerivedFont2
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabLayoutChanged", false ) )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
@@ -121,7 +121,7 @@ new FormModel {
|
||||
name: "scrollLayoutNoteLabel"
|
||||
"text": "(use mouse wheel to scroll; arrow button shows hidden tabs)"
|
||||
"enabled": false
|
||||
"font": &SwingDerivedFont3 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 3"
|
||||
} )
|
||||
@@ -129,7 +129,7 @@ new FormModel {
|
||||
name: "wrapLayoutNoteLabel"
|
||||
"text": "(probably better to use scroll layout?)"
|
||||
"enabled": false
|
||||
"font": #SwingDerivedFont3
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 3"
|
||||
} )
|
||||
@@ -146,7 +146,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "closableTabsLabel"
|
||||
"text": "Closable tabs"
|
||||
"font": #SwingDerivedFont1
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -160,23 +160,23 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "squareCloseButton"
|
||||
"text": "square"
|
||||
"font": &SwingDerivedFont4 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"$buttonGroup": new FormReference( "closableTabsButtonGroup" )
|
||||
"selected": true
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "closeButtonStyleChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "circleCloseButton"
|
||||
"text": "circle"
|
||||
"font": #SwingDerivedFont4
|
||||
"$buttonGroup": new FormReference( "closableTabsButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "closeButtonStyleChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "redCrossCloseButton"
|
||||
"text": "red cross"
|
||||
"font": #SwingDerivedFont4
|
||||
"$buttonGroup": new FormReference( "closableTabsButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "closeButtonStyleChanged", false ) )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
@@ -190,7 +190,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "tabAreaComponentsLabel"
|
||||
"text": "Custom tab area components"
|
||||
"font": #SwingDerivedFont1
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -204,15 +204,15 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "leadingComponentButton"
|
||||
"text": "leading"
|
||||
"font": &SwingDerivedFont5 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"selected": true
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customComponentsChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "trailingComponentButton"
|
||||
"text": "trailing"
|
||||
"font": #SwingDerivedFont5
|
||||
"selected": true
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customComponentsChanged", false ) )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
@@ -238,7 +238,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "tabIconPlacementLabel"
|
||||
"text": "Tab icon placement"
|
||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -249,7 +249,7 @@ new FormModel {
|
||||
name: "tabIconPlacementNodeLabel"
|
||||
"text": "(top/bottom/leading/trailing)"
|
||||
"enabled": false
|
||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -279,7 +279,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "tabAreaAlignmentLabel"
|
||||
"text": "Tab area alignment"
|
||||
"font": &SwingDerivedFont6 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -290,7 +290,7 @@ new FormModel {
|
||||
name: "tabAreaAlignmentNoteLabel"
|
||||
"text": "(leading/center/trailing/fill)"
|
||||
"enabled": false
|
||||
"font": &SwingDerivedFont7 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -332,7 +332,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "tabWidthModeLabel"
|
||||
"text": "Tab width mode"
|
||||
"font": #SwingDerivedFont6
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -342,8 +342,8 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "tabWidthModeNoteLabel"
|
||||
"text": "(preferred/equal/compact)"
|
||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"enabled": false
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -368,7 +368,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "minMaxTabWidthLabel"
|
||||
"text": "Minimum/maximum tab width"
|
||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -388,7 +388,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "tabAlignmentLabel"
|
||||
"text": "Tab title alignment"
|
||||
"font": #SwingDerivedFont6
|
||||
"$client.FlatLaf.styleClass": "h3"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -405,7 +405,7 @@ new FormModel {
|
||||
name: "tabAlignmentNoteLabel"
|
||||
"text": "(leading/center/trailing)"
|
||||
"enabled": false
|
||||
"font": #SwingDerivedFont7
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -416,7 +416,7 @@ new FormModel {
|
||||
name: "tabAlignmentNoteLabel2"
|
||||
"text": "(trailing)"
|
||||
"enabled": false
|
||||
"font": #SwingDerivedFont7
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": true
|
||||
}
|
||||
@@ -477,23 +477,23 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "scrollAsNeededSingleButton"
|
||||
"text": "asNeededSingle"
|
||||
"font": #SwingDerivedFont2
|
||||
"selected": true
|
||||
"$buttonGroup": new FormReference( "scrollButtonsPolicyButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPolicyChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "scrollAsNeededButton"
|
||||
"text": "asNeeded"
|
||||
"font": #SwingDerivedFont2
|
||||
"$buttonGroup": new FormReference( "scrollButtonsPolicyButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPolicyChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "scrollNeverButton"
|
||||
"text": "never"
|
||||
"font": #SwingDerivedFont2
|
||||
"$buttonGroup": new FormReference( "scrollButtonsPolicyButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPolicyChanged", false ) )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
@@ -512,16 +512,16 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "scrollBothButton"
|
||||
"text": "both"
|
||||
"font": #SwingDerivedFont2
|
||||
"selected": true
|
||||
"$buttonGroup": new FormReference( "scrollButtonsPlacementButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPlacementChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "scrollTrailingButton"
|
||||
"text": "trailing"
|
||||
"font": #SwingDerivedFont2
|
||||
"$buttonGroup": new FormReference( "scrollButtonsPlacementButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "scrollButtonsPlacementChanged", false ) )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
@@ -550,16 +550,16 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "popupAsNeededButton"
|
||||
"text": "asNeeded"
|
||||
"font": #SwingDerivedFont2
|
||||
"selected": true
|
||||
"$buttonGroup": new FormReference( "tabsPopupPolicyButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabsPopupPolicyChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "popupNeverButton"
|
||||
"text": "never"
|
||||
"font": #SwingDerivedFont2
|
||||
"$buttonGroup": new FormReference( "tabsPopupPolicyButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabsPopupPolicyChanged", false ) )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
@@ -577,16 +577,16 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "underlinedTabTypeButton"
|
||||
"text": "underlined"
|
||||
"font": &SwingDerivedFont8 new com.jformdesigner.model.SwingDerivedFont( null, 0, -2, false )
|
||||
"selected": true
|
||||
"$buttonGroup": new FormReference( "tabTypeButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabTypeChanged", false ) )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "cardTabTypeButton"
|
||||
"text": "card"
|
||||
"font": #SwingDerivedFont8
|
||||
"$buttonGroup": new FormReference( "tabTypeButtonGroup" )
|
||||
"$client.FlatLaf.styleClass": "small"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabTypeChanged", false ) )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
@@ -597,7 +597,7 @@ new FormModel {
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 1075, 895 )
|
||||
"size": new java.awt.Dimension( 1145, 895 )
|
||||
} )
|
||||
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
||||
name: "tabPlacementButtonGroup"
|
||||
|
||||
Reference in New Issue
Block a user