Class TreeExpander.Builder<B extends TreeExpander.Builder<B>>

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

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

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

      public B setHideExpander(boolean hideExpander)

      Whether the expander icon should be hidden in a GtkTreeListRow. Note that this property simply hides the icon. The actions and keybinding (i.e. collapse and expand) are not affected by this property.

      A common use for this property would be to bind to the number of children in a GtkTreeListRow's model in order to hide the expander when a row has no children.

      Parameters:
      hideExpander - the value for the hide-expander property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setIndentForDepth

      public B setIndentForDepth(boolean indentForDepth)
      TreeExpander indents the child according to its depth.
      Parameters:
      indentForDepth - the value for the indent-for-depth property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setIndentForIcon

      public B setIndentForIcon(boolean indentForIcon)
      TreeExpander indents the child by the width of an expander-icon if it is not expandable.
      Parameters:
      indentForIcon - the value for the indent-for-icon property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.6
    • setListRow

      public B setListRow(TreeListRow listRow)
      The list row to track for expander state.
      Parameters:
      listRow - the value for the list-row property
      Returns:
      the Builder instance is returned, to allow method chaining