Package org.gnome.gtk
Class SearchEntry.Builder<B extends SearchEntry.Builder<B>>
java.lang.Object
org.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:
Accessible.Builder<B>,Editable.Builder<B>,BuilderInterface
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theSearchEntryobject.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 theGtkSearchEntryused to alter the behaviour of input methods.setInputHints(InputHints... inputHints) The hints about input for theGtkSearchEntryused to alter the behaviour of input methods.setInputPurpose(InputPurpose inputPurpose) The purpose for theGtkSearchEntryinput used to alter the behaviour of input methods.setPlaceholderText(String placeholderText) The text that will be displayed in theGtkSearchEntrywhen 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, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequestMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRoleMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArenaMethods inherited from interface org.gnome.gtk.Editable.Builder
setEditable, setEnableUndo, setMaxWidthChars, setText, setWidthChars, setXalign
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theSearchEntryobject. 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:
buildin classWidget.Builder<B extends SearchEntry.Builder<B>>- Returns:
- a new instance of
SearchEntrywith 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-defaultproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setInputHints
The hints about input for theGtkSearchEntryused to alter the behaviour of input methods.- Parameters:
inputHints- the value for theinput-hintsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.14
-
setInputPurpose
The purpose for theGtkSearchEntryinput used to alter the behaviour of input methods.- Parameters:
inputPurpose- the value for theinput-purposeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.14
-
setPlaceholderText
-
setSearchDelay
The delay in milliseconds from last keypress to the search changed signal.- Parameters:
searchDelay- the value for thesearch-delayproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setInputHints
The hints about input for theGtkSearchEntryused to alter the behaviour of input methods.- Parameters:
inputHints- the value for theinput-hintsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.14
-
onActivate
Emitted when the entry is activated.The keybindings for this signal are all forms of the
Enterkey.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
Builderinstance 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
Builderinstance 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-delayproperty.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
Builderinstance 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
Builderinstance is returned, to allow method chaining - See Also:
-