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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theEntryCompletionobject.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) TheGtkCellAreaused 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
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theEntryCompletionobject. 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:
buildin classGObject.Builder<B extends EntryCompletion.Builder<B>>- Returns:
- a new instance of
EntryCompletionwith the properties that were set in the Builder object.
-
setCellArea
TheGtkCellAreaused 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 orientedCellAreaBoxwill be used.- Parameters:
cellArea- the value for thecell-areaproperty- Returns:
- the
Builderinstance 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-completionproperty- Returns:
- the
Builderinstance 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-selectionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setMinimumKeyLength
The minimum key length as set for completion.- Parameters:
minimumKeyLength- the value for theminimum-key-lengthproperty- Returns:
- the
Builderinstance 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-completionproperty- Returns:
- the
Builderinstance 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-widthproperty- Returns:
- the
Builderinstance 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
falseif you are usingGtk.EntryCompletion:inline-completion.- Parameters:
popupSingleMatch- the value for thepopup-single-matchproperty- Returns:
- the
Builderinstance 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-columnproperty- Returns:
- the
Builderinstance 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
modelis the model that was passed toEntryCompletion.setModel(org.gnome.gtk.TreeModel).- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
prefixinto the entry - e.g. the entry used in theGtkFileChooserinserts only the part of the prefix up to the next '/'.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
modelis the model that was passed toEntryCompletion.setModel(org.gnome.gtk.TreeModel).- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
GtkEntryCompletionis out of suggestions.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-