Class StyleManager.Builder<B extends StyleManager.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
StyleManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theStyleManagerobject.setColorScheme(ColorScheme colorScheme) The requested application color scheme.setDisplay(Display display) The display the style manager is associated with.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theStyleManagerobject. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])to create a new GObject instance, which is then cast toStyleManager.- Overrides:
buildin classGObject.Builder<B extends StyleManager.Builder<B>>- Returns:
- a new instance of
StyleManagerwith the properties that were set in the Builder object.
-
setColorScheme
The requested application color scheme.The effective appearance will be decided based on the application color scheme and the system preferred color scheme. The
StyleManager:darkproperty can be used to query the current effective appearance.The
ADW_COLOR_SCHEME_PREFER_LIGHTcolor scheme results in the application using light appearance unless the system prefers dark colors. This is the default value.The
ADW_COLOR_SCHEME_PREFER_DARKcolor scheme results in the application using dark appearance, but can still switch to the light appearance if the system can prefers it, for example, when the high contrast preference is enabled.The
ADW_COLOR_SCHEME_FORCE_LIGHTandADW_COLOR_SCHEME_FORCE_DARKvalues ignore the system preference entirely. They are useful if the application wants to match its UI to its content or to provide a separate color scheme switcher.If a per-
Displaystyle manager has its color scheme set toADW_COLOR_SCHEME_DEFAULT, it will inherit the color scheme from the default style manager.For the default style manager,
ADW_COLOR_SCHEME_DEFAULTis equivalent toADW_COLOR_SCHEME_PREFER_LIGHT.The
StyleManager:system-supports-color-schemesproperty can be used to check if the current environment provides a color scheme preference.- Parameters:
colorScheme- the value for thecolor-schemeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setDisplay
The display the style manager is associated with.The display will be
NULLfor the style manager returned byStyleManager.getDefault().- Parameters:
display- the value for thedisplayproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-