public interface ValidationVisualizer
A single instance of a visualizer is connected to a single ValidationStatus
that it visualizes. When the
state of the ValidationStatus
changes the visualizer has to react to these changes and update it's decoration
accordingly.
Besides showing validation messages the job of the visualizer is to mark an input control as mandatory. Note that this mark is only a visual effect and has no effect to the actual validation logic.
Instead of directly implementing this interface implementors of custom visualizers should consider to extend from the
base class ValidationVisualizerBase
. This base class handles the live cycle of the ValidationStatus
(i.e. listeners on the observable lists of validation messages). The implementor only needs to implement on how a
single message should be shown and how a control is marked as mandatory.
Modifier and Type | Method and Description |
---|---|
default void |
initVisualization(ValidationStatus status,
javafx.scene.control.Control control)
Initialize this visualization so that it visualizes the given
ValidationStatus on the given input
control. |
void |
initVisualization(ValidationStatus status,
javafx.scene.control.Control control,
boolean mandatory)
Initialize this visualization so that it visualizes the given
ValidationStatus on the given input
control. |
default void initVisualization(ValidationStatus status, javafx.scene.control.Control control)
ValidationStatus
on the given input
control.status
- the status that is visualized.control
- the control that will be decorated.void initVisualization(ValidationStatus status, javafx.scene.control.Control control, boolean mandatory)
ValidationStatus
on the given input
control.status
- the status that is visualized.control
- the control that will be decorated.mandatory
- a boolean flag indicating whether this input value is mandatory or not.Copyright © 2015 Saxonia Systems AG. All rights reserved.