Class FontDialog.Builder<B extends FontDialog.Builder<B>>

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

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

      public B setFilter(Filter filter)
      A filter to restrict what fonts are shown in the font chooser dialog.
      Parameters:
      filter - the value for the filter property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setFontMap

      public B setFontMap(FontMap fontMap)

      A custom font map to select fonts from.

      A custom font map can be used to present application-specific fonts instead of or in addition to the normal system fonts.

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

      public B setLanguage(Language language)
      The language for which the font features are selected.
      Parameters:
      language - the value for the language property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setModal

      public B setModal(boolean modal)
      Whether the font chooser dialog is modal.
      Parameters:
      modal - the value for the modal property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setTitle

      public B setTitle(String title)
      A title that may be shown on the font chooser dialog that is presented by FontDialog.chooseFont(Window, FontDescription, Cancellable, AsyncReadyCallback).
      Parameters:
      title - the value for the title property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10