org.gnome.gtk

## Class ButtonsType

- Object
- - org.freedesktop.bindings.Constant
  - - org.gnome.gtk.ButtonsType

-     public final class ButtonsType
      extends org.freedesktop.bindings.Constant

  Specify that a predefined set of Buttons should be used for a `MessageDialog`. When you use one of these ButtonsType, each automatically constructed Button is automatically associated with its corresponding ResponseType.

  If none of these choices represented by the constants in this class are appropriate, use `NONE` and then call the `addButton()` methods manually. You can also specify your own response codes by subclassing `ResponseType`.

  Version:
    4.0.5
  Author:
    Vreixo Formoso

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ButtonsType` | `CANCEL` A single "Cancel" Button.
    `static ButtonsType` | `CLOSE` A single "Close" Button.
    `static ButtonsType` | `NONE` No Buttons at all.
    `static ButtonsType` | `OK` A single "Ok" Button.
    `static ButtonsType` | `OK_CANCEL` The MessageDialog will have two Buttons, "Ok" and "Cancel".
    `static ButtonsType` | `YES_NO` The MessageDialog will have two Buttons, "Yes" and "No".

  - ### Method Summary

    - ### Methods inherited from class org.freedesktop.bindings.Constant

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### CANCEL

          public static final ButtonsType CANCEL

      A single "Cancel" Button.

      If you intend to use a MessageDialog with only a `CANCEL` Button in order to give the user the ability to interrupt a long running task, you should also include a `ProgressBar` in the Dialog showing the status of the task so far.

    - #### CLOSE

          public static final ButtonsType CLOSE

      A single "Close" Button. In most cases (ie, information providing Dialogs) the `OK` Button is a better alternative, but `CLOSE` is the appropriate choice for preferences Dialogs where the settings are automatically applied.

    - #### NONE

          public static final ButtonsType NONE

      No Buttons at all. Used when none of these choices are suitable for your needs and you want to add your own Buttons instead.

    - #### OK

          public static final ButtonsType OK

      A single "Ok" Button. Use this for MessageDialogs that present an information message to which that the user can acknowledge but to which they can take no other action.

    - #### OK_CANCEL

          public static final ButtonsType OK_CANCEL

      The MessageDialog will have two Buttons, "Ok" and "Cancel". Use this for Dialogs that ask for confirmation or that alert about warning situations that can be avoided.

    - #### YES_NO

          public static final ButtonsType YES_NO

      The MessageDialog will have two Buttons, "Yes" and "No". Use this when the Dialog asks something to the user. Note that the `OK_CANCEL` may be a better alternative if you want a confirmation to start some task.