Class ButtonContent.Builder<B extends ButtonContent.Builder<B>>

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

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

      public B setCanShrink(boolean canShrink)

      Whether the button can be smaller than the natural size of its contents.

      If set to TRUE, the label will ellipsize.

      See Gtk.Button:can-shrink.

      Parameters:
      canShrink - the value for the can-shrink property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.4
    • setIconName

      public B setIconName(String iconName)

      The name of the displayed icon.

      If empty, the icon is not shown.

      Parameters:
      iconName - the value for the icon-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setLabel

      public B setLabel(String label)
      The displayed label.
      Parameters:
      label - the value for the label property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUseUnderline

      public B setUseUnderline(boolean useUnderline)

      Whether an underline in the text indicates a mnemonic.

      The mnemonic can be used to activate the parent button.

      See ButtonContent:label.

      Parameters:
      useUnderline - the value for the use-underline property
      Returns:
      the Builder instance is returned, to allow method chaining