ask
protected int ask(String dialogTitle,
String dialogMessage,
int defaultButton,
String... dialogButtonLabels)
Displays a dialog to ask the user for something. This method works from
both the UI thread or a background thread. In any case, it returns only
after the user has closed the dialog.
- Parameters:
dialogTitle
- The title text of the dialog
dialogMessage
- The message to display in the dialog window.
defaultButton
- The index of the button from the following list of buttons
that should be the default (starts with 0)
dialogButtonLabels
- A label for each button to display in the dialog. Labels may
contain '&' to mark the acellerator character
- Returns:
- The index of the button that the user has pressed, or
SWT.DEFAULT
() if the user has
canceled the dialog.