Class SearchSettings.Builder<B extends SearchSettings.Builder<B>>

java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtksourceview.SearchSettings.Builder<B>
Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
SearchSettings

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

      public B setAtWordBoundaries(boolean atWordBoundaries)
      If true, a search match must start and end a word. The match can span multiple words.
      Parameters:
      atWordBoundaries - the value for the at-word-boundaries property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setCaseSensitive

      public B setCaseSensitive(boolean caseSensitive)
      Whether the search is case sensitive.
      Parameters:
      caseSensitive - the value for the case-sensitive property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setRegexEnabled

      public B setRegexEnabled(boolean regexEnabled)
      Search by regular expressions with SearchSettings:search-text as the pattern.
      Parameters:
      regexEnabled - the value for the regex-enabled property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSearchText

      public B setSearchText(String searchText)

      A search string, or null if the search is disabled.

      If the regular expression search is enabled, SearchSettings:search-text is the pattern.

      Parameters:
      searchText - the value for the search-text property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setVisibleOnly

      public B setVisibleOnly(boolean visibleOnly)
      Exclude invisible text from the search. A search match may have invisible text interspersed.
      Parameters:
      visibleOnly - the value for the visible-only property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      5.12
    • setWrapAround

      public B setWrapAround(boolean wrapAround)
      For a forward search, continue at the beginning of the buffer if no search occurrence is found. For a backward search, continue at the end of the buffer.
      Parameters:
      wrapAround - the value for the wrap-around property
      Returns:
      the Builder instance is returned, to allow method chaining