Class PopoverMenu.Builder<B extends PopoverMenu.Builder<B>>

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

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

      public B setFlags(Set<PopoverMenuFlags> flags)

      The flags that popover uses to create/display a menu from its model.

      If a model is set and the flags change, contents are rebuilt, so if setting properties individually, set flags before model to avoid a redundant rebuild.

      Parameters:
      flags - the value for the flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.14
    • setMenuModel

      public B setMenuModel(MenuModel menuModel)
      The model from which the menu is made.
      Parameters:
      menuModel - the value for the menu-model property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setVisibleSubmenu

      public B setVisibleSubmenu(String visibleSubmenu)
      The name of the visible submenu.
      Parameters:
      visibleSubmenu - the value for the visible-submenu property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setFlags

      public B setFlags(PopoverMenuFlags... flags)

      The flags that popover uses to create/display a menu from its model.

      If a model is set and the flags change, contents are rebuilt, so if setting properties individually, set flags before model to avoid a redundant rebuild.

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