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 intERROR_MESSAGEUsed for error messages.static intINFORMATION_MESSAGEUsed for information messages.static intPLAIN_MESSAGENo icon is used.static intQUESTION_MESSAGEUsed for questions.static intWARNING_MESSAGEUsed for warning messages.-
Fields inherited from class docking.DialogComponentProvider
applyButton, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Constructor Description MultiLineMessageDialog(java.lang.String title, java.lang.String shortMessage, java.lang.String detailedMessage, int messageType, boolean modal)Creates a multi-line popup dialog.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidokCallback()The callback method for when the "OK" button is pressed.static voidshowMessageDialog(java.awt.Component parent, java.lang.String title, java.lang.String shortMessage, java.lang.String detailedMessage, int messageType)static voidshowModalMessageDialog(java.awt.Component parent, java.lang.String title, java.lang.String shortMessage, java.lang.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, dialogClosed, dialogShown, dismissCallback, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getIntialLocation, getLocationOnScreen, getPreferredSize, getRemberSize, getRememberLocation, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, main, notifyContextChanged, removeAction, removeButton, removeWorkPanel, repack, 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 Detail
-
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 Detail
-
MultiLineMessageDialog
public MultiLineMessageDialog(java.lang.String title, java.lang.String shortMessage, java.lang.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 Detail
-
showModalMessageDialog
public static void showModalMessageDialog(java.awt.Component parent, java.lang.String title, java.lang.String shortMessage, java.lang.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
public static void showMessageDialog(java.awt.Component parent, java.lang.String title, java.lang.String shortMessage, java.lang.String detailedMessage, int messageType)
-
okCallback
protected void okCallback()
Description copied from class:DialogComponentProviderThe callback method for when the "OK" button is pressed.- Overrides:
okCallbackin classDialogComponentProvider
-
-