# Interface Scene.Preferences

Enclosing class:
  `Scene`

public static sealed interface Scene.Preferences
Contains scene preferences that can override `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:
  - `Platform.Preferences`

- ## Property Summary

  Properties
  Type
  Property
  Description
  `ObjectProperty<ColorScheme>`
  `colorScheme`
  Specifies whether the scene should prefer light text on dark backgrounds, or dark text on light backgrounds.
  `ObjectProperty<Boolean>`
  `persistentScrollBars`
  Specifies whether applications should always show scroll bars.
  `ObjectProperty<Boolean>`
  `reducedData`
  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.
  `ObjectProperty<Boolean>`
  `reducedMotion`
  Specifies whether the scene should minimize the amount of non-essential animations, reducing discomfort for users who experience motion sickness or vertigo.
  `ObjectProperty<Boolean>`
  `reducedTransparency`
  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 Type
  Method
  Description
  `ObjectProperty<ColorScheme>`
  `colorSchemeProperty()`
  Specifies whether the scene should prefer light text on dark backgrounds, or dark text on light backgrounds.
  `ColorScheme`
  `getColorScheme()`
  Gets the value of the `colorScheme` property.
  `boolean`
  `isPersistentScrollBars()`
  Gets the value of the `persistentScrollBars` property.
  `boolean`
  `isReducedData()`
  Gets the value of the `reducedData` property.
  `boolean`
  `isReducedMotion()`
  Gets the value of the `reducedMotion` property.
  `boolean`
  `isReducedTransparency()`
  Gets the value of the `reducedTransparency` property.
  `ObjectProperty<Boolean>`
  `persistentScrollBarsProperty()`
  Specifies whether applications should always show scroll bars.
  `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.
  `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.
  `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.
  `void`
  `setColorScheme(ColorScheme colorScheme)`
  Sets the value of the `colorScheme` property.
  `void`
  `setPersistentScrollBars(Boolean value)`
  Sets the value of the `persistentScrollBars` property.
  `void`
  `setReducedData(Boolean value)`
  Sets the value of the `reducedData` property.
  `void`
  `setReducedMotion(Boolean value)`
  Sets the value of the `reducedMotion` property.
  `void`
  `setReducedTransparency(Boolean value)`
  Sets the value of the `reducedTransparency` property.

- ## Property Details

  - ### persistentScrollBars

    ObjectProperty<Boolean> persistentScrollBarsProperty
    Specifies whether applications should always show scroll bars. If set to `false`, 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:
      - `setPersistentScrollBars(Boolean)`
      - `persistentScrollBarsProperty()`

  - ### reducedMotion

    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()`
    See Also:
      - `setReducedMotion(Boolean)`
      - `reducedMotionProperty()`

  - ### reducedTransparency

    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()`
    See Also:
      - `setReducedTransparency(Boolean)`
      - `reducedTransparencyProperty()`

  - ### reducedData

    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()`
    See Also:
      - `setReducedData(Boolean)`
      - `reducedDataProperty()`

  - ### colorScheme

    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()`
    See Also:
      - `getColorScheme()`
      - `setColorScheme(ColorScheme)`
      - `colorSchemeProperty()`

- ## Method Details

  - ### persistentScrollBarsProperty

    ObjectProperty<Boolean> persistentScrollBarsProperty()
    Specifies whether applications should always show scroll bars. If set to `false`, 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:
      - `setPersistentScrollBars(Boolean)`

  - ### isPersistentScrollBars

    boolean isPersistentScrollBars()
    Gets the value of the `persistentScrollBars` property.
    Returns:
      the value of the `persistentScrollBars` property
    See Also:
      - `persistentScrollBarsProperty()`
      - `setPersistentScrollBars(Boolean)`

  - ### setPersistentScrollBars

    void setPersistentScrollBars(Boolean value)
    Sets the value of the `persistentScrollBars` property.
    Parameters:
      `value` - the value
    See Also:
      - `persistentScrollBarsProperty()`
      - `isPersistentScrollBars()`

  - ### 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:
      - `setReducedMotion(Boolean)`

  - ### isReducedMotion

    boolean isReducedMotion()
    Gets the value of the `reducedMotion` property.
    Returns:
      the value of the `reducedMotion` property
    See Also:
      - `reducedMotionProperty()`
      - `setReducedMotion(Boolean)`

  - ### setReducedMotion

    void setReducedMotion(Boolean value)
    Sets the value of the `reducedMotion` property.
    Parameters:
      `value` - the value
    See Also:
      - `reducedMotionProperty()`
      - `isReducedMotion()`

  - ### 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:
      - `setReducedTransparency(Boolean)`

  - ### isReducedTransparency

    boolean isReducedTransparency()
    Gets the value of the `reducedTransparency` property.
    Returns:
      the value of the `reducedTransparency` property
    See Also:
      - `reducedTransparencyProperty()`
      - `setReducedTransparency(Boolean)`

  - ### setReducedTransparency

    void setReducedTransparency(Boolean value)
    Sets the value of the `reducedTransparency` property.
    Parameters:
      `value` - the value
    See Also:
      - `reducedTransparencyProperty()`
      - `isReducedTransparency()`

  - ### 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:
      - `setReducedData(Boolean)`

  - ### isReducedData

    boolean isReducedData()
    Gets the value of the `reducedData` property.
    Returns:
      the value of the `reducedData` property
    See Also:
      - `reducedDataProperty()`
      - `setReducedData(Boolean)`

  - ### setReducedData

    void setReducedData(Boolean value)
    Sets the value of the `reducedData` property.
    Parameters:
      `value` - the value
    See Also:
      - `reducedDataProperty()`
      - `isReducedData()`

  - ### 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()`
      - `setColorScheme(ColorScheme)`

  - ### getColorScheme

    ColorScheme getColorScheme()
    Gets the value of the `colorScheme` 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(ColorScheme)`
      - `colorSchemeProperty()`

  - ### setColorScheme

    void setColorScheme(ColorScheme colorScheme)
    Sets the value of the `colorScheme` 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 the `colorScheme` property
    See Also:
      - `getColorScheme()`
      - `colorSchemeProperty()`