|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.util.errorhandlers.JOptionPaneErrorHandler
public class JOptionPaneErrorHandler
JOptionPaneErrorHandler is an error handler which displays a JOptionPane when handleError() is called. The JOptionPane displays the passed in message and an Ok button.
Field Summary | |
---|---|
protected java.awt.Component |
component
The frame to parent the JOptionPane dialog to. |
protected int |
messageType
|
protected java.lang.String |
overrideMessage
A message used to override the message returned by the validator. |
static java.lang.String |
RB_KEY
|
protected java.lang.String |
titleString
|
static java.lang.String |
validationErrorText
|
Constructor Summary | |
---|---|
JOptionPaneErrorHandler()
Default constructor |
|
JOptionPaneErrorHandler(java.awt.Component frame)
Constructor. |
|
JOptionPaneErrorHandler(java.awt.Component frame,
java.lang.String overrideMessage)
Constructor. |
|
JOptionPaneErrorHandler(java.lang.String overrideMessage)
Constructor. |
Method Summary | |
---|---|
int |
getMessageType()
Returns the message type. |
java.lang.String |
getTitle()
Returns the title that is going to be used on the JOptionPane. |
void |
handleError(java.lang.Object object,
com.sas.text.Message message,
java.lang.String messageCode)
handleError should perform whatever action is desired when an error occurs. |
void |
setMessageType(int messageType)
Sets the message type to be used. |
void |
setTitle(java.lang.String newTitle)
Sets the title to be used on the JOptionPane, null to remove the title. |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final java.lang.String validationErrorText
protected java.lang.String titleString
protected int messageType
protected java.awt.Component component
protected java.lang.String overrideMessage
Constructor Detail |
---|
public JOptionPaneErrorHandler()
public JOptionPaneErrorHandler(java.lang.String overrideMessage)
overrideMessage
- A message to display instead of the message returned by the validator.public JOptionPaneErrorHandler(java.awt.Component frame)
frame
- A java.awt.Component used to determine the parent frame for the JOptionPane dialog.public JOptionPaneErrorHandler(java.awt.Component frame, java.lang.String overrideMessage)
frame
- A java.awt.Component used to determine the parent frame for the JOptionPane dialog.overrideMessage
- A message to display instead of the message returned by the validator.Method Detail |
---|
public void setTitle(java.lang.String newTitle)
newTitle
- the new titlegetTitle()
public java.lang.String getTitle()
setTitle(String)
public int getMessageType()
setMessageType(int messageType)
public void setMessageType(int messageType)
messageType
- message type. Valid entries are:
- JOptionPane.INFORMATION_MESSAGE
- JOptionPane.WARNING_MESSAGE
- JOptionPane.QUESTION_MESSAGE
- JOptionPane.PLAIN_MESSAGE
- JOptionPane.ERROR_MESSAGE
If an invalid value is specified for the message type, the message type will be set to JOptionPane.ERROR_MESSAGE
getMessageType()
public void handleError(java.lang.Object object, com.sas.text.Message message, java.lang.String messageCode)
GenericErrorHandlerInterface
handleError
in interface GenericErrorHandlerInterface
message
- A Message object with formatted with the message to display.
The object should also contain the necessary arguments for
formatting the message.messageCode
- A non-translatable string which indicates the type of error that occured.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |