Changeset 131:2ea6488981d8
- Timestamp:
- 02/12/08 19:33:29
(1 year ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
Add convinience methods to show MessageBox? as info,warning,error
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r130 |
r131 |
|
| 273 | 273 | * DWT extension |
|---|
| 274 | 274 | */ |
|---|
| 275 | | public static int showMessage(char[] str, char[] title = null, Shell shell = null, int style = DWT.OK | DWT.ICON_WARNING) { |
|---|
| | 275 | public static int showMessageBox(char[] str, char[] title = null, Shell shell = null, int style = DWT.OK | DWT.ICON_WARNING) { |
|---|
| 276 | 276 | MessageBox msgBox = (shell is null ) ? new MessageBox( style ) : new MessageBox(shell, style); |
|---|
| 277 | 277 | msgBox.setMessage(str); |
|---|
| … | … | |
| 283 | 283 | |
|---|
| 284 | 284 | /// DWT extension |
|---|
| 285 | | alias showMessage showMsg; |
|---|
| 286 | | |
|---|
| 287 | | |
|---|
| 288 | | } |
|---|
| 289 | | |
|---|
| | 285 | public static int showInfo(char[] str, char[] title = null, Shell shell = null) { |
|---|
| | 286 | return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_INFORMATION ); |
|---|
| | 287 | } |
|---|
| | 288 | /// DWT extension |
|---|
| | 289 | public static int showWarning(char[] str, char[] title = null, Shell shell = null) { |
|---|
| | 290 | return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_WARNING ); |
|---|
| | 291 | } |
|---|
| | 292 | /// DWT extension |
|---|
| | 293 | public static int showError(char[] str, char[] title = null, Shell shell = null) { |
|---|
| | 294 | return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_ERROR ); |
|---|
| | 295 | } |
|---|
| | 296 | |
|---|
| | 297 | } |
|---|
| | 298 | |
|---|