Class EntryBuffer.Builder<B extends EntryBuffer.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
PasswordEntryBuffer.Builder
Enclosing class:
EntryBuffer

public static class EntryBuffer.Builder<B extends EntryBuffer.Builder<B>> extends GObject.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 EntryBuffer build()
      Finish building the EntryBuffer object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to EntryBuffer.
      Overrides:
      build in class GObject.Builder<B extends EntryBuffer.Builder<B>>
      Returns:
      a new instance of EntryBuffer with the properties that were set in the Builder object.
    • setMaxLength

      public B setMaxLength(int maxLength)
      The maximum length (in characters) of the text in the buffer.
      Parameters:
      maxLength - the value for the max-length property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setText

      public B setText(String text)
      The contents of the buffer.
      Parameters:
      text - the value for the text property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onDeletedText

      public B onDeletedText(EntryBuffer.DeletedTextCallback handler)

      The text is altered in the default handler for this signal.

      If you want access to the text after the text has been modified, use ConnectFlags.AFTER.

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

      public B onInsertedText(EntryBuffer.InsertedTextCallback handler)
      This signal is emitted after text is inserted into the buffer.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: