Package org.gnome.gtksourceview
Class SearchSettings.Builder<B extends SearchSettings.Builder<B>>
java.lang.Object
io.github.jwharm.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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theSearchSettings
object.setAtWordBoundaries
(boolean atWordBoundaries) Iftrue
, a search match must start and end a word.setCaseSensitive
(boolean caseSensitive) Whether the search is case sensitive.setRegexEnabled
(boolean regexEnabled) Search by regular expressions withSearchSettings:search-text
as the pattern.setSearchText
(String searchText) A search string, ornull
if the search is disabled.setVisibleOnly
(boolean visibleOnly) Exclude invisible text from the search.setWrapAround
(boolean wrapAround) For a forward search, continue at the beginning of the buffer if no search occurrence is found.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theSearchSettings
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toSearchSettings
.- Overrides:
build
in classGObject.Builder<B extends SearchSettings.Builder<B>>
- Returns:
- a new instance of
SearchSettings
with the properties that were set in the Builder object.
-
setAtWordBoundaries
Iftrue
, a search match must start and end a word. The match can span multiple words.- Parameters:
atWordBoundaries
- the value for theat-word-boundaries
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setCaseSensitive
Whether the search is case sensitive.- Parameters:
caseSensitive
- the value for thecase-sensitive
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRegexEnabled
Search by regular expressions withSearchSettings:search-text
as the pattern.- Parameters:
regexEnabled
- the value for theregex-enabled
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSearchText
A search string, ornull
if the search is disabled.If the regular expression search is enabled,
SearchSettings:search-text
is the pattern.- Parameters:
searchText
- the value for thesearch-text
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setVisibleOnly
Exclude invisible text from the search. A search match may have invisible text interspersed.- Parameters:
visibleOnly
- the value for thevisible-only
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWrapAround
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 thewrap-around
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-