Panel som ligger p� toppen av orinalt panel for � vise eventuelle valideringsfeil Can display validation feedback icons "over" a content panel. It observes a ValidationResultModel and creates icon labels in a feedback layer of a {@link JLayeredPane} on top of the content layer. To position thefeedback labels, the content pane is traversed and searched for text components that match a validation message key in this panel's observed ValidationResultModel.
Note: This panel doesn't reserve space for the portion used to display the overlayed feedback components. It has been designed to not change the layout of the wrapped content. Therefore you must reserve this space, or in other words, you must ensure that the wrapped content provides enough space to display the overlayed components. Since the current implementation positions the overlay components in the lower left, just make sure that there are about 6 pixel to the left and bottom of the input components that can be marked.
This panel handles two event types:
- the ValidationResultModel changes; in this case the set of visible feedback components shall mark the input components that match the new validation result. This is done by this class' internal
ValidationResultChangeHandler
which in turn invokes #updateFeedbackComponents
. - the content layout changes; the feedback components must then be repositioned to reflect the position of the overlayed input components. This is done by overriding
#validateTree
and invoking #repositionFeedBackComponents
after the child tree has been layed out. The current simple but expensive implementation updates all components.