Class GtkBuilder.Builder<B extends GtkBuilder.Builder<B>>

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

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

      public B setCurrentObject(GObject currentObject)
      The object the builder is evaluating for.
      Parameters:
      currentObject - the value for the current-object property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setScope

      public B setScope(BuilderScope scope)
      The scope the builder is operating in
      Parameters:
      scope - the value for the scope property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTranslationDomain

      public B setTranslationDomain(String translationDomain)

      The translation domain used when translating property values that have been marked as translatable.

      If the translation domain is null, GtkBuilder uses gettext(), otherwise g_dgettext().

      Parameters:
      translationDomain - the value for the translation-domain property
      Returns:
      the Builder instance is returned, to allow method chaining