@OpenApiAll
public class GUILog
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GUILog.DefaultURLActionHandler
Default implementation for URLActionHandler
|
static interface |
GUILog.URLActionHandler
An URL handler
|
| Constructor and Description |
|---|
GUILog() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHyperlinkedText(java.lang.String text,
java.util.Map<java.lang.String,java.lang.Runnable> callbacks)
Display text with hyperlinks.
|
static java.util.Map<java.lang.String,java.lang.Runnable> |
addURLCallBack(java.util.Map<java.lang.String,java.lang.Runnable> map,
java.lang.String string,
java.lang.String href)
Adds callback to open href to the map.
|
void |
clearLog()
Clear message window.
|
void |
clearMessageWindow()
Clear message window.
|
static java.lang.String |
createActionURL(NMAction action)
An utility method to create URL to some action.
|
static java.lang.String |
createActionURLWithText(NMAction action)
An utility method to create URL to some action with
|
static java.lang.String |
createActionURLWithText(NMAction action,
java.lang.String text)
An utility method to create URL to some action with
|
java.lang.String |
getLoggedMessages()
An utility method get all logged messages
(This GUILog class provides a method to get the LogDialog, but the LogDialog is not part of the OpenAPI
and therefore not accessible by code that will want to use it.)
|
void |
log(Notification notification,
boolean openWindow)
Logs notification
|
void |
log(java.lang.String msg)
Writes message to message window.
|
void |
log(java.lang.String msg,
boolean open)
Writes message to log window.
|
void |
logNotification(java.lang.String title,
java.lang.String text,
HRefRunnable[] actions,
NotificationSeverity severity,
Notification.Context context)
Logs notification
|
void |
logNotification(java.lang.String title,
java.lang.String text,
NotificationSeverity severity,
Notification.Context context)
Logs notification
|
void |
openLog()
Opens message window.
|
void |
openMessageWindow()
Opens message window.
|
boolean |
showCustomizedQuestion(java.lang.String msg,
java.lang.String okLabelKey,
java.lang.String cancelLabelKey,
java.lang.String title,
java.lang.String icon)
Show customized Cancel/Ok question in a model dialog
|
void |
showError(java.awt.Dialog parent,
java.lang.String message,
java.lang.Throwable exc)
Method shows Error and stack trace dialog
|
void |
showError(java.awt.Frame parent,
java.lang.String msg)
Method shows Error dialog.
|
void |
showError(java.awt.Frame parent,
java.lang.String msg,
java.lang.String title)
Shows error dialog
|
void |
showError(java.awt.Frame parent,
java.lang.String message,
java.lang.Throwable exc)
Method shows Error and stack trace dialog.
|
void |
showError(java.lang.String msg)
Shows the error dialog with given message
|
void |
showError(java.lang.String message,
java.lang.Throwable exc)
Method shows Error and stack trace dialog
|
void |
showErrorWithHelp(java.lang.String message,
java.lang.String helpID)
Shows the error dialog with given message.
|
int |
showErrorWithRetry(java.lang.String message,
java.lang.String title,
java.lang.Throwable exp)
Method shows Error and stack trace dialog with Submit, Export, Cancel and
Retry buttons.
|
void |
showHTMLMessage(java.lang.String msg,
GUILog.URLActionHandler handler)
Shows the message dialog with given message.
|
void |
showHTMLMessage(java.lang.String msg,
java.lang.String helpID,
GUILog.URLActionHandler handler)
Shows the message dialog with given message.
|
void |
showHTMLMessage(java.lang.String msg,
java.lang.String title,
java.lang.String helpID,
GUILog.URLActionHandler handler)
Shows the message dialog with given message.
|
void |
showHTMLMessage(java.lang.String msg,
java.lang.String title,
java.lang.String helpID,
GUILog.URLActionHandler handler,
java.lang.String icon)
Shows the message dialog with given message.
|
void |
showMessage(java.awt.Dialog parent,
java.lang.String msg)
Shows the message dialog with the given message.
|
void |
showMessage(java.lang.String msg)
Shows the message dialog with given message.
|
void |
showMessage(java.lang.String msg,
java.lang.String helpID)
Shows the message dialog with the given message.
|
boolean |
showMessage(java.lang.String msg,
java.lang.String checkBoxMsg,
boolean checkBoxValue)
Shows the message dialog with given message.
|
void |
showMessage(java.lang.String msg,
java.lang.String title,
java.lang.String helpID)
Shows the message dialog with given message.
|
void |
showMessage(java.lang.String msg,
java.lang.String title,
java.lang.String helpID,
java.lang.String icon)
Shows the message dialog with given message.
|
void |
showMessageWithShowNextTime(java.lang.String msg,
java.lang.String property_id)
Shows the message dialog with given message and with label to show next time.
|
void |
showOutOfMemoryError(java.lang.String message)
Display out of memory error.
|
boolean |
showQuestion(java.lang.String msg)
Shows the yes-no dialog dialog with given message.
|
int |
showQuestion(java.lang.String msg,
boolean cancel)
Shows the yes-no dialog dialog with given message.
|
int |
showQuestion(java.lang.String msg,
boolean cancel,
java.lang.String dialogTitle)
Shows the yes-no dialog with given message.
|
int |
showQuestion(java.lang.String msg,
boolean cancel,
java.lang.String dialogTitle,
java.lang.String defaultAction)
Shows the yes-no dialog with given message.
|
boolean |
showQuestion(java.lang.String msg,
java.lang.String helpID)
Shows the yes-no-help dialog dialog with given message.
|
int |
showQuestion(java.lang.String msg,
java.lang.String yesLabel,
java.lang.String noLabel,
java.lang.String cancelLabel,
java.lang.String icon)
Shows dialogs with given button text
|
int |
showQuestion(java.lang.String msg,
java.lang.String yesLabel,
java.lang.String noLabel,
java.lang.String cancelLabel,
java.lang.String title,
java.lang.String icon)
Shows dialogs with given button text
|
int |
showQuestionForAll(java.lang.String msg)
Shows the yes-no-all dialog dialog with given message.
|
int |
showQuestionForAll(java.lang.String msg,
boolean cancel)
Shows the yes-no-all dialog dialog with given message.
|
boolean |
showQuestionOkCancel(java.lang.String msg)
Shows the ok-cancel dialog dialog with given message.
|
boolean |
showQuestionWithHelp(java.lang.String msg,
java.lang.String notificationMsg,
java.lang.String okLabelKey,
java.lang.String title,
java.lang.String helpID)
Show customized Ok/Cancel/Help question in a modal dialog.
|
int |
showRetryQuestion(java.lang.String msg)
Shows the yes-no dialog dialog with given message
|
void |
showWarning(java.lang.String msg)
Shows the warning dialog with given message.
|
boolean |
showWarning(java.lang.String msg,
java.lang.String checkBoxMsg,
boolean checkBoxValue)
Shows the warning dialog with given message.
|
boolean |
showWarningQuestion(java.lang.String msg,
java.lang.String okLabelKey,
java.lang.String title)
Show customized Cancel/Ok question in a modal dialog.
|
boolean |
showWarningQuestion(java.lang.String msg,
java.lang.String okLabelKey,
java.lang.String cancelLabelKey,
java.lang.String title)
Show customized Cancel/Ok question in a model dialog
|
boolean |
showYesNoHelp(java.lang.String msg,
java.lang.String helpID,
java.lang.String title,
java.lang.String icon)
Shows the yes-no-help dialog with given message.
|
static java.lang.String |
wrapForHeyperlinkText(java.lang.String text)
Deprecated.
Misspelled - use
wrapForHyperlinkText(String) |
static java.lang.String |
wrapForHyperlinkText(java.lang.String str)
Helper method to wrap given string into string suitable to use for hyperlinked log.
|
void |
writeLogText(java.lang.String msg,
boolean open)
Writes message to log window.
|
public void showError(@CheckForNull
java.awt.Frame parent,
java.lang.String msg)
parent - parent of error dialogmsg - Error messagepublic void showError(@CheckForNull
java.awt.Frame parent,
java.lang.String msg,
java.lang.String title)
parent - the parent of error dialogmsg - the error messagetitle - the dialog titlepublic void showError(@CheckForNull
java.awt.Frame parent,
java.lang.String message,
java.lang.Throwable exc)
parent - parent of error dialogmessage - error messageexc - throwable provides stack trace to displaypublic void showError(java.awt.Dialog parent,
java.lang.String message,
@CheckForNull
java.lang.Throwable exc)
parent - parent of error dialogmessage - error messageexc - throwable provides stack trace to displaypublic void showError(java.lang.String msg)
msg - error messagepublic void showError(java.lang.String message,
@CheckForNull
java.lang.Throwable exc)
message - error message.exc - throwable provides stack trace to displaypublic int showErrorWithRetry(java.lang.String message,
java.lang.String title,
@Nonnull
java.lang.Throwable exp)
DialogConstants.OK, if Cancel - DialogConstants.CANCEL.message - error messagetitle - dialog titleexp - throwable provides stack trace to displaypublic void showMessage(java.lang.String msg)
msg - message textpublic void showHTMLMessage(java.lang.String msg,
@CheckForNull
GUILog.URLActionHandler handler)
msg - message texthandler - handlerpublic void showMessage(java.lang.String msg,
@CheckForNull
java.lang.String helpID)
msg - message texthelpID - help item ID in help systempublic void showHTMLMessage(java.lang.String msg,
@CheckForNull
java.lang.String helpID,
@CheckForNull
GUILog.URLActionHandler handler)
msg - message text.helpID - help item ID in help systemhandler - handlerpublic void showMessage(java.lang.String msg,
java.lang.String title,
@CheckForNull
java.lang.String helpID,
java.lang.String icon)
msg - message texttitle - title of the dialoghelpID - help item ID in help systemicon - path to icon image (for example "/com/company/icon.gif")public void showMessage(java.lang.String msg,
java.lang.String title,
@CheckForNull
java.lang.String helpID)
msg - message texttitle - title of the dialoghelpID - help item ID in help systempublic void showHTMLMessage(java.lang.String msg,
java.lang.String title,
@CheckForNull
java.lang.String helpID,
@CheckForNull
GUILog.URLActionHandler handler)
msg - message text.title - title of the dialog.helpID - help item ID in help systemhandler - url action handlerpublic void showHTMLMessage(java.lang.String msg,
java.lang.String title,
@CheckForNull
java.lang.String helpID,
@CheckForNull
GUILog.URLActionHandler handler,
java.lang.String icon)
msg - message texttitle - title of the dialoghelpID - help item ID in help systemhandler - url action handlericon - path to icon image (for example "/com/company/icon.gif")public boolean showMessage(java.lang.String msg,
java.lang.String checkBoxMsg,
boolean checkBoxValue)
msg - message text.checkBoxMsg - check box messagecheckBoxValue - check box statepublic void showMessage(java.awt.Dialog parent,
java.lang.String msg)
parent - dialog parentmsg - message textpublic void showMessageWithShowNextTime(java.lang.String msg,
java.lang.String property_id)
msg - message textproperty_id - registered invisible property id in the GeneralOptions with default value trueGeneralOptionsGrouppublic boolean showQuestion(java.lang.String msg)
msg - message of question.public int showQuestion(java.lang.String msg,
boolean cancel)
cancel - true if cancel button neededmsg - message of question.DialogConstantspublic int showQuestion(java.lang.String msg,
boolean cancel,
java.lang.String dialogTitle)
cancel - true if cancel button needed.msg - message of question.dialogTitle - title of the dialog.DialogConstantspublic int showQuestion(java.lang.String msg,
boolean cancel,
java.lang.String dialogTitle,
@CheckForNull
java.lang.String defaultAction)
cancel - true if cancel button needed.msg - message of question.dialogTitle - title of the dialog.defaultAction - default selected action (button) in the question dialog.DialogConstantspublic int showQuestion(java.lang.String msg,
java.lang.String yesLabel,
java.lang.String noLabel,
@CheckForNull
java.lang.String cancelLabel,
java.lang.String icon)
msg - message of question.yesLabel - label key in dialog resources used instead of "Yes" text.noLabel - label key in dialog resources used instead of "No" text.cancelLabel - label key in dialog resources used instead of "Cancel" text, can be null.icon - path to icon image (for example "/com/company/icon.gif")DialogConstantspublic int showQuestion(java.lang.String msg,
java.lang.String yesLabel,
java.lang.String noLabel,
@CheckForNull
java.lang.String cancelLabel,
java.lang.String title,
java.lang.String icon)
msg - message of question.yesLabel - label key in dialog resources used instead of "Yes" text.noLabel - label key in dialog resources used instead of "No" text.cancelLabel - label key in dialog resources used instead of "Cancel" text, can be null.title - title of the dialog.icon - path to icon image (for example "/com/company/icon.gif")DialogConstantspublic boolean showQuestionOkCancel(java.lang.String msg)
msg - message of question.DialogConstantspublic boolean showQuestion(java.lang.String msg,
java.lang.String helpID)
msg - message of question.helpID - help item ID in help systempublic boolean showYesNoHelp(java.lang.String msg,
java.lang.String helpID,
java.lang.String title,
java.lang.String icon)
msg - message of question.helpID - help item ID in help systemtitle - titleicon - path to icon image (for example "/com/company/icon.gif")public int showQuestionForAll(java.lang.String msg)
msg - message text.DialogConstantspublic int showQuestionForAll(java.lang.String msg,
boolean cancel)
msg - messagecancel - true if cancel button neededDialogConstantspublic int showRetryQuestion(java.lang.String msg)
msg - Message TextDialogConstantspublic void showWarning(java.lang.String msg)
msg - warning text.public boolean showWarning(java.lang.String msg,
java.lang.String checkBoxMsg,
boolean checkBoxValue)
msg - message text.checkBoxMsg - check box messagecheckBoxValue - check box statepublic void log(Notification notification, boolean openWindow)
notification - notificationopenWindow - flag, if true opens notification windowpublic void logNotification(@CheckForNull
java.lang.String title,
@CheckForNull
java.lang.String text,
NotificationSeverity severity,
Notification.Context context)
title - notification titletext - notification textseverity - notification severitycontext - notification contextpublic void logNotification(@CheckForNull
java.lang.String title,
@CheckForNull
java.lang.String text,
@CheckForNull
HRefRunnable[] actions,
NotificationSeverity severity,
Notification.Context context)
title - notification titletext - notification textseverity - notification severityactions - list of actionscontext - notification contextpublic void openMessageWindow()
public void openLog()
public void clearLog()
public void clearMessageWindow()
public void log(java.lang.String msg)
msg - message text.public void log(java.lang.String msg,
boolean open)
msg - message text.open - true if closed window should be reopened.public void writeLogText(java.lang.String msg,
boolean open)
msg - message text.open - true if closed window should be reopened.public void showOutOfMemoryError(java.lang.String message)
message - messagepublic void showErrorWithHelp(java.lang.String message,
java.lang.String helpID)
message - message texthelpID - help item ID in help systempublic void addHyperlinkedText(java.lang.String text,
java.util.Map<java.lang.String,java.lang.Runnable> callbacks)
text - text with hyperlinks for example "blabla <A>hyperlink text to display</A> blabla." text can contain any number of href.callbacks - map where is mapped hyperlinked text to the callback runnable. Map must contain String key and Runnable value.wrapForHyperlinkText(String)public static java.lang.String wrapForHyperlinkText(java.lang.String str)
str - target string for hyperlinkaddHyperlinkedText(String, java.util.Map)@Deprecated public static java.lang.String wrapForHeyperlinkText(java.lang.String text)
wrapForHyperlinkText(String)text - text to wrappublic static java.util.Map<java.lang.String,java.lang.Runnable> addURLCallBack(@CheckForNull
java.util.Map<java.lang.String,java.lang.Runnable> map,
java.lang.String string,
java.lang.String href)
addHyperlinkedText(String, Map)map - map to which callback isstring - text fragment which is hyper linkhref - referencepublic static java.lang.String createActionURL(@Nonnull
NMAction action)
action - actionpublic static java.lang.String createActionURLWithText(NMAction action)
action - actionpublic static java.lang.String createActionURLWithText(NMAction action, java.lang.String text)
action - actiontext - url textpublic java.lang.String getLoggedMessages()
public boolean showQuestionWithHelp(java.lang.String msg,
java.lang.String notificationMsg,
java.lang.String okLabelKey,
java.lang.String title,
java.lang.String helpID)
msg - message to shownotificationMsg - notification message to show if silent mode is onokLabelKey - label key in DialogResource.properties for the Ok buttontitle - dialog titlehelpID - help item ID in help systempublic boolean showWarningQuestion(java.lang.String msg,
java.lang.String okLabelKey,
java.lang.String title)
msg - message to showokLabelKey - label key in DialogResource.properties for the Ok buttontitle - dialog titlepublic boolean showWarningQuestion(java.lang.String msg,
java.lang.String okLabelKey,
java.lang.String cancelLabelKey,
java.lang.String title)
msg - the message to showokLabelKey - the label key in DialogResource.properties for the Ok buttoncancelLabelKey - the label key in DialogResource.properties for the Cancel
buttontitle - the dialog titletrue if Ok was pressed, false otherwisepublic boolean showCustomizedQuestion(java.lang.String msg,
java.lang.String okLabelKey,
java.lang.String cancelLabelKey,
java.lang.String title,
java.lang.String icon)
msg - the message to showokLabelKey - the label key in DialogResource.properties for the Ok buttoncancelLabelKey - the label key in DialogResource.properties for the Cancel
buttontitle - the dialog titleicon - the dialog icontrue if Ok was pressed, false otherwise