java.lang.Object
org.tentackle.fx.DefaultInteractiveError
- All Implemented Interfaces:
InteractiveError
Default implementation for an interactive error.
- Author:
- harald
-
Constructor Summary
ConstructorDescriptionDefaultInteractiveError
(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.boolean
Returns whether this is just a warning.void
Shows 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:InteractiveError
Returns whether this is just a warning.- Specified by:
isWarning
in interfaceInteractiveError
- Returns:
- true if warning, false if error
-
getText
Description copied from interface:InteractiveError
Gets the error message.- Specified by:
getText
in interfaceInteractiveError
- Returns:
- the error text
-
getErrorCode
Description copied from interface:InteractiveError
Gets the optional error code.- Specified by:
getErrorCode
in interfaceInteractiveError
- Returns:
- the error code
-
getControl
Description copied from interface:InteractiveError
Gets the related FX control.- Specified by:
getControl
in interfaceInteractiveError
- Returns:
- the control, null if nothing related
-
showControl
public void showControl()Description copied from interface:InteractiveError
Shows 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:
showControl
in interfaceInteractiveError
-
getValidationResult
Description copied from interface:InteractiveError
Gets the optional validation result.- Specified by:
getValidationResult
in interfaceInteractiveError
- Returns:
- the result, null if none
-