Interface FlatSystemProperties
-
public interface FlatSystemProperties
Defines/documents own system properties used in FlatLaf.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MENUBAR_EMBEDDED
Specifies whether menubar is embedded into custom window decorations.static java.lang.String
UI_SCALE
Specifies a custom scale factor used to scale the UI.static java.lang.String
UI_SCALE_ENABLED
Specifies whether user scaling mode is enabled.static java.lang.String
USE_JETBRAINS_CUSTOM_DECORATIONS
Specifies whether JetBrains Runtime custom window decorations should be used when creatingJFrame
orJDialog
.static java.lang.String
USE_TEXT_Y_CORRECTION
Specifies whether vertical text position is corrected when UI is scaled on HiDPI screens.static java.lang.String
USE_UBUNTU_FONT
Specifies whether Ubuntu font should be used on Ubuntu Linux.static java.lang.String
USE_WINDOW_DECORATIONS
Specifies whether custom look and feel window decorations should be used when creatingJFrame
orJDialog
.
-
Method Summary
Static Methods Modifier and Type Method Description static boolean
getBoolean(java.lang.String key, boolean defaultValue)
Checks whether a system property is set and returnstrue
if its value is"true"
(case-insensitive), otherwise it returnsfalse
.static java.lang.Boolean
getBooleanStrict(java.lang.String key, java.lang.Boolean defaultValue)
Checks whether a system property is set and returnsBoolean.TRUE
if its value is"true"
(case-insensitive) or returnsBoolean.FALSE
if its value is"false"
(case-insensitive).
-
-
-
Field Detail
-
UI_SCALE
static final java.lang.String UI_SCALE
Specifies a custom scale factor used to scale the UI.If Java runtime scales (Java 9 or later), this scale factor is applied on top of the Java system scale factor. Java 8 does not scale and this scale factor replaces the user scale factor that FlatLaf computes based on the font. To replace the Java 9+ system scale factor, use system property "sun.java2d.uiScale", which has the same syntax as this one.
Allowed Values e.g.
1.5
,1.5x
,150%
or144dpi
(96dpi is 100%)- See Also:
- Constant Field Values
-
UI_SCALE_ENABLED
static final java.lang.String UI_SCALE_ENABLED
Specifies whether user scaling mode is enabled.Allowed Values
false
andtrue
Defaulttrue
- See Also:
- Constant Field Values
-
USE_UBUNTU_FONT
static final java.lang.String USE_UBUNTU_FONT
Specifies whether Ubuntu font should be used on Ubuntu Linux. By default, if not running in a JetBrains Runtime, the Liberation Sans font is used because there are rendering issues (in Java) with Ubuntu fonts.Allowed Values
false
andtrue
Defaultfalse
- See Also:
- Constant Field Values
-
USE_WINDOW_DECORATIONS
static final java.lang.String USE_WINDOW_DECORATIONS
Specifies whether custom look and feel window decorations should be used when creatingJFrame
orJDialog
.If this system property is set, FlatLaf invokes
JFrame.setDefaultLookAndFeelDecorated(boolean)
andJDialog.setDefaultLookAndFeelDecorated(boolean)
on LaF initialization.Allowed Values
false
andtrue
Default none- See Also:
- Constant Field Values
-
USE_JETBRAINS_CUSTOM_DECORATIONS
static final java.lang.String USE_JETBRAINS_CUSTOM_DECORATIONS
Specifies whether JetBrains Runtime custom window decorations should be used when creatingJFrame
orJDialog
. Requires that the application runs in a JetBrains Runtime (based on OpenJDK).Setting this to
true
forces using JetBrains Runtime custom window decorations even if they are not enabled by the application.Allowed Values
false
andtrue
Defaulttrue
- See Also:
- Constant Field Values
-
MENUBAR_EMBEDDED
static final java.lang.String MENUBAR_EMBEDDED
Specifies whether menubar is embedded into custom window decorations.Allowed Values
false
andtrue
Defaulttrue
- See Also:
- Constant Field Values
-
USE_TEXT_Y_CORRECTION
static final java.lang.String USE_TEXT_Y_CORRECTION
Specifies whether vertical text position is corrected when UI is scaled on HiDPI screens.Allowed Values
false
andtrue
Defaulttrue
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBoolean
static boolean getBoolean(java.lang.String key, boolean defaultValue)
Checks whether a system property is set and returnstrue
if its value is"true"
(case-insensitive), otherwise it returnsfalse
. If the system property is not set,defaultValue
is returned.
-
getBooleanStrict
static java.lang.Boolean getBooleanStrict(java.lang.String key, java.lang.Boolean defaultValue)
Checks whether a system property is set and returnsBoolean.TRUE
if its value is"true"
(case-insensitive) or returnsBoolean.FALSE
if its value is"false"
(case-insensitive). OtherwisedefaultValue
is returned.
-
-