Package thinletcommons
Class MessageDialog
java.lang.Object
thinletcommons.MessageDialog
A Thinlet message dialog with configurable OK/CANCEL/YES/NO-Buttons.
The dialog is modal and blocks the calling frame/dialog. It is therefore displayed in a separate window.
TODO:
- make message type configurable (ERROR/WARN/INFO)
- Author:
- Dirk Moebius
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionMessageDialog(Dialog owner, String title, Image icon, String msg) Show a simple message dialog with an "Ok" button and a custom icon.MessageDialog(Dialog owner, String title, Image icon, String msg, int mode) MessageDialog(Dialog owner, String title, String msg) Show a simple message dialog with an "Ok" button.MessageDialog(Dialog owner, String title, String msg, int mode) MessageDialog(Frame owner, String title, Image icon, String msg) Show a simple message dialog with an "Ok" button and a custom icon.MessageDialog(Frame owner, String title, Image icon, String msg, int mode) MessageDialog(Frame owner, String title, String msg) Show a simple message dialog with an "Ok" button.MessageDialog(Frame owner, String title, String msg, int mode) -
Method Summary
-
Field Details
-
MODE_OK
public static final int MODE_OK- See Also:
-
MODE_OK_CANCEL
public static final int MODE_OK_CANCEL- See Also:
-
MODE_YES_NO
public static final int MODE_YES_NO- See Also:
-
MODE_YES_NO_CANCEL
public static final int MODE_YES_NO_CANCEL- See Also:
-
ACTION_OK
public static final int ACTION_OK- See Also:
-
ACTION_CANCEL
public static final int ACTION_CANCEL- See Also:
-
ACTION_YES
public static final int ACTION_YES- See Also:
-
ACTION_NO
public static final int ACTION_NO- See Also:
-
-
Constructor Details
-
MessageDialog
Show a simple message dialog with an "Ok" button. -
MessageDialog
Show a simple message dialog with an "Ok" button and a custom icon. -
MessageDialog
Show a simple message dialog with an "Ok" button. -
MessageDialog
Show a simple message dialog with an "Ok" button and a custom icon. -
MessageDialog
-
MessageDialog
-
MessageDialog
-
MessageDialog
-
-
Method Details
-
show
public int show()Show the modal message dialog. This halts the application until the user dismisses the dialog.- Returns:
- the action selected by user; one of
ACTION_OK,ACTION_CANCEL,ACTION_YESorACTION_NO.
-
init
Thinlet callback. -
buttonPressed
Thinlet callback.
-