Class MessageDialog

java.lang.Object
thinletcommons.MessageDialog

public class MessageDialog extends Object
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 Details

  • Constructor Details

    • MessageDialog

      public MessageDialog(Dialog owner, String title, String msg)
      Show a simple message dialog with an "Ok" button.
    • MessageDialog

      public MessageDialog(Dialog owner, String title, Image icon, String msg)
      Show a simple message dialog with an "Ok" button and a custom icon.
    • MessageDialog

      public MessageDialog(Frame owner, String title, String msg)
      Show a simple message dialog with an "Ok" button.
    • MessageDialog

      public MessageDialog(Frame owner, String title, Image icon, String msg)
      Show a simple message dialog with an "Ok" button and a custom icon.
    • MessageDialog

      public MessageDialog(Dialog owner, String title, String msg, int mode)
    • MessageDialog

      public MessageDialog(Dialog owner, String title, Image icon, String msg, int mode)
    • MessageDialog

      public MessageDialog(Frame owner, String title, String msg, int mode)
    • MessageDialog

      public MessageDialog(Frame owner, String title, Image icon, String msg, int mode)
  • 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_YES or ACTION_NO.
    • init

      public void init(Object iconLabel, Object textarea, Object button1, Object button2, Object button3)
      Thinlet callback.
    • buttonPressed

      public void buttonPressed(Object button)
      Thinlet callback.