Interface ThemePreferenceProvider


public interface ThemePreferenceProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns whether the provider can report changes in system preferences.
    Get the preferred theme style.
    void
    Initialize all necessary resources.
    boolean
    Returns whether changes in theme preference are signaled to the callback.
    void
    Set the callback for changes is the preferred theme style.
    void
    setReporting​(boolean reporting)
    Sets whether changes in theme preference should be signaled to the callback.
    default boolean
    Returns whether this provider can provide the native accent color value.
    default boolean
    Returns whether this provider can provide the native font size.
    default boolean
    Returns whether this provider can provide the native selection color value.
    default boolean
    Returns whether this provider can provide the native theme preferences.
  • Method Details

    • getPreference

      PreferredThemeStyle getPreference()
      Get the preferred theme style.
      Returns:
      the preferred theme style.
    • initialize

      void initialize()
      Initialize all necessary resources.
    • setCallback

      void setCallback(Consumer<PreferredThemeStyle> callback)
      Set the callback for changes is the preferred theme style.
      Parameters:
      callback - the callback.
    • setReporting

      void setReporting(boolean reporting)
      Sets whether changes in theme preference should be signaled to the callback.
      See Also:
      setCallback(Consumer)
    • isReporting

      boolean isReporting()
      Returns whether changes in theme preference are signaled to the callback.
      Returns:
      true if changes are reported.
      See Also:
      setCallback(Consumer)
    • canReport

      default boolean canReport()
      Returns whether the provider can report changes in system preferences.
      Returns:
      true if reporting is supported.
    • supportsNativeAccentColor

      default boolean supportsNativeAccentColor()
      Returns whether this provider can provide the native accent color value.
      Returns:
      true if supported.
    • supportsNativeSelectionColor

      default boolean supportsNativeSelectionColor()
      Returns whether this provider can provide the native selection color value.
      Returns:
      true if supported.
    • supportsNativeFontSize

      default boolean supportsNativeFontSize()
      Returns whether this provider can provide the native font size.
      Returns:
      true if supported.
    • supportsNativeTheme

      default boolean supportsNativeTheme()
      Returns whether this provider can provide the native theme preferences.
      Returns:
      true if supported.