Class IconTheme.Builder<B extends IconTheme.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
IconTheme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theIconTheme
object.onChanged
(IconTheme.ChangedCallback handler) Emitted when the icon theme changes.setDisplay
(Display display) The display that this icon theme object is attached to.setResourcePath
(String[] resourcePath) Resource paths that will be looked at when looking for icons, similar to search paths.setSearchPath
(String[] searchPath) The search path for this icon theme.setThemeName
(String themeName) The name of the icon theme that is being used.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theIconTheme
object. 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 toIconTheme
.- Overrides:
build
in classGObject.Builder<B extends IconTheme.Builder<B>>
- Returns:
- a new instance of
IconTheme
with the properties that were set in the Builder object.
-
setDisplay
-
setResourcePath
Resource paths that will be looked at when looking for icons, similar to search paths.The resources are considered as part of the hicolor icon theme and must be located in subdirectories that are defined in the hicolor icon theme, such as
@path/16x16/actions/run.png
. Icons that are directly placed in the resource path instead of a subdirectory are also considered as ultimate fallback.- Parameters:
resourcePath
- the value for theresource-path
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSearchPath
The search path for this icon theme.When looking for icons, GTK will search for a subdirectory of one or more of the directories in the search path with the same name as the icon theme containing an index.theme file. (Themes from multiple of the path elements are combined to allow themes to be extended by adding icons in the user’s home directory.)
- Parameters:
searchPath
- the value for thesearch-path
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setThemeName
The name of the icon theme that is being used.Unless set to a different value, this will be the value of the
GtkSettings:gtk-icon-theme-name
property of theGtkSettings
object associated to the display of the icontheme object.- Parameters:
themeName
- the value for thetheme-name
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onChanged
Emitted when the icon theme changes.This can happen because current icon theme is switched or because GTK detects that a change has occurred in the contents of the current icon theme.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-