- java.lang.Object
-
- org.tentackle.fx.rdc.DefaultInteractiveError
-
- All Implemented Interfaces:
InteractiveError
public class DefaultInteractiveError extends java.lang.Object implements InteractiveError
Default implementation for an interactive error.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description DefaultInteractiveError(boolean warning, java.lang.String text, java.lang.String errorCode, org.tentackle.validate.ValidationResult validationResult, org.tentackle.fx.FxControl control)Creates an interactive error.DefaultInteractiveError(InteractiveError error)Creates an error from another error.
Useful to override methods in anonymous inner classes.DefaultInteractiveError(org.tentackle.validate.ValidationResult validationResult, org.tentackle.fx.FxControl control)Creates an interactive error.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.tentackle.fx.FxControlgetControl()Gets the related FX control.java.lang.StringgetErrorCode()Gets the optional error code.java.lang.StringgetText()Gets the error message.org.tentackle.validate.ValidationResultgetValidationResult()Gets the optional validation result.booleanisWarning()Returns whether this is just a warning.voidshowControl()Shows the control to the user.
The default implementation requests the focus.java.lang.StringtoString()
-
-
-
Constructor Detail
-
DefaultInteractiveError
public DefaultInteractiveError(boolean warning, java.lang.String text, java.lang.String errorCode, org.tentackle.validate.ValidationResult validationResult, org.tentackle.fx.FxControl control)Creates an interactive error.- Parameters:
warning- true if just a warning, false if errortext- the error texterrorCode- the optional error codevalidationResult- the validation resultcontrol- the optional UI component related to the error, null if none
-
DefaultInteractiveError
public DefaultInteractiveError(org.tentackle.validate.ValidationResult validationResult, org.tentackle.fx.FxControl control)Creates an interactive error.- Parameters:
validationResult- the validation resultcontrol- the optional UI component related to the error, null if none
-
DefaultInteractiveError
public DefaultInteractiveError(InteractiveError error)
Creates an error from another error.
Useful to override methods in anonymous inner classes.- Parameters:
error- the error
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isWarning
public boolean isWarning()
Description copied from interface:InteractiveErrorReturns whether this is just a warning.- Specified by:
isWarningin interfaceInteractiveError- Returns:
- true if warning, false if error
-
getText
public java.lang.String getText()
Description copied from interface:InteractiveErrorGets the error message.- Specified by:
getTextin interfaceInteractiveError- Returns:
- the error text
-
getErrorCode
public java.lang.String getErrorCode()
Description copied from interface:InteractiveErrorGets the optional error code.- Specified by:
getErrorCodein interfaceInteractiveError- Returns:
- the error code
-
getControl
public org.tentackle.fx.FxControl getControl()
Description copied from interface:InteractiveErrorGets the related FX control.- Specified by:
getControlin interfaceInteractiveError- Returns:
- the control, null if nothing related
-
showControl
public void showControl()
Description copied from interface:InteractiveErrorShows the control to the user.
The default implementation requests the focus.Applications may override this method to switch tabs, point to rows in tables, etc...
- Specified by:
showControlin interfaceInteractiveError
-
getValidationResult
public org.tentackle.validate.ValidationResult getValidationResult()
Description copied from interface:InteractiveErrorGets the optional validation result.- Specified by:
getValidationResultin interfaceInteractiveError- Returns:
- the result, null if none
-
-