Window decorations: require Windows 10 (issues #47 and #82)

This commit is contained in:
Karl Tauber
2020-05-31 15:31:28 +02:00
parent 10c948d33c
commit 16d2e27d05

View File

@@ -115,15 +115,17 @@ public abstract class FlatLaf
/** /**
* Returns whether FlatLaf supports custom window decorations. * Returns whether FlatLaf supports custom window decorations.
* This depends on the operating system and on the used Java runtime.
* <p> * <p>
* To use custom window decorations in your application, enable them with * To use custom window decorations in your application, enable them with
* (before creating any frames or dialogs): * following code (before creating any frames or dialogs). Then custom window
* decorations are only enabled if this method returns {@code true}.
* <pre> * <pre>
* JFrame.setDefaultLookAndFeelDecorated( true ); * JFrame.setDefaultLookAndFeelDecorated( true );
* JDialog.setDefaultLookAndFeelDecorated( true ); * JDialog.setDefaultLookAndFeelDecorated( true );
* </pre> * </pre>
* <p> * <p>
* Returns {@code true} on Windows, {@code false} otherwise. * Returns {@code true} on Windows 10, {@code false} otherwise.
* <p> * <p>
* Return also {@code false} if running on Windows 10 in * Return also {@code false} if running on Windows 10 in
* <a href="https://confluence.jetbrains.com/display/JBR/JetBrains+Runtime">JetBrains Runtime 11 (or later)</a> * <a href="https://confluence.jetbrains.com/display/JBR/JetBrains+Runtime">JetBrains Runtime 11 (or later)</a>
@@ -139,7 +141,7 @@ public abstract class FlatLaf
JBRCustomDecorations.isSupported() ) JBRCustomDecorations.isSupported() )
return false; return false;
return SystemInfo.IS_WINDOWS; return SystemInfo.IS_WINDOWS_10_OR_LATER;
} }
@Override @Override