Package org.gnome.gtk
Class SearchEntry.Builder<B extends SearchEntry.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.InitiallyUnowned.Builder<B>
org.gnome.gtk.Widget.Builder<B>
org.gnome.gtk.SearchEntry.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
,Editable.Builder<B>
- Enclosing class:
SearchEntry
public static class SearchEntry.Builder<B extends SearchEntry.Builder<B>>
extends Widget.Builder<B>
implements Accessible.Builder<B>, Editable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theSearchEntry
object.onActivate
(SearchEntry.ActivateCallback handler) Emitted when the entry is activated.onNextMatch
(SearchEntry.NextMatchCallback handler) Emitted when the user initiates a move to the next match for the current search string.Emitted when the user initiates a move to the previous match for the current search string.Emitted with a delay.Emitted when the user initiated a search on the entry.Emitted when the user stops a search via keyboard input.setActivatesDefault
(boolean activatesDefault) Whether to activate the default widget when Enter is pressed.setInputHints
(Set<InputHints> inputHints) The hints about input for theGtkSearchEntry
used to alter the behaviour of input methods.setInputHints
(InputHints... inputHints) The hints about input for theGtkSearchEntry
used to alter the behaviour of input methods.setInputPurpose
(InputPurpose inputPurpose) The purpose for theGtkSearchEntry
input used to alter the behaviour of input methods.setPlaceholderText
(String placeholderText) The text that will be displayed in theGtkSearchEntry
when it is empty and unfocused.setSearchDelay
(int searchDelay) The delay in milliseconds from last keypress to the search changed signal.Methods inherited from class org.gnome.gtk.Widget.Builder
onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, setCanFocus, setCanTarget, setCssClasses, setCssName, setCursor, setFocusable, setFocusOnClick, setHalign, setHasTooltip, setHeightRequest, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequest
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRole
Methods inherited from interface io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
Methods inherited from interface org.gnome.gtk.Editable.Builder
setEditable, setEnableUndo, setMaxWidthChars, setText, setWidthChars, setXalign
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theSearchEntry
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 toSearchEntry
.- Overrides:
build
in classWidget.Builder<B extends SearchEntry.Builder<B>>
- Returns:
- a new instance of
SearchEntry
with the properties that were set in the Builder object.
-
setActivatesDefault
Whether to activate the default widget when Enter is pressed.- Parameters:
activatesDefault
- the value for theactivates-default
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInputHints
The hints about input for theGtkSearchEntry
used to alter the behaviour of input methods.- Parameters:
inputHints
- the value for theinput-hints
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInputPurpose
The purpose for theGtkSearchEntry
input used to alter the behaviour of input methods.- Parameters:
inputPurpose
- the value for theinput-purpose
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPlaceholderText
-
setSearchDelay
The delay in milliseconds from last keypress to the search changed signal.- Parameters:
searchDelay
- the value for thesearch-delay
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInputHints
The hints about input for theGtkSearchEntry
used to alter the behaviour of input methods.- Parameters:
inputHints
- the value for theinput-hints
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onActivate
Emitted when the entry is activated.The keybindings for this signal are all forms of the
Enter
key.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onNextMatch
Emitted when the user initiates a move to the next match for the current search string.This is a keybinding signal.
Applications should connect to it, to implement moving between matches.
The default bindings for this signal is
Ctrl
+g
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPreviousMatch
Emitted when the user initiates a move to the previous match for the current search string.This is a keybinding signal.
Applications should connect to it, to implement moving between matches.
The default bindings for this signal is
Ctrl
+Shift
+g
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSearchChanged
Emitted with a delay. The length of the delay can be changed with theGtk.SearchEntry:search-delay
property.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSearchStarted
Emitted when the user initiated a search on the entry.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onStopSearch
Emitted when the user stops a search via keyboard input.This is a keybinding signal.
Applications should connect to it, to implement hiding the search entry in this case.
The default bindings for this signal is
Escape
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-