Package docking.widgets.dialogs

# Class MultiLineMessageDialog

java.lang.Object
docking.DialogComponentProvider
docking.widgets.dialogs.MultiLineMessageDialog

All Implemented Interfaces:
  `ActionContextProvider`, `StatusListener`, `TaskListener`

public class MultiLineMessageDialog extends DialogComponentProvider

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `ERROR_MESSAGE`
  Used for error messages.
  `static final int`
  `INFORMATION_MESSAGE`
  Used for information messages.
  `static final int`
  `PLAIN_MESSAGE`
  No icon is used.
  `static final int`
  `QUESTION_MESSAGE`
  Used for questions.
  `static final int`
  `WARNING_MESSAGE`
  Used for warning messages.

  ### Fields inherited from class docking.DialogComponentProvider

  `applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MultiLineMessageDialog(String title, String shortMessage, String detailedMessage, int messageType, boolean modal)`
  Creates a multi-line popup dialog.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `okCallback()`
  The callback method for when the "OK" button is pressed.
  `static void`
  `showMessageDialog(Component parent, String title, String shortMessage, String detailedMessage, int messageType)`
  `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.

  ### Methods inherited from class docking.DialogComponentProvider

  `addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, closeDialog, createSharedActions, dialogClosed, dialogShown, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocation, getId, getInitialLocation, getLocationOnScreen, getParent, getPreferredSize, getRememberLocation, getRememberSize, getStatusColor, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isDialogKeyBindingAction, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, removeAction, removeButton, removeWorkPanel, repack, setAccessibleDescription, setApplyEnabled, setApplyToolTip, setBackground, setCancelButtonText, setCancelEnabled, setCancelToolTip, setCursor, setDefaultButton, setDefaultSize, setDialogSize, setDismissToolTip, setFocusComponent, setGlassPane, setHelpLocation, setInitialLocation, setMinimumSize, setMinimumSize, setOkButtonText, setOkEnabled, setOkToolTip, setPreferredSize, setRememberLocation, setRememberSize, setResizable, setStatusJustification, setStatusText, setStatusText, setStatusText, setTitle, setTransient, setUseSharedLocation, showProgressBar, showTaskMonitorComponent, stopProgressTimer, taskCancelled, taskCompleted, toFront, toString, waitForCurrentTask`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ERROR_MESSAGE

    public static final int ERROR_MESSAGE
    Used for error messages.
    See Also:
      - Constant Field Values

  - ### INFORMATION_MESSAGE

    public static final int INFORMATION_MESSAGE
    Used for information messages.
    See Also:
      - Constant Field Values

  - ### WARNING_MESSAGE

    public static final int WARNING_MESSAGE
    Used for warning messages.
    See Also:
      - Constant Field Values

  - ### QUESTION_MESSAGE

    public static final int QUESTION_MESSAGE
    Used for questions.
    See Also:
      - Constant Field Values

  - ### PLAIN_MESSAGE

    public static final int PLAIN_MESSAGE
    No icon is used.
    See Also:
      - Constant Field Values

- ## 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`