Note
Only one of the styles ICON_ERROR, ICON_INFORMATION, ICON_QUESTION, ICON_WARNING and ICON_WORKING may be specified.
Important Note
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | |
| private Map | |
| pack-priv String |
| Access | Constructor and Description |
|---|---|
| public | MessageBox(Shell
a shell which will be the parent of the new instance parent)Constructs a new instance of this class given only its parent. |
| public | MessageBox(Shell
a shell which will be the parent of the new instance parent, int the style of dialog to construct style)Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| private void | |
| private byte[] | |
| public String | Returns: the messageReturns the dialog's message, or an empty string if it does not have one. |
| public int | Returns: the ID of the button that was selected to dismiss the message box (e.g. SWT.OK, SWT.CANCEL, etc.)Makes the dialog visible and brings it to the front of the display. |
| public void | setButtonLabels(Map<Integer, String>
a labels)Map where a valid 'key' is from below listed
styles:
Set custom text for |
| public void | setMessage(String
the message string)Sets the dialog's message, which is a description of the purpose for which it was opened. |
| handle | back to summary |
|---|---|
| pack-priv long handle | |
| labels | back to summary |
|---|---|
| private Map<Integer, String> labels | |
| message | back to summary |
|---|---|
| pack-priv String message | |
| MessageBox | back to summary |
|---|---|
| public MessageBox(Shell parent) Constructs a new instance of this class given only its parent.
| |
| MessageBox | back to summary |
|---|---|
| public MessageBox(Shell parent, int style) Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in
class
| |
| checkStyle | back to summary |
|---|---|
| private static int checkStyle(int style) | |
| createButtons | back to summary |
|---|---|
| private void createButtons(int alignment) | |
| getLabelForButton | back to summary |
|---|---|
| private byte[] getLabelForButton(int buttonId, String messageId) | |
| getMessage | back to summary |
|---|---|
| public String getMessage() Returns the dialog's message, or an empty string if it does not have one. The message is a description of the purpose for which the dialog was opened. This message will be visible in the dialog while it is open.
| |
| open | back to summary |
|---|---|
| public int open() Makes the dialog visible and brings it to the front of the display.
| |
| setButtonLabels | back to summary |
|---|---|
| public void setButtonLabels(Map<Integer, String> labels) Set custom text for
| |
| setMessage | back to summary |
|---|---|
| public void setMessage(String string) Sets the dialog's message, which is a description of the purpose for which it was opened. This message will be visible on the dialog while it is open.
| |