java.lang.Object
org.tentackle.fx.DefaultInteractiveError
- All Implemented Interfaces:
InteractiveError
Default implementation for an interactive error.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInteractiveError(boolean warning, String text, String errorCode, ValidationResult validationResult, FxControl control) Creates an interactive error.Creates an error from another error.
Useful to override methods in anonymous inner classes.DefaultInteractiveError(ValidationResult validationResult, FxControl control) Creates an interactive error. -
Method Summary
Modifier and TypeMethodDescriptionGets the related FX control.Gets the optional error code.getText()Gets the error message.Gets the optional validation result.booleanReturns whether this is just a warning.voidShows the control to the user.
The default implementation requests the focus.toString()
-
Constructor Details
-
DefaultInteractiveError
public DefaultInteractiveError(boolean warning, String text, String errorCode, ValidationResult validationResult, 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
Creates an interactive error.- Parameters:
validationResult- the validation resultcontrol- the optional UI component related to the error, null if none
-
DefaultInteractiveError
Creates an error from another error.
Useful to override methods in anonymous inner classes.- Parameters:
error- the error
-
-
Method Details
-
toString
-
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
Description copied from interface:InteractiveErrorGets the error message.- Specified by:
getTextin interfaceInteractiveError- Returns:
- the error text
-
getErrorCode
Description copied from interface:InteractiveErrorGets the optional error code.- Specified by:
getErrorCodein interfaceInteractiveError- Returns:
- the error code
-
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
Description copied from interface:InteractiveErrorGets the optional validation result.- Specified by:
getValidationResultin interfaceInteractiveError- Returns:
- the result, null if none
-