Interface FlatSystemProperties
-
public interface FlatSystemPropertiesDefines/documents own system properties used in FlatLaf.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANIMATIONSpecifies whether animations are enabled.static java.lang.StringMENUBAR_EMBEDDEDSpecifies whether menubar is embedded into custom window decorations.static java.lang.StringUI_SCALESpecifies a custom scale factor used to scale the UI.static java.lang.StringUI_SCALE_ENABLEDSpecifies whether user scaling mode is enabled.static java.lang.StringUSE_JETBRAINS_CUSTOM_DECORATIONSSpecifies whether JetBrains Runtime custom window decorations should be used when creatingJFrameorJDialog.static java.lang.StringUSE_TEXT_Y_CORRECTIONSpecifies whether vertical text position is corrected when UI is scaled on HiDPI screens.static java.lang.StringUSE_UBUNTU_FONTSpecifies whether Ubuntu font should be used on Ubuntu Linux.static java.lang.StringUSE_WINDOW_DECORATIONSSpecifies whether custom look and feel window decorations should be used when creatingJFrameorJDialog.
-
Method Summary
Static Methods Modifier and Type Method Description static booleangetBoolean(java.lang.String key, boolean defaultValue)Checks whether a system property is set and returnstrueif its value is"true"(case-insensitive), otherwise it returnsfalse.static java.lang.BooleangetBooleanStrict(java.lang.String key, java.lang.Boolean defaultValue)Checks whether a system property is set and returnsBoolean.TRUEif its value is"true"(case-insensitive) or returnsBoolean.FALSEif 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
falseandtrue
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
falseandtrue
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 creatingJFrameorJDialog.If this system property is set, FlatLaf invokes
JFrame.setDefaultLookAndFeelDecorated(boolean)andJDialog.setDefaultLookAndFeelDecorated(boolean)on LaF initialization.(requires Window 10)
Allowed Values
falseandtrue
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 creatingJFrameorJDialog. Requires that the application runs in a JetBrains Runtime (based on OpenJDK).Setting this to
trueforces using JetBrains Runtime custom window decorations even if they are not enabled by the application.(requires Window 10)
Allowed Values
falseandtrue
Defaulttrue- See Also:
- Constant Field Values
-
MENUBAR_EMBEDDED
static final java.lang.String MENUBAR_EMBEDDED
Specifies whether menubar is embedded into custom window decorations.(requires Window 10)
Allowed Values
falseandtrue
Defaulttrue- See Also:
- Constant Field Values
-
ANIMATION
static final java.lang.String ANIMATION
Specifies whether animations are enabled.Allowed Values
falseandtrue
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
falseandtrue
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 returnstrueif its value is"true"(case-insensitive), otherwise it returnsfalse. If the system property is not set,defaultValueis returned.
-
getBooleanStrict
static java.lang.Boolean getBooleanStrict(java.lang.String key, java.lang.Boolean defaultValue)Checks whether a system property is set and returnsBoolean.TRUEif its value is"true"(case-insensitive) or returnsBoolean.FALSEif its value is"false"(case-insensitive). OtherwisedefaultValueis returned.
-
-