Module org.controlsfx.controls
Class AbstractValidationDecoration
- java.lang.Object
-
- org.controlsfx.validation.decoration.AbstractValidationDecoration
-
- All Implemented Interfaces:
ValidationDecoration
- Direct Known Subclasses:
CompoundValidationDecoration
,GraphicValidationDecoration
,StyleClassValidationDecoration
public abstract class AbstractValidationDecoration extends Object implements ValidationDecoration
Implements common functionality for validation decorators. This class intended as a base for custom validation decorators Custom validation decorator should define only two things: how 'validation' and 'required' decorations should be created
SeeGraphicValidationDecoration
orStyleClassValidationDecoration
for examples of such implementations.
-
-
Constructor Summary
Constructors Constructor Description AbstractValidationDecoration()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
applyRequiredDecoration(Control target)
Applies 'required' decoration to a given controlvoid
applyValidationDecoration(ValidationMessage message)
Applies validation decoration based on a given validation messageprotected abstract Collection<Decoration>
createRequiredDecorations(Control target)
protected abstract Collection<Decoration>
createValidationDecorations(ValidationMessage message)
void
removeDecorations(Control target)
Removes all validation related decorations from the target
-
-
-
Method Detail
-
createValidationDecorations
protected abstract Collection<Decoration> createValidationDecorations(ValidationMessage message)
-
createRequiredDecorations
protected abstract Collection<Decoration> createRequiredDecorations(Control target)
-
removeDecorations
public void removeDecorations(Control target)
Removes all validation related decorations from the target- Specified by:
removeDecorations
in interfaceValidationDecoration
- Parameters:
target
- control
-
applyValidationDecoration
public void applyValidationDecoration(ValidationMessage message)
Description copied from interface:ValidationDecoration
Applies validation decoration based on a given validation message- Specified by:
applyValidationDecoration
in interfaceValidationDecoration
- Parameters:
message
- validation message
-
applyRequiredDecoration
public void applyRequiredDecoration(Control target)
Description copied from interface:ValidationDecoration
Applies 'required' decoration to a given control- Specified by:
applyRequiredDecoration
in interfaceValidationDecoration
- Parameters:
target
- control
-
-