Class MultiLineMessageDialog

java.lang.Object
docking.DialogComponentProvider
docking.widgets.dialogs.MultiLineMessageDialog
All Implemented Interfaces:
ActionContextProvider, StatusListener, TaskListener

public class MultiLineMessageDialog extends DialogComponentProvider
  • Field Details

    • ERROR_MESSAGE

      public static final int ERROR_MESSAGE
      Used for error messages.
      See Also:
    • INFORMATION_MESSAGE

      public static final int INFORMATION_MESSAGE
      Used for information messages.
      See Also:
    • WARNING_MESSAGE

      public static final int WARNING_MESSAGE
      Used for warning messages.
      See Also:
    • QUESTION_MESSAGE

      public static final int QUESTION_MESSAGE
      Used for questions.
      See Also:
    • PLAIN_MESSAGE

      public static final int PLAIN_MESSAGE
      No icon is used.
      See Also:
  • Constructor Details

    • MultiLineMessageDialog

      public MultiLineMessageDialog(String title, String shortMessage, String detailedMessage, int messageType, boolean modal)
      Creates a multi-line popup dialog.
      Parameters:
      title - the dialog title
      shortMessage - a short message to display at the top of the dialog
      detailedMessage - the detailed message
      messageType - the message type (warning, error, info, etc)
      modal - true if the dialog should be modal
  • Method Details

    • showModalMessageDialog

      public static void showModalMessageDialog(Component parent, String title, String shortMessage, String detailedMessage, int messageType)
      Static helper method to easily display a modal message dialog showing a text string with an "OK" button.

      If the text is too long to fit, a scroll bar will be used.

      The text string can be plain text (with \n line breaks) or HTML (if the first 6 characters of the string are <html>).

      This method will not return until the user presses the OK button.

      Parameters:
      parent - - parent component or null
      title - - dialog title
      shortMessage - - short message that appears above the main message.
      detailedMessage - - long scrollable message.
      messageType - - see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, PLAIN_MESSAGE
    • showMessageDialog

      public static void showMessageDialog(Component parent, String title, String shortMessage, String detailedMessage, int messageType)
    • okCallback

      protected void okCallback()
      Description copied from class: DialogComponentProvider
      The callback method for when the "OK" button is pressed.
      Overrides:
      okCallback in class DialogComponentProvider