Class Popover.Builder<B extends Popover.Builder<B>>

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

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

      public B setAutohide(boolean autohide)
      Whether to dismiss the popover on outside clicks.
      Parameters:
      autohide - the value for the autohide property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setCascadePopdown

      public B setCascadePopdown(boolean cascadePopdown)

      Whether the popover pops down after a child popover.

      This is used to implement the expected behavior of submenus.

      Parameters:
      cascadePopdown - the value for the cascade-popdown property
      Returns:
      the Builder instance is returned, to allow method chaining
    • 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
    • setDefaultWidget

      public B setDefaultWidget(Widget defaultWidget)
      The default widget inside the popover.
      Parameters:
      defaultWidget - the value for the default-widget property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHasArrow

      public B setHasArrow(boolean hasArrow)
      Whether to draw an arrow.
      Parameters:
      hasArrow - the value for the has-arrow property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMnemonicsVisible

      public B setMnemonicsVisible(boolean mnemonicsVisible)
      Whether mnemonics are currently visible in this popover.
      Parameters:
      mnemonicsVisible - the value for the mnemonics-visible property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPointingTo

      public B setPointingTo(Rectangle pointingTo)
      Rectangle in the parent widget that the popover points to.
      Parameters:
      pointingTo - the value for the pointing-to property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPosition

      public B setPosition(PositionType position)
      How to place the popover, relative to its parent.
      Parameters:
      position - the value for the position property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onActivateDefault

      public B onActivateDefault(Popover.ActivateDefaultCallback handler)

      Emitted whend the user activates the default widget.

      This is a keybinding signal.

      The default binding for this signal is Enter.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onClosed

      public B onClosed(Popover.ClosedCallback handler)
      Emitted when the popover is closed.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: