Class SearchContext.Builder<B extends SearchContext.Builder<B>>

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

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

      public B setBuffer(Buffer buffer)
      The Buffer associated to the search context.
      Parameters:
      buffer - the value for the buffer property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHighlight

      public B setHighlight(boolean highlight)
      Highlight the search occurrences.
      Parameters:
      highlight - the value for the highlight property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMatchStyle

      public B setMatchStyle(Style matchStyle)
      A Style, or null for theme's scheme default style.
      Parameters:
      matchStyle - the value for the match-style property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSettings

      public B setSettings(SearchSettings settings)

      The SearchSettings associated to the search context.

      This property is construct-only since version 4.0.

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