Class EntryCompletion.Builder<B extends EntryCompletion.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
EntryCompletion
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theEntryCompletion
object.Emitted when a match from the cursor is on a match of the list.Emitted when the inline autocompletion is triggered.Emitted when a match from the list is selected.Emitted when the filter model has zero number of rows in completion_complete method.setCellArea
(CellArea cellArea) TheGtkCellArea
used to layout cell renderers in the treeview column.setInlineCompletion
(boolean inlineCompletion) Determines whether the common prefix of the possible completions should be inserted automatically in the entry.setInlineSelection
(boolean inlineSelection) Determines whether the possible completions on the popup will appear in the entry as you navigate through them.setMinimumKeyLength
(int minimumKeyLength) The minimum key length as set for completion.The model used as data source.setPopupCompletion
(boolean popupCompletion) Determines whether the possible completions should be shown in a popup window.setPopupSetWidth
(boolean popupSetWidth) Determines whether the completions popup window will be resized to the width of the entry.setPopupSingleMatch
(boolean popupSingleMatch) Determines whether the completions popup window will shown for a single possible completion.setTextColumn
(int textColumn) The column of the model containing the strings.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 theEntryCompletion
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 toEntryCompletion
.- Overrides:
build
in classGObject.Builder<B extends EntryCompletion.Builder<B>>
- Returns:
- a new instance of
EntryCompletion
with the properties that were set in the Builder object.
-
setCellArea
TheGtkCellArea
used to layout cell renderers in the treeview column.If no area is specified when creating the entry completion with
EntryCompletion.withArea(org.gnome.gtk.CellArea)
, a horizontally orientedCellAreaBox
will be used.- Parameters:
cellArea
- the value for thecell-area
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInlineCompletion
Determines whether the common prefix of the possible completions should be inserted automatically in the entry.Note that this requires text-column to be set, even if you are using a custom match function.
- Parameters:
inlineCompletion
- the value for theinline-completion
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInlineSelection
Determines whether the possible completions on the popup will appear in the entry as you navigate through them.- Parameters:
inlineSelection
- the value for theinline-selection
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMinimumKeyLength
The minimum key length as set for completion.- Parameters:
minimumKeyLength
- the value for theminimum-key-length
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setModel
-
setPopupCompletion
Determines whether the possible completions should be shown in a popup window.- Parameters:
popupCompletion
- the value for thepopup-completion
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPopupSetWidth
Determines whether the completions popup window will be resized to the width of the entry.- Parameters:
popupSetWidth
- the value for thepopup-set-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPopupSingleMatch
Determines whether the completions popup window will shown for a single possible completion.You probably want to set this to
false
if you are usingGtk.EntryCompletion:inline-completion
.- Parameters:
popupSingleMatch
- the value for thepopup-single-match
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTextColumn
The column of the model containing the strings.Note that the strings must be UTF-8.
- Parameters:
textColumn
- the value for thetext-column
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onCursorOnMatch
Emitted when a match from the cursor is on a match of the list.The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by
iter
.Note that
model
is the model that was passed toEntryCompletion.setModel(org.gnome.gtk.TreeModel)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onInsertPrefix
Emitted when the inline autocompletion is triggered.The default behaviour is to make the entry display the whole prefix and select the newly inserted part.
Applications may connect to this signal in order to insert only a smaller part of the
prefix
into the entry - e.g. the entry used in theGtkFileChooser
inserts only the part of the prefix up to the next '/'.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMatchSelected
Emitted when a match from the list is selected.The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by
iter
.Note that
model
is the model that was passed toEntryCompletion.setModel(org.gnome.gtk.TreeModel)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onNoMatches
Emitted when the filter model has zero number of rows in completion_complete method.In other words when
GtkEntryCompletion
is out of suggestions.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-