Class ThemedIcon.Builder<B extends ThemedIcon.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
ThemedIcon

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

      public B setName(String name)
      The icon name.
      Parameters:
      name - the value for the name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setNames

      public B setNames(String[] names)
      A null-terminated array of icon names.
      Parameters:
      names - the value for the names property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUseDefaultFallbacks

      public B setUseDefaultFallbacks(boolean useDefaultFallbacks)

      Whether to use the default fallbacks found by shortening the icon name at '-' characters. If the "names" array has more than one element, ignores any past the first.

      For example, if the icon name was "gnome-dev-cdrom-audio", the array would become

      {
        "gnome-dev-cdrom-audio",
        "gnome-dev-cdrom",
        "gnome-dev",
        "gnome",
        NULL
      };
      
      Parameters:
      useDefaultFallbacks - the value for the use-default-fallbacks property
      Returns:
      the Builder instance is returned, to allow method chaining