Class Entry.Builder<B extends Entry.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
,CellEditable.Builder<B>
,Editable.Builder<B>
- Enclosing class:
Entry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theEntry
object.onActivate
(Entry.ActivateCallback handler) Emitted when the entry is activated.onIconPress
(Entry.IconPressCallback handler) Emitted when an activatable icon is clicked.onIconRelease
(Entry.IconReleaseCallback handler) Emitted on the button release from a mouse click over an activatable icon.setActivatesDefault
(boolean activatesDefault) Whether to activate the default widget when Enter is pressed.setAttributes
(AttrList attributes) A list of Pango attributes to apply to the text of the entry.setBuffer
(EntryBuffer buffer) The buffer object which actually stores the text.setCompletion
(EntryCompletion completion) Deprecated.setEnableEmojiCompletion
(boolean enableEmojiCompletion) Whether to suggest Emoji replacements for :-delimited names like:heart:
.setExtraMenu
(MenuModel extraMenu) A menu model whose contents will be appended to the context menu.setHasFrame
(boolean hasFrame) Whether the entry should draw a frame.setImModule
(String imModule) Which IM (input method) module should be used for this entry.setInputHints
(Set<InputHints> inputHints) Additional hints that allow input methods to fine-tune their behavior.setInputHints
(InputHints... inputHints) Additional hints that allow input methods to fine-tune their behavior.setInputPurpose
(InputPurpose inputPurpose) The purpose of this text field.setInvisibleChar
(int invisibleChar) The character to use when masking entry contents (“password mode”).setInvisibleCharSet
(boolean invisibleCharSet) Whether the invisible char has been set for theGtkEntry
.setMaxLength
(int maxLength) Maximum number of characters for this entry.setOverwriteMode
(boolean overwriteMode) If text is overwritten when typing in theGtkEntry
.setPlaceholderText
(String placeholderText) The text that will be displayed in theGtkEntry
when it is empty and unfocused.setPrimaryIconActivatable
(boolean primaryIconActivatable) Whether the primary icon is activatable.setPrimaryIconGicon
(Icon primaryIconGicon) TheGIcon
to use for the primary icon for the entry.setPrimaryIconName
(String primaryIconName) The icon name to use for the primary icon for the entry.setPrimaryIconPaintable
(Paintable primaryIconPaintable) AGdkPaintable
to use as the primary icon for the entry.setPrimaryIconSensitive
(boolean primaryIconSensitive) Whether the primary icon is sensitive.setPrimaryIconTooltipMarkup
(String primaryIconTooltipMarkup) The contents of the tooltip on the primary icon, with markup.setPrimaryIconTooltipText
(String primaryIconTooltipText) The contents of the tooltip on the primary icon.setProgressFraction
(double progressFraction) The current fraction of the task that's been completed.setProgressPulseStep
(double progressPulseStep) The fraction of total entry width to move the progress bouncing block for each pulse.setSecondaryIconActivatable
(boolean secondaryIconActivatable) Whether the secondary icon is activatable.setSecondaryIconGicon
(Icon secondaryIconGicon) TheGIcon
to use for the secondary icon for the entry.setSecondaryIconName
(String secondaryIconName) The icon name to use for the secondary icon for the entry.setSecondaryIconPaintable
(Paintable secondaryIconPaintable) AGdkPaintable
to use as the secondary icon for the entry.setSecondaryIconSensitive
(boolean secondaryIconSensitive) Whether the secondary icon is sensitive.setSecondaryIconTooltipMarkup
(String secondaryIconTooltipMarkup) The contents of the tooltip on the secondary icon, with markup.setSecondaryIconTooltipText
(String secondaryIconTooltipText) The contents of the tooltip on the secondary icon.setShowEmojiIcon
(boolean showEmojiIcon) Whether the entry will show an Emoji icon in the secondary icon position to open the Emoji chooser.A list of tabstops to apply to the text of the entry.setTruncateMultiline
(boolean truncateMultiline) Whentrue
, pasted multi-line text is truncated to the first line.setVisibility
(boolean visibility) Whether the entry should show the “invisible char” instead of the actual text (“password mode”).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.CellEditable.Builder
setEditingCanceled
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 theEntry
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 toEntry
.- Overrides:
build
in classWidget.Builder<B extends Entry.Builder<B>>
- Returns:
- a new instance of
Entry
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
-
setAttributes
A list of Pango attributes to apply to the text of the entry.This is mainly useful to change the size or weight of the text.
The
PangoAttribute
'sstartIndex
andendIndex
must refer to theEntryBuffer
text, i.e. without the preedit string.- Parameters:
attributes
- the value for theattributes
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setBuffer
The buffer object which actually stores the text.- Parameters:
buffer
- the value for thebuffer
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setCompletion
Deprecated.The auxiliary completion object to use with the entry.- Parameters:
completion
- the value for thecompletion
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEnableEmojiCompletion
Whether to suggest Emoji replacements for :-delimited names like:heart:
.- Parameters:
enableEmojiCompletion
- the value for theenable-emoji-completion
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setExtraMenu
-
setHasFrame
Whether the entry should draw a frame.- Parameters:
hasFrame
- the value for thehas-frame
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setImModule
Which IM (input method) module should be used for this entry.See
IMContext
.Setting this to a non-
null
value overrides the system-wide IM module setting. See the GtkSettingsGtk.Settings:gtk-im-module
property.- Parameters:
imModule
- the value for theim-module
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInputHints
Additional hints that allow input methods to fine-tune their behavior.Also see
Gtk.Entry:input-purpose
- Parameters:
inputHints
- the value for theinput-hints
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInputPurpose
The purpose of this text field.This property can be used by on-screen keyboards and other input methods to adjust their behaviour.
Note that setting the purpose to
InputPurpose.PASSWORD
orInputPurpose.PIN
is independent from settingGtk.Entry:visibility
.- Parameters:
inputPurpose
- the value for theinput-purpose
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInvisibleChar
The character to use when masking entry contents (“password mode”).- Parameters:
invisibleChar
- the value for theinvisible-char
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInvisibleCharSet
Whether the invisible char has been set for theGtkEntry
.- Parameters:
invisibleCharSet
- the value for theinvisible-char-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMaxLength
Maximum number of characters for this entry.- Parameters:
maxLength
- the value for themax-length
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setOverwriteMode
If text is overwritten when typing in theGtkEntry
.- Parameters:
overwriteMode
- the value for theoverwrite-mode
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPlaceholderText
-
setPrimaryIconActivatable
Whether the primary icon is activatable.GTK emits the
Gtk.Entry::icon-press
andGtk.Entry::icon-release
signals only on sensitive, activatable icons.Sensitive, but non-activatable icons can be used for purely informational purposes.
- Parameters:
primaryIconActivatable
- the value for theprimary-icon-activatable
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPrimaryIconGicon
-
setPrimaryIconName
-
setPrimaryIconPaintable
-
setPrimaryIconSensitive
Whether the primary icon is sensitive.An insensitive icon appears grayed out. GTK does not emit the
Gtk.Entry::icon-press
andGtk.Entry::icon-release
signals and does not allow DND from insensitive icons.An icon should be set insensitive if the action that would trigger when clicked is currently not available.
- Parameters:
primaryIconSensitive
- the value for theprimary-icon-sensitive
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPrimaryIconTooltipMarkup
The contents of the tooltip on the primary icon, with markup.Also see
Entry.setIconTooltipMarkup(org.gnome.gtk.EntryIconPosition, java.lang.String)
.- Parameters:
primaryIconTooltipMarkup
- the value for theprimary-icon-tooltip-markup
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPrimaryIconTooltipText
The contents of the tooltip on the primary icon.Also see
Entry.setIconTooltipText(org.gnome.gtk.EntryIconPosition, java.lang.String)
.- Parameters:
primaryIconTooltipText
- the value for theprimary-icon-tooltip-text
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setProgressFraction
The current fraction of the task that's been completed.- Parameters:
progressFraction
- the value for theprogress-fraction
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setProgressPulseStep
The fraction of total entry width to move the progress bouncing block for each pulse.- Parameters:
progressPulseStep
- the value for theprogress-pulse-step
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSecondaryIconActivatable
Whether the secondary icon is activatable.GTK emits the
Gtk.Entry::icon-press
andGtk.Entry::icon-release
signals only on sensitive, activatable icons.Sensitive, but non-activatable icons can be used for purely informational purposes.
- Parameters:
secondaryIconActivatable
- the value for thesecondary-icon-activatable
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSecondaryIconGicon
-
setSecondaryIconName
-
setSecondaryIconPaintable
-
setSecondaryIconSensitive
Whether the secondary icon is sensitive.An insensitive icon appears grayed out. GTK does not emit the
Gtk.Entry::icon-press[ and [signal@Gtk.Entry::icon-release
signals and does not allow DND from insensitive icons.An icon should be set insensitive if the action that would trigger when clicked is currently not available.
- Parameters:
secondaryIconSensitive
- the value for thesecondary-icon-sensitive
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSecondaryIconTooltipMarkup
The contents of the tooltip on the secondary icon, with markup.Also see
Entry.setIconTooltipMarkup(org.gnome.gtk.EntryIconPosition, java.lang.String)
.- Parameters:
secondaryIconTooltipMarkup
- the value for thesecondary-icon-tooltip-markup
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSecondaryIconTooltipText
The contents of the tooltip on the secondary icon.Also see
Entry.setIconTooltipText(org.gnome.gtk.EntryIconPosition, java.lang.String)
.- Parameters:
secondaryIconTooltipText
- the value for thesecondary-icon-tooltip-text
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowEmojiIcon
Whether the entry will show an Emoji icon in the secondary icon position to open the Emoji chooser.- Parameters:
showEmojiIcon
- the value for theshow-emoji-icon
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTabs
-
setTruncateMultiline
Whentrue
, pasted multi-line text is truncated to the first line.- Parameters:
truncateMultiline
- the value for thetruncate-multiline
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setVisibility
Whether the entry should show the “invisible char” instead of the actual text (“password mode”).- Parameters:
visibility
- the value for thevisibility
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInputHints
Additional hints that allow input methods to fine-tune their behavior.Also see
Gtk.Entry:input-purpose
- 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:
-
onIconPress
Emitted when an activatable icon is clicked.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onIconRelease
Emitted on the button release from a mouse click over an activatable icon.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-