Class PasswordEntry.Builder<B extends PasswordEntry.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:
PasswordEntry

public static class PasswordEntry.Builder<B extends PasswordEntry.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 Details

    • Builder

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

    • build

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

      public B setActivatesDefault(boolean activatesDefault)
      Whether to activate the default widget when Enter is pressed.
      Parameters:
      activatesDefault - the value for the activates-default property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setExtraMenu

      public B setExtraMenu(MenuModel extraMenu)
      A menu model whose contents will be appended to the context menu.
      Parameters:
      extraMenu - the value for the extra-menu property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPlaceholderText

      public B setPlaceholderText(String placeholderText)
      The text that will be displayed in the GtkPasswordEntry when it is empty and unfocused.
      Parameters:
      placeholderText - the value for the placeholder-text property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShowPeekIcon

      public B setShowPeekIcon(boolean showPeekIcon)
      Whether to show an icon for revealing the content.
      Parameters:
      showPeekIcon - the value for the show-peek-icon property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onActivate

      public B onActivate(PasswordEntry.ActivateCallback handler)

      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: