Interface ThemePreferenceProvider
-
public interface ThemePreferenceProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancanReport()Returns whether the provider can report changes in system preferences.PreferredThemeStylegetPreference()Get the preferred theme style.voidinitialize()Initialize all necessary resources.booleanisReporting()Returns 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 booleansupportsNativeAccentColor()Returns whether this provider can provide the native accent color value.default booleansupportsNativeFontSize()Returns whether this provider can provide the native font size.default booleansupportsNativeSelectionColor()Returns whether this provider can provide the native selection color value.default booleansupportsNativeTheme()Returns whether this provider can provide the native theme preferences.
-
-
-
Method Detail
-
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.
-
-