Class Expander.Builder<B extends Expander.Builder<B>>

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

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

      public B setChild(Widget child)
      The child widget.
      Parameters:
      child - the value for the child property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setExpanded

      public B setExpanded(boolean expanded)
      Whether the expander has been opened to reveal the child.
      Parameters:
      expanded - the value for the expanded property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setLabel

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

      public B setLabelWidget(Widget labelWidget)
      A widget to display instead of the usual expander label.
      Parameters:
      labelWidget - the value for the label-widget property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setResizeToplevel

      public B setResizeToplevel(boolean resizeToplevel)
      When this property is true, the expander will resize the toplevel widget containing the expander upon expanding and collapsing.
      Parameters:
      resizeToplevel - the value for the resize-toplevel property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUseMarkup

      public B setUseMarkup(boolean useMarkup)
      Whether the text in the label is Pango markup.
      Parameters:
      useMarkup - the value for the use-markup 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.
      Parameters:
      useUnderline - the value for the use-underline property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onActivate

      public B onActivate(Expander.ActivateCallback handler)
      Activates the GtkExpander.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: