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

public static class IconTheme.Builder<B extends IconTheme.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public IconTheme build()
      Finish building the IconTheme object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to IconTheme.
      Overrides:
      build in class GObject.Builder<B extends IconTheme.Builder<B>>
      Returns:
      a new instance of IconTheme with the properties that were set in the Builder object.
    • setDisplay

      public B setDisplay(Display display)
      The display that this icon theme object is attached to.
      Parameters:
      display - the value for the display property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setResourcePath

      public B setResourcePath(String[] resourcePath)

      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 the resource-path property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSearchPath

      public B setSearchPath(String[] searchPath)

      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 the search-path property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setThemeName

      public B setThemeName(String themeName)

      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 the GtkSettings object associated to the display of the icontheme object.

      Parameters:
      themeName - the value for the theme-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onChanged

      public B onChanged(IconTheme.ChangedCallback handler)

      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: