Package docking.widgets.dialogs
Class MultiLineMessageDialog
java.lang.Object
docking.DialogComponentProvider
docking.widgets.dialogs.MultiLineMessageDialog
- All Implemented Interfaces:
ActionContextProvider
,StatusListener
,TaskListener
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Used for error messages.static final int
Used for information messages.static final int
No icon is used.static final int
Used for questions.static final int
Used for warning messages.Fields inherited from class docking.DialogComponentProvider
applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
-
Constructor Summary
ConstructorDescriptionMultiLineMessageDialog
(String title, String shortMessage, String detailedMessage, int messageType, boolean modal) Creates a multi-line popup dialog. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
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, 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, 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
-
Field Details
-
ERROR_MESSAGE
public static final int ERROR_MESSAGEUsed for error messages.- See Also:
-
INFORMATION_MESSAGE
public static final int INFORMATION_MESSAGEUsed for information messages.- See Also:
-
WARNING_MESSAGE
public static final int WARNING_MESSAGEUsed for warning messages.- See Also:
-
QUESTION_MESSAGE
public static final int QUESTION_MESSAGEUsed for questions.- See Also:
-
PLAIN_MESSAGE
public static final int PLAIN_MESSAGENo 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 titleshortMessage
- a short message to display at the top of the dialogdetailedMessage
- the detailed messagemessageType
- 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 nulltitle
- - dialog titleshortMessage
- - short message that appears above the main message.detailedMessage
- - long scrollable message.messageType
- - seeERROR_MESSAGE
,INFORMATION_MESSAGE
,WARNING_MESSAGE
,QUESTION_MESSAGE
,PLAIN_MESSAGE
-
showMessageDialog
-
okCallback
protected void okCallback()Description copied from class:DialogComponentProvider
The callback method for when the "OK" button is pressed.- Overrides:
okCallback
in classDialogComponentProvider
-