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 Window.Builder<B> implements Accessible.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 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 Window.Builder<B extends MessageDialog.Builder<B>>
      Returns:
      a new instance of MessageDialog with the properties that were set in the Builder object.
    • setBody

      @Deprecated public B setBody(String body)
      Deprecated.
      The body text of the dialog.
      Parameters:
      body - the value for the body property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setBodyUseMarkup

      @Deprecated public B setBodyUseMarkup(boolean bodyUseMarkup)
      Deprecated.

      Whether the body text includes Pango markup.

      See Pango#parseMarkup.

      Parameters:
      bodyUseMarkup - the value for the body-use-markup property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setCloseResponse

      @Deprecated public B setCloseResponse(String closeResponse)
      Deprecated.

      The ID of the close response.

      It will be passed to MessageDialog::response if the window is closed by pressing Escape or with a system action.

      It doesn't have to correspond to any of the responses in the dialog.

      The default close response is close.

      Parameters:
      closeResponse - the value for the close-response property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setDefaultResponse

      @Deprecated public B setDefaultResponse(String defaultResponse)
      Deprecated.

      The response ID of the default response.

      The button corresponding to this response will be set as the default widget of the dialog.

      If not set, the default widget will not be set, and the last added response will be focused by default.

      See Gtk.Window:default-widget.

      Parameters:
      defaultResponse - the value for the default-response property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setExtraChild

      @Deprecated public B setExtraChild(Widget extraChild)
      Deprecated.

      The child widget.

      Displayed below the heading and body.

      Parameters:
      extraChild - the value for the extra-child property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setHeading

      @Deprecated public B setHeading(String heading)
      Deprecated.
      The heading of the dialog.
      Parameters:
      heading - the value for the heading property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • setHeadingUseMarkup

      @Deprecated public B setHeadingUseMarkup(boolean headingUseMarkup)
      Deprecated.

      Whether the heading includes Pango markup.

      See Pango#parseMarkup.

      Parameters:
      headingUseMarkup - the value for the heading-use-markup property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.2
    • onResponse

      @Deprecated public B onResponse(@Nullable String detail, MessageDialog.ResponseCallback handler)
      Deprecated.

      This signal is emitted when the dialog is closed.

      response will be set to the response ID of the button that had been activated.

      if the dialog was closed by pressing Escape or with a system action, response will be set to the value of MessageDialog:close-response.

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