Class EntryRow.Builder<B extends EntryRow.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, Actionable.Builder<B>, Editable.Builder<B>, BuilderInterface
Direct Known Subclasses:
PasswordEntryRow.Builder
Enclosing class:
EntryRow

public static class EntryRow.Builder<B extends EntryRow.Builder<B>> extends PreferencesRow.Builder<B> implements Accessible.Builder<B>, Actionable.Builder<B>, Editable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
1.2
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public EntryRow build()
      Finish building the EntryRow object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to EntryRow.
      Overrides:
      build in class PreferencesRow.Builder<B extends EntryRow.Builder<B>>
      Returns:
      a new instance of EntryRow with the properties that were set in the Builder object.
    • setActivatesDefault

      public B setActivatesDefault(boolean activatesDefault)
      Whether activating the embedded entry can activate the default widget.
      Parameters:
      activatesDefault - the value for the activates-default property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setAttributes

      public B setAttributes(AttrList attributes)

      A list of Pango attributes to apply to the text of the embedded entry.

      The Pango.Attribute's start_index and end_index must refer to the EntryBuffer text, i.e. without the preedit string.

      Parameters:
      attributes - the value for the attributes property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setEnableEmojiCompletion

      public B setEnableEmojiCompletion(boolean enableEmojiCompletion)

      Whether to suggest emoji replacements on the entry row.

      Emoji replacement is done with :-delimited names, like :heart:.

      Parameters:
      enableEmojiCompletion - the value for the enable-emoji-completion property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setInputHints

      public B setInputHints(Set<InputHints> inputHints)

      Additional input hints for the entry row.

      Input hints allow input methods to fine-tune their behavior.

      See also: Adw.EntryRow:input-purpose

      Parameters:
      inputHints - the value for the input-hints property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setInputPurpose

      public B setInputPurpose(InputPurpose inputPurpose)

      The input purpose of the entry row.

      The input purpose can be used by input methods to adjust their behavior.

      Parameters:
      inputPurpose - the value for the input-purpose property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setMaxLength

      public B setMaxLength(int maxLength)
      Maximum number of characters for the entry.
      Parameters:
      maxLength - the value for the max-length property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.6
    • setShowApplyButton

      public B setShowApplyButton(boolean showApplyButton)

      Whether to show the apply button.

      When set to TRUE, typing text in the entry will reveal an apply button. Clicking it or pressing the Enter key will hide the button and emit the EntryRow::apply signal.

      This is useful if changing the entry contents can trigger an expensive operation, e.g. network activity, to avoid triggering it after typing every character.

      Parameters:
      showApplyButton - the value for the show-apply-button property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setInputHints

      public B setInputHints(InputHints... inputHints)

      Additional input hints for the entry row.

      Input hints allow input methods to fine-tune their behavior.

      See also: Adw.EntryRow:input-purpose

      Parameters:
      inputHints - the value for the input-hints property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • onApply

      public B onApply(EntryRow.ApplyCallback handler)

      Emitted when the apply button is pressed.

      See EntryRow:show-apply-button.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
      See Also:
    • onEntryActivated

      public B onEntryActivated(EntryRow.EntryActivatedCallback handler)
      Emitted when the embedded entry is activated.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
      See Also: