mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06:00
Demo: exit even if UI defaults inspector window is shown
This commit is contained in:
@@ -69,6 +69,13 @@ class DemoFrame
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
|
||||||
|
System.exit( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
private void showHints() {
|
private void showHints() {
|
||||||
Hint fontMenuHint = new Hint(
|
Hint fontMenuHint = new Hint(
|
||||||
"Use 'Font' menu to increase/decrease font size or try different fonts.",
|
"Use 'Font' menu to increase/decrease font size or try different fonts.",
|
||||||
@@ -109,7 +116,7 @@ class DemoFrame
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void exitActionPerformed() {
|
private void exitActionPerformed() {
|
||||||
System.exit( 0 );
|
dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void aboutActionPerformed() {
|
private void aboutActionPerformed() {
|
||||||
@@ -337,7 +344,7 @@ class DemoFrame
|
|||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setTitle("FlatLaf Demo");
|
setTitle("FlatLaf Demo");
|
||||||
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
Container contentPane = getContentPane();
|
Container contentPane = getContentPane();
|
||||||
contentPane.setLayout(new BorderLayout());
|
contentPane.setLayout(new BorderLayout());
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ new FormModel {
|
|||||||
add( new FormWindow( "javax.swing.JFrame", new FormLayoutManager( class java.awt.BorderLayout ) ) {
|
add( new FormWindow( "javax.swing.JFrame", new FormLayoutManager( class java.awt.BorderLayout ) ) {
|
||||||
name: "this"
|
name: "this"
|
||||||
"title": "FlatLaf Demo"
|
"title": "FlatLaf Demo"
|
||||||
"defaultCloseOperation": 3
|
"defaultCloseOperation": 2
|
||||||
"$locationPolicy": 2
|
"$locationPolicy": 2
|
||||||
"$sizePolicy": 2
|
"$sizePolicy": 2
|
||||||
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||||
|
|||||||
@@ -253,6 +253,13 @@ public class FlatTestFrame
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
|
||||||
|
System.exit( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
private void updateTitle() {
|
private void updateTitle() {
|
||||||
double systemScaleFactor = UIScale.getSystemScaleFactor( getGraphicsConfiguration() );
|
double systemScaleFactor = UIScale.getSystemScaleFactor( getGraphicsConfiguration() );
|
||||||
float userScaleFactor = UIScale.getUserScaleFactor();
|
float userScaleFactor = UIScale.getUserScaleFactor();
|
||||||
@@ -637,7 +644,7 @@ public class FlatTestFrame
|
|||||||
themesPanel = new IJThemesPanel();
|
themesPanel = new IJThemesPanel();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
Container contentPane = getContentPane();
|
Container contentPane = getContentPane();
|
||||||
contentPane.setLayout(new BorderLayout());
|
contentPane.setLayout(new BorderLayout());
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ new FormModel {
|
|||||||
name: "this"
|
name: "this"
|
||||||
"$locationPolicy": 2
|
"$locationPolicy": 2
|
||||||
"$sizePolicy": 2
|
"$sizePolicy": 2
|
||||||
"defaultCloseOperation": 3
|
"defaultCloseOperation": 2
|
||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
|
||||||
name: "dialogPane"
|
name: "dialogPane"
|
||||||
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 ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user