gui.dialog
Class DialogContentPane.CheckError

java.lang.Object
  extended by gui.dialog.DialogContentPane.CheckError
Enclosing class:
DialogContentPane

public static class DialogContentPane.CheckError
extends java.lang.Object

A CheckError is used to set error conditions that prohibit operations. The error conditions may contain a message that is dispayed to the user and may do some additional actions.


Field Summary
private  int m_logType
           
private  java.lang.String m_strMessage
           
private  java.lang.Throwable m_throwable
           
 
Constructor Summary
DialogContentPane.CheckError()
          Creates a new CheckError that does not show any message to the user.
DialogContentPane.CheckError(java.lang.String a_strMessage, int a_logType)
          A new CheckError with a message for the user.
DialogContentPane.CheckError(java.lang.String a_strMessage, int a_logType, java.lang.Throwable a_throwable)
          A new CheckError with a message for the user.
 
Method Summary
 void doErrorAction()
          The action that is done if this error is handled by any method.
 int getLogType()
          Returns the LogType of this CheckError.
 java.lang.String getMessage()
          Returns the message to display to the user or null if this CheckError does not contain any message.
 java.lang.Throwable getThrowable()
          Returns the throwable to be logged or null if this CheckError does not contain any Throwable.
 boolean hasDisplayableErrorMessage()
          Returns if a user-displayable error message can be extracted from this CheckError.
 void undoErrorAction()
          The action that is done to reset the state before the call of doErrorAction().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_strMessage

private java.lang.String m_strMessage

m_logType

private int m_logType

m_throwable

private java.lang.Throwable m_throwable
Constructor Detail

DialogContentPane.CheckError

public DialogContentPane.CheckError()
Creates a new CheckError that does not show any message to the user.


DialogContentPane.CheckError

public DialogContentPane.CheckError(java.lang.String a_strMessage,
                                    int a_logType)
A new CheckError with a message for the user.

Parameters:
a_strMessage - a message for the user; if empty, no message is displayed; if null, an error message is auto-generated
a_logType - the LogType for this error

DialogContentPane.CheckError

public DialogContentPane.CheckError(java.lang.String a_strMessage,
                                    int a_logType,
                                    java.lang.Throwable a_throwable)
A new CheckError with a message for the user.

Parameters:
a_strMessage - a message for the user; if empty, no message is displayed; if null, an error message is auto-generated
a_logType - the LogType for this error
a_throwable - a throwable that should be logged
Method Detail

doErrorAction

public void doErrorAction()
The action that is done if this error is handled by any method.


undoErrorAction

public void undoErrorAction()
The action that is done to reset the state before the call of doErrorAction(). All methods that interpret doErrorAction() should interpret undoErrorAction() and call undoErrorAction() on all errors on that it had called doErrorAction() before interpreting new errors.


getLogType

public final int getLogType()
Returns the LogType of this CheckError.

Returns:
the LogType of this CheckError

getThrowable

public final java.lang.Throwable getThrowable()
Returns the throwable to be logged or null if this CheckError does not contain any Throwable.

Returns:
the throwable to be logged or null if this CheckError does not contain any Throwable.

getMessage

public final java.lang.String getMessage()
Returns the message to display to the user or null if this CheckError does not contain any message.

Returns:
the message to display to the user or null if this CheckError does not contain any message.

hasDisplayableErrorMessage

public final boolean hasDisplayableErrorMessage()
Returns if a user-displayable error message can be extracted from this CheckError.

Returns:
if a user-displayable error message can be extracted from this CheckError