Interface Scene.Preferences
- Enclosing class:
Scene
platform
preferences.
All preferences are null-coalesting properties: if set to null
(using the setter method,
WritableValue.setValue(Object)
, or with a binding), the property evalutes to the value of the corresponding
platform-provided preference. Likewise, specifying a non-null value for any given property will override the
platform-provided value.
- Since:
- 25
- See Also:
-
Property Summary
PropertiesTypePropertyDescriptionSpecifies whether the scene should prefer light text on dark backgrounds, or dark text on light backgrounds.Specifies whether applications should always show scroll bars.Specifies whether the scene should minimize the amount of internet traffic, which users might request because they are on a metered network or a limited data plan.Specifies whether the scene should minimize the amount of non-essential animations, reducing discomfort for users who experience motion sickness or vertigo.Specifies whether the scene should minimize the amount of transparent or translucent layer effects, which can help to increase contrast and readability for some users. -
Method Summary
Modifier and TypeMethodDescriptionSpecifies whether the scene should prefer light text on dark backgrounds, or dark text on light backgrounds.Gets the value of thecolorScheme
property.boolean
Gets the value of thepersistentScrollBars
property.boolean
Gets the value of thereducedData
property.boolean
Gets the value of thereducedMotion
property.boolean
Gets the value of thereducedTransparency
property.Specifies whether applications should always show scroll bars.Specifies whether the scene should minimize the amount of internet traffic, which users might request because they are on a metered network or a limited data plan.Specifies whether the scene should minimize the amount of non-essential animations, reducing discomfort for users who experience motion sickness or vertigo.Specifies whether the scene should minimize the amount of transparent or translucent layer effects, which can help to increase contrast and readability for some users.void
setColorScheme
(ColorScheme colorScheme) Sets the value of thecolorScheme
property.void
setPersistentScrollBars
(Boolean value) Sets the value of thepersistentScrollBars
property.void
setReducedData
(Boolean value) Sets the value of thereducedData
property.void
setReducedMotion
(Boolean value) Sets the value of thereducedMotion
property.void
setReducedTransparency
(Boolean value) Sets the value of thereducedTransparency
property.
-
Property Details
-
persistentScrollBars
ObjectProperty<Boolean> persistentScrollBarsPropertySpecifies whether applications should always show scroll bars. If set tofalse
, applications may choose to hide scroll bars that are not actively used, or make them smaller or less noticeable.This property corresponds to the
-fx-prefers-persistent-scrollbars
media feature.- Default value:
Platform.Preferences.isPersistentScrollBars()
- See Also:
-
reducedMotion
ObjectProperty<Boolean> reducedMotionPropertySpecifies whether the scene should minimize the amount of non-essential animations, reducing discomfort for users who experience motion sickness or vertigo.This property corresponds to the
prefers-reduced-motion
media feature.- Default value:
Platform.Preferences.isReducedMotion()
- See Also:
-
reducedTransparency
ObjectProperty<Boolean> reducedTransparencyPropertySpecifies whether the scene should minimize the amount of transparent or translucent layer effects, which can help to increase contrast and readability for some users.This property corresponds to the
prefers-reduced-transparency
media feature.- Default value:
Platform.Preferences.isReducedTransparency()
- See Also:
-
reducedData
ObjectProperty<Boolean> reducedDataPropertySpecifies whether the scene should minimize the amount of internet traffic, which users might request because they are on a metered network or a limited data plan.This property corresponds to the
prefers-reduced-data
media feature.- Default value:
Platform.Preferences.isReducedData()
- See Also:
-
colorScheme
ObjectProperty<ColorScheme> colorSchemePropertySpecifies whether the scene should prefer light text on dark backgrounds, or dark text on light backgrounds.This property corresponds to the
prefers-color-scheme
media feature.- Default value:
Platform.Preferences.getColorScheme()
- See Also:
-
-
Method Details
-
persistentScrollBarsProperty
ObjectProperty<Boolean> persistentScrollBarsProperty()Specifies whether applications should always show scroll bars. If set tofalse
, applications may choose to hide scroll bars that are not actively used, or make them smaller or less noticeable.This property corresponds to the
-fx-prefers-persistent-scrollbars
media feature.- Default value:
Platform.Preferences.isPersistentScrollBars()
- Returns:
- the
persistentScrollBars
property - See Also:
-
isPersistentScrollBars
boolean isPersistentScrollBars()Gets the value of thepersistentScrollBars
property.- Returns:
- the value of the
persistentScrollBars
property - See Also:
-
setPersistentScrollBars
Sets the value of thepersistentScrollBars
property.- Parameters:
value
- the value- See Also:
-
reducedMotionProperty
ObjectProperty<Boolean> reducedMotionProperty()Specifies whether the scene should minimize the amount of non-essential animations, reducing discomfort for users who experience motion sickness or vertigo.This property corresponds to the
prefers-reduced-motion
media feature.- Default value:
Platform.Preferences.isReducedMotion()
- Returns:
- the
reducedMotion
property - See Also:
-
isReducedMotion
boolean isReducedMotion()Gets the value of thereducedMotion
property.- Returns:
- the value of the
reducedMotion
property - See Also:
-
setReducedMotion
Sets the value of thereducedMotion
property.- Parameters:
value
- the value- See Also:
-
reducedTransparencyProperty
ObjectProperty<Boolean> reducedTransparencyProperty()Specifies whether the scene should minimize the amount of transparent or translucent layer effects, which can help to increase contrast and readability for some users.This property corresponds to the
prefers-reduced-transparency
media feature.- Default value:
Platform.Preferences.isReducedTransparency()
- Returns:
- the
reducedTransparency
property - See Also:
-
isReducedTransparency
boolean isReducedTransparency()Gets the value of thereducedTransparency
property.- Returns:
- the value of the
reducedTransparency
property - See Also:
-
setReducedTransparency
Sets the value of thereducedTransparency
property.- Parameters:
value
- the value- See Also:
-
reducedDataProperty
ObjectProperty<Boolean> reducedDataProperty()Specifies whether the scene should minimize the amount of internet traffic, which users might request because they are on a metered network or a limited data plan.This property corresponds to the
prefers-reduced-data
media feature.- Default value:
Platform.Preferences.isReducedData()
- Returns:
- the
reducedData
property - See Also:
-
isReducedData
boolean isReducedData()Gets the value of thereducedData
property.- Returns:
- the value of the
reducedData
property - See Also:
-
setReducedData
Sets the value of thereducedData
property.- Parameters:
value
- the value- See Also:
-
colorSchemeProperty
ObjectProperty<ColorScheme> colorSchemeProperty()Specifies whether the scene should prefer light text on dark backgrounds, or dark text on light backgrounds.This property corresponds to the
prefers-color-scheme
media feature.- Default value:
Platform.Preferences.getColorScheme()
- Returns:
- the
colorScheme
property - See Also:
-
getColorScheme
ColorScheme getColorScheme()Gets the value of thecolorScheme
property.- Property description:
- Specifies whether the scene should prefer light text on dark backgrounds, or dark text
on light backgrounds.
This property corresponds to the
prefers-color-scheme
media feature. - Default value:
Platform.Preferences.getColorScheme()
- Returns:
- the value of the
colorScheme
property - See Also:
-
setColorScheme
Sets the value of thecolorScheme
property.- Property description:
- Specifies whether the scene should prefer light text on dark backgrounds, or dark text
on light backgrounds.
This property corresponds to the
prefers-color-scheme
media feature. - Default value:
Platform.Preferences.getColorScheme()
- Parameters:
colorScheme
- the value for thecolorScheme
property- See Also:
-