mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 22:47:13 -06:00
Window decorations: title bar was not hidden if window is in full-screen mode (issue #212)
This commit is contained in:
@@ -186,6 +186,13 @@ public class FlatWindowDecorationsTest
|
||||
}
|
||||
}
|
||||
|
||||
private void fullScreenChanged() {
|
||||
boolean fullScreen = fullScreenCheckBox.isSelected();
|
||||
|
||||
GraphicsDevice gd = getGraphicsConfiguration().getDevice();
|
||||
gd.setFullScreenWindow( fullScreen ? SwingUtilities.windowForComponent( this ) : null );
|
||||
}
|
||||
|
||||
private void menuItemActionPerformed(ActionEvent e) {
|
||||
SwingUtilities.invokeLater( () -> {
|
||||
JOptionPane.showMessageDialog( this, e.getActionCommand(), "Menu Item", JOptionPane.PLAIN_MESSAGE );
|
||||
@@ -263,6 +270,7 @@ public class FlatWindowDecorationsTest
|
||||
resizableCheckBox = new JCheckBox();
|
||||
maximizedBoundsCheckBox = new JCheckBox();
|
||||
undecoratedCheckBox = new JCheckBox();
|
||||
fullScreenCheckBox = new JCheckBox();
|
||||
JLabel label1 = new JLabel();
|
||||
JLabel label2 = new JLabel();
|
||||
JPanel panel1 = new JPanel();
|
||||
@@ -372,6 +380,11 @@ public class FlatWindowDecorationsTest
|
||||
undecoratedCheckBox.addActionListener(e -> undecoratedChanged());
|
||||
add(undecoratedCheckBox, "cell 0 4");
|
||||
|
||||
//---- fullScreenCheckBox ----
|
||||
fullScreenCheckBox.setText("full screen");
|
||||
fullScreenCheckBox.addActionListener(e -> fullScreenChanged());
|
||||
add(fullScreenCheckBox, "cell 1 4");
|
||||
|
||||
//---- label1 ----
|
||||
label1.setText("Style:");
|
||||
add(label1, "cell 0 5");
|
||||
@@ -677,6 +690,7 @@ public class FlatWindowDecorationsTest
|
||||
private JCheckBox resizableCheckBox;
|
||||
private JCheckBox maximizedBoundsCheckBox;
|
||||
private JCheckBox undecoratedCheckBox;
|
||||
private JCheckBox fullScreenCheckBox;
|
||||
private JRadioButton styleNoneRadioButton;
|
||||
private JRadioButton styleFrameRadioButton;
|
||||
private JRadioButton stylePlainRadioButton;
|
||||
|
||||
@@ -106,6 +106,16 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 4"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||
name: "fullScreenCheckBox"
|
||||
"text": "full screen"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": false
|
||||
}
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "fullScreenChanged", false ) )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 4"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label1"
|
||||
"text": "Style:"
|
||||
|
||||
Reference in New Issue
Block a user