Interface ThemePreferenceProvider
public interface ThemePreferenceProvider
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturns whether the provider can report changes in system preferences.Get the preferred theme style.voidInitialize all necessary resources.booleanReturns whether changes in theme preference are signaled to the callback.voidsetCallback(Consumer<PreferredThemeStyle> callback)Set the callback for changes is the preferred theme style.voidsetReporting(boolean reporting)Sets whether changes in theme preference should be signaled to the callback.default booleanReturns whether this provider can provide the native accent color value.default booleanReturns whether this provider can provide the native font size.default booleanReturns whether this provider can provide the native selection color value.default booleanReturns 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
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.
-