public class DefaultInteractiveError extends Object implements InteractiveError
| Constructor and Description |
|---|
DefaultInteractiveError()
Creates an empty interactive error.
|
DefaultInteractiveError(InteractiveError error)
Creates an error from another error.
Useful to override methods in anonymous inner classes. |
DefaultInteractiveError(String text,
org.tentackle.log.Logger.Level level,
String errorCode,
org.tentackle.validate.ValidationResult validationResult,
Object uiComponent)
Creates an error.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorCode()
Gets the optional error code.
|
FormComponent |
getFormComponent()
Gets the related swing GUI-component.
|
org.tentackle.log.Logger.Level |
getLevel()
Gets the severity level.
|
String |
getText()
Gets the error message.
|
Object |
getUiComponent()
Gets the related GUI-component.
|
org.tentackle.validate.ValidationResult |
getValidationResult()
Gets the optional validation result.
|
void |
setErrorCode(String errorCode)
Sets the optional error code.
|
void |
setLevel(org.tentackle.log.Logger.Level level)
Sets the severity level.
|
void |
setText(String text)
Sets the error message.
|
void |
setUiComponent(Object uiComponent)
Sets the related GUI-component.
|
void |
setValidationResult(org.tentackle.validate.ValidationResult validationResult)
Sets the optional validation result.
|
void |
showComponent()
Shows the component to the user.
The default implementation invokes FormComponent.requestFocusLater(). |
String |
toString() |
public DefaultInteractiveError(String text, org.tentackle.log.Logger.Level level, String errorCode, org.tentackle.validate.ValidationResult validationResult, Object uiComponent)
text - the error textlevel - the severity (usually Logger.Level.WARNING or Logger.Level.SEVERE)errorCode - the optional error codeuiComponent - the optional UI component related to the error, null if nonevalidationResult - the optional validation resultpublic DefaultInteractiveError(InteractiveError error)
error - the errorpublic DefaultInteractiveError()
public org.tentackle.log.Logger.Level getLevel()
InteractiveErrorgetLevel in interface InteractiveErrorLogger.Level.WARNING or Logger.Level.SEVEREpublic void setLevel(org.tentackle.log.Logger.Level level)
InteractiveErrorsetLevel in interface InteractiveErrorlevel - usually one of Logger.Level.WARNING or Logger.Level.SEVEREpublic String getText()
InteractiveErrorgetText in interface InteractiveErrorpublic void setText(String text)
InteractiveErrorsetText in interface InteractiveErrortext - the error textpublic String getErrorCode()
InteractiveErrorgetErrorCode in interface InteractiveErrorpublic void setErrorCode(String errorCode)
InteractiveErrorsetErrorCode in interface InteractiveErrorerrorCode - the error code.public FormComponent getFormComponent()
InteractiveErrorgetFormComponent in interface InteractiveErrorpublic Object getUiComponent()
InteractiveErrorgetUiComponent in interface InteractiveErrorpublic void setUiComponent(Object uiComponent)
InteractiveErrorsetUiComponent in interface InteractiveErroruiComponent - the component, null if nonepublic void showComponent()
InteractiveErrorFormComponent.requestFocusLater().
Applications may override this method to switch tabs, point to rows in tables, etc...
showComponent in interface InteractiveErrorpublic org.tentackle.validate.ValidationResult getValidationResult()
InteractiveErrorgetValidationResult in interface InteractiveErrorpublic void setValidationResult(org.tentackle.validate.ValidationResult validationResult)
InteractiveErrorsetValidationResult in interface InteractiveErrorvalidationResult - the resultTentackle - a domain driven enterprise framework