mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Demo: added insets to ControlBar to avoid clipping of outline focus border
This commit is contained in:
@@ -240,7 +240,7 @@ class ControlBar
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
"insets 0",
|
||||
"insets dialog",
|
||||
// columns
|
||||
"[fill]" +
|
||||
"[fill]" +
|
||||
@@ -248,7 +248,7 @@ class ControlBar
|
||||
"[grow,fill]" +
|
||||
"[button,fill]",
|
||||
// rows
|
||||
"[20,bottom]" +
|
||||
"[bottom]" +
|
||||
"[]"));
|
||||
add(separator1, "cell 0 0 5 1");
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets 0"
|
||||
"$layoutConstraints": "insets dialog"
|
||||
"$columnConstraints": "[fill][fill][fill][grow,fill][button,fill]"
|
||||
"$rowSpecs": "[fill]"
|
||||
"$rowConstraints": "[20,bottom][]"
|
||||
"$rowConstraints": "[bottom][]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JSeparator" ) {
|
||||
@@ -56,7 +56,7 @@ new FormModel {
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 398, 45 )
|
||||
"size": new java.awt.Dimension( 398, 95 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,8 +228,7 @@ class DemoFrame
|
||||
// columns
|
||||
"[grow,fill]",
|
||||
// rows
|
||||
"[grow,fill]" +
|
||||
"[]"));
|
||||
"[grow,fill]"));
|
||||
|
||||
//======== tabbedPane ========
|
||||
{
|
||||
@@ -241,9 +240,9 @@ class DemoFrame
|
||||
tabbedPane.addTab("Option Pane", optionPanePanel);
|
||||
}
|
||||
contentPanel.add(tabbedPane, "cell 0 0");
|
||||
contentPanel.add(controlBar, "cell 0 1");
|
||||
}
|
||||
contentPane.add(contentPanel, BorderLayout.CENTER);
|
||||
contentPane.add(controlBar, BorderLayout.SOUTH);
|
||||
|
||||
//---- buttonGroup1 ----
|
||||
ButtonGroup buttonGroup1 = new ButtonGroup();
|
||||
|
||||
@@ -52,7 +52,7 @@ new FormModel {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||
"$columnConstraints": "[grow,fill]"
|
||||
"$rowConstraints": "[grow,fill][]"
|
||||
"$rowConstraints": "[grow,fill]"
|
||||
} ) {
|
||||
name: "contentPanel"
|
||||
add( new FormContainer( "javax.swing.JTabbedPane", new FormLayoutManager( class javax.swing.JTabbedPane ) ) {
|
||||
@@ -89,17 +89,17 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 0"
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.demo.ControlBar" ) {
|
||||
name: "controlBar"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": false
|
||||
}
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 1"
|
||||
} )
|
||||
}, new FormLayoutConstraints( class java.lang.String ) {
|
||||
"value": "Center"
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.demo.ControlBar" ) {
|
||||
name: "controlBar"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": false
|
||||
}
|
||||
}, new FormLayoutConstraints( class java.lang.String ) {
|
||||
"value": "South"
|
||||
} )
|
||||
menuBar: new FormContainer( "javax.swing.JMenuBar", new FormLayoutManager( class javax.swing.JMenuBar ) ) {
|
||||
name: "menuBar1"
|
||||
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
||||
|
||||
Reference in New Issue
Block a user