Class FontDialogButton.Builder<B extends FontDialogButton.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
FontDialogButton

public static class FontDialogButton.Builder<B extends FontDialogButton.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
4.10
  • Constructor Details

    • Builder

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

    • build

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

      public B setDialog(FontDialog dialog)
      The GtkFontDialog that contains parameters for the font chooser dialog.
      Parameters:
      dialog - the value for the dialog property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setFontDesc

      public B setFontDesc(FontDescription fontDesc)

      The selected font.

      This property can be set to give the button its initial font, and it will be updated to reflect the users choice in the font chooser dialog.

      Listen to notify::font-desc to get informed about changes to the buttons font.

      Parameters:
      fontDesc - the value for the font-desc property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setFontFeatures

      public B setFontFeatures(String fontFeatures)

      The selected font features.

      This property will be updated to reflect the users choice in the font chooser dialog.

      Listen to notify::font-features to get informed about changes to the buttons font features.

      Parameters:
      fontFeatures - the value for the font-features property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setLanguage

      public B setLanguage(Language language)

      The selected language for font features.

      This property will be updated to reflect the users choice in the font chooser dialog.

      Listen to notify::language to get informed about changes to the buttons language.

      Parameters:
      language - the value for the language property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setLevel

      public B setLevel(FontLevel level)
      The level of detail for the font chooser dialog.
      Parameters:
      level - the value for the level property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUseFont

      public B setUseFont(boolean useFont)
      Whether the buttons label will be drawn in the selected font.
      Parameters:
      useFont - the value for the use-font property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUseSize

      public B setUseSize(boolean useSize)
      Whether the buttons label will use the selected font size.
      Parameters:
      useSize - the value for the use-size property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onActivate

      public B onActivate(FontDialogButton.ActivateCallback handler)

      Emitted when the font dialog button is activated.

      The ::activate signal on GtkFontDialogButton is an action signal and emitting it causes the button to pop up its dialog.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.14
      See Also: