mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
SwingX: test JXStatusBar (issue #492)
This commit is contained in:
@@ -4,7 +4,7 @@ FlatLaf addon for SwingX
|
|||||||
This addon for FlatLaf adds support for **some** widely used SwingX components.
|
This addon for FlatLaf adds support for **some** widely used SwingX components.
|
||||||
|
|
||||||
Many SwingX components that do not use UI delegates (e.g. `JXButton`, `JXLabel`,
|
Many SwingX components that do not use UI delegates (e.g. `JXButton`, `JXLabel`,
|
||||||
`JXList`, etc) work with FlatLaf without adaptation.
|
`JXList`, `JXStatusBar`, etc) work with FlatLaf without adaptation.
|
||||||
|
|
||||||
Following SwingX components, which use UI delegates, are currently supported by
|
Following SwingX components, which use UI delegates, are currently supported by
|
||||||
this addon:
|
this addon:
|
||||||
|
|||||||
@@ -62,6 +62,13 @@ public class FlatSwingXTest
|
|||||||
monthView1.setUnselectableDates( calendar.getTime() );
|
monthView1.setUnselectableDates( calendar.getTime() );
|
||||||
|
|
||||||
table.setDefaultEditor( Date.class, new DatePickerCellEditor() );
|
table.setDefaultEditor( Date.class, new DatePickerCellEditor() );
|
||||||
|
|
||||||
|
// status bar
|
||||||
|
statusBar1.add( new JLabel( "Ready" ), new JXStatusBar.Constraint( 100 ) );
|
||||||
|
statusBar1.add( new JLabel( "0 files loaded" ), new JXStatusBar.Constraint( 100 ) );
|
||||||
|
JProgressBar statusProgressBar = new JProgressBar();
|
||||||
|
statusProgressBar.setValue( 50 );
|
||||||
|
statusBar1.add( statusProgressBar, new JXStatusBar.Constraint( JXStatusBar.Constraint.ResizeBehavior.FILL ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void busyChanged() {
|
private void busyChanged() {
|
||||||
@@ -129,6 +136,8 @@ public class FlatSwingXTest
|
|||||||
JXSearchField xSearchField2 = new JXSearchField();
|
JXSearchField xSearchField2 = new JXSearchField();
|
||||||
JXSearchField xSearchField3 = new JXSearchField();
|
JXSearchField xSearchField3 = new JXSearchField();
|
||||||
JXSearchField xSearchField4 = new JXSearchField();
|
JXSearchField xSearchField4 = new JXSearchField();
|
||||||
|
JLabel label12 = new JLabel();
|
||||||
|
statusBar1 = new JXStatusBar();
|
||||||
JButton button1 = new JButton();
|
JButton button1 = new JButton();
|
||||||
JButton button2 = new JButton();
|
JButton button2 = new JButton();
|
||||||
|
|
||||||
@@ -153,6 +162,7 @@ public class FlatSwingXTest
|
|||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
|
"[]" +
|
||||||
"[37]"));
|
"[37]"));
|
||||||
|
|
||||||
//---- label1 ----
|
//---- label1 ----
|
||||||
@@ -456,6 +466,11 @@ public class FlatSwingXTest
|
|||||||
xSearchField4.setText("abc");
|
xSearchField4.setText("abc");
|
||||||
add(xSearchField4, "cell 2 10,growx");
|
add(xSearchField4, "cell 2 10,growx");
|
||||||
|
|
||||||
|
//---- label12 ----
|
||||||
|
label12.setText("JXStatusBar:");
|
||||||
|
add(label12, "cell 0 11");
|
||||||
|
add(statusBar1, "cell 1 11 3 1,grow");
|
||||||
|
|
||||||
//---- button1 ----
|
//---- button1 ----
|
||||||
button1.setText("<");
|
button1.setText("<");
|
||||||
|
|
||||||
@@ -476,5 +491,6 @@ public class FlatSwingXTest
|
|||||||
private JXBusyLabel xBusyLabel2;
|
private JXBusyLabel xBusyLabel2;
|
||||||
private JCheckBox busyCheckBox;
|
private JCheckBox busyCheckBox;
|
||||||
private JTable table;
|
private JTable table;
|
||||||
|
private JXStatusBar statusBar1;
|
||||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JFDML JFormDesigner: "7.0.4.0.360" Java: "16" encoding: "UTF-8"
|
JFDML JFormDesigner: "7.0.5.0.404" Java: "17" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
@@ -9,7 +9,7 @@ new FormModel {
|
|||||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[left][][][][fill]"
|
"$columnConstraints": "[left][][][][fill]"
|
||||||
"$rowConstraints": "[]0[][]0[top][][][][][][][][37]"
|
"$rowConstraints": "[]0[][]0[top][][][][][][][][][37]"
|
||||||
} ) {
|
} ) {
|
||||||
name: "this"
|
name: "this"
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
@@ -388,9 +388,23 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 10,growx"
|
"value": "cell 2 10,growx"
|
||||||
} )
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "label12"
|
||||||
|
"text": "JXStatusBar:"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 11"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "org.jdesktop.swingx.JXStatusBar" ) {
|
||||||
|
name: "statusBar1"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 11 3 1,grow"
|
||||||
|
} )
|
||||||
}, 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( 700, 600 )
|
"size": new java.awt.Dimension( 795, 600 )
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JButton" ) {
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
name: "button1"
|
name: "button1"
|
||||||
|
|||||||
Reference in New Issue
Block a user