public final class ButtonsType
extends org.freedesktop.bindings.Constant
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
.
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".
|
public static final ButtonsType CANCEL
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.
public static final ButtonsType CLOSE
OK
Button is a better alternative, but
CLOSE
is the appropriate choice for preferences Dialogs
where the settings are automatically applied.public static final ButtonsType NONE
public static final ButtonsType OK
public static final ButtonsType OK_CANCEL
public static final ButtonsType YES_NO
OK_CANCEL
may be a better alternative if you want a confirmation to
start some task.