org.ocd.alert
Class AlertManager
java.lang.Object
|
+--org.ocd.alert.AlertManager
- All Implemented Interfaces:
- IAlertManager
- public class AlertManager
- extends java.lang.Object
- implements IAlertManager
Provides an implementation for the Alert Manager. The alert manager can be used to display a message
to the user or ask the user a confirmation question.
Field Summary |
static javax.swing.ImageIcon |
defaultErrorIcon
Default Error Icon |
static java.lang.String |
DIALOG_RESULT
Client Property used to contain the dialog result. |
Method Summary |
static IAlertManager |
getDefaultAlertManager()
Get the default Alert Manager |
int |
showConfirm(java.awt.Frame owner,
javax.swing.Icon icon,
java.lang.String title,
java.lang.String message,
int type)
Ask the User for a Confirmation |
void |
showError(java.awt.Frame owner,
javax.swing.Icon icon,
java.lang.String title,
java.lang.String message,
java.lang.Throwable exception)
Show an Error to the User |
void |
showMessage(java.awt.Frame owner,
javax.swing.Icon pIcon,
java.lang.String pTitle,
java.lang.String pMessage)
Show a Message to the User |
IWorkInProgressAlert |
showWorkInProgress(java.awt.Frame owner,
java.lang.String title,
java.lang.String message,
boolean closeable)
Show a WorkInProgress Alert with a Status Message |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DIALOG_RESULT
public static final java.lang.String DIALOG_RESULT
- Client Property used to contain the dialog result.
defaultErrorIcon
public static javax.swing.ImageIcon defaultErrorIcon
- Default Error Icon
getDefaultAlertManager
public static IAlertManager getDefaultAlertManager()
- Get the default Alert Manager
showMessage
public void showMessage(java.awt.Frame owner,
javax.swing.Icon pIcon,
java.lang.String pTitle,
java.lang.String pMessage)
- Show a Message to the User
- Specified by:
showMessage
in interface IAlertManager
- Parameters:
pIcon
- to show with the MessagepTitle
- title of the dialogpMessage
-
showError
public void showError(java.awt.Frame owner,
javax.swing.Icon icon,
java.lang.String title,
java.lang.String message,
java.lang.Throwable exception)
- Show an Error to the User
- Specified by:
showError
in interface IAlertManager
- Parameters:
Frame
- that owns this Dialogicon
- to show with the Messagetitle
- title of the dialogmessage
- exception
- that caused this Error or null
showConfirm
public int showConfirm(java.awt.Frame owner,
javax.swing.Icon icon,
java.lang.String title,
java.lang.String message,
int type)
- Ask the User for a Confirmation
- Specified by:
showConfirm
in interface IAlertManager
- Parameters:
pIcon
- to show with the MessagepTitle
- title of the dialogpMessage
- - Returns:
- the id of the selection OK, CANCEL, YES, NO
showWorkInProgress
public IWorkInProgressAlert showWorkInProgress(java.awt.Frame owner,
java.lang.String title,
java.lang.String message,
boolean closeable)
- Show a WorkInProgress Alert with a Status Message
- Specified by:
showWorkInProgress
in interface IAlertManager
- Parameters:
title
- title of the Alertmessage
- message to show on WorkInProgress Alertcloseable
- true if the alert can be closed.- Returns:
- the IOWWorkInProgressAlert that was created.