Class SearchBar.Builder<B extends SearchBar.Builder<B>>

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

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

      public B setKeyCaptureWidget(Widget keyCaptureWidget)
      The key capture widget.
      Parameters:
      keyCaptureWidget - the value for the key-capture-widget property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSearchModeEnabled

      public B setSearchModeEnabled(boolean searchModeEnabled)
      Whether the search mode is on and the search bar shown.
      Parameters:
      searchModeEnabled - the value for the search-mode-enabled property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShowCloseButton

      public B setShowCloseButton(boolean showCloseButton)
      Whether to show the close button in the search bar.
      Parameters:
      showCloseButton - the value for the show-close-button property
      Returns:
      the Builder instance is returned, to allow method chaining