Class MessageDialog.Builder<B extends MessageDialog.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
MessageDialog

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

      public B setButtons(ButtonsType buttons)
      Set of buttons to display on the dialog.
      Parameters:
      buttons - the value for the buttons property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMessageType

      public B setMessageType(MessageType messageType)
      The type of the message.
      Parameters:
      messageType - the value for the message-type property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSecondaryText

      public B setSecondaryText(String secondaryText)
      The secondary text of the message dialog.
      Parameters:
      secondaryText - the value for the secondary-text property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSecondaryUseMarkup

      public B setSecondaryUseMarkup(boolean secondaryUseMarkup)

      true if the secondary text of the dialog includes Pango markup.

      See Pango#parseMarkup.

      Parameters:
      secondaryUseMarkup - the value for the secondary-use-markup property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setText

      public B setText(String text)

      The primary text of the message dialog.

      If the dialog has a secondary text, this will appear as the title.

      Parameters:
      text - the value for the text property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUseMarkup

      public B setUseMarkup(boolean useMarkup)

      true if the primary text of the dialog includes Pango markup.

      See Pango#parseMarkup.

      Parameters:
      useMarkup - the value for the use-markup property
      Returns:
      the Builder instance is returned, to allow method chaining