Class SidebarSection.Builder<B extends SidebarSection.Builder<B>>

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

public static class SidebarSection.Builder<B extends SidebarSection.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
1.9
  • Constructor Details

    • Builder

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

    • build

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

      public B setMenuModel(MenuModel menuModel)

      Context menu model for the section items.

      When a context menu is shown for an item, it will be constructed from the provided menu model. Use the Sidebar::setup-menu signal to set up the menu actions for the particular item.

      If not set, Sidebar:menu-model will be used instead.

      Parameters:
      menuModel - the value for the menu-model property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.9
    • setTitle

      public B setTitle(String title)

      Title of the section.

      If set, it will be displayed instead of the separator before the section.

      Parameters:
      title - the value for the title property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.9