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.
 
Fields inherited from interface org.ocd.alert.IAlertManager
CANCEL, NO, NONE, OK, OK_CANCEL, YES, YES_NO, YES_NO_CANCEL
 
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
 

Field Detail

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
Method Detail

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 Message
pTitle - title of the dialog
pMessage -  

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 Dialog
icon - to show with the Message
title - title of the dialog
message -  
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 Message
pTitle - title of the dialog
pMessage -  
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 Alert
message - message to show on WorkInProgress Alert
closeable - true if the alert can be closed.
Returns:
the IOWWorkInProgressAlert that was created.