/** * Redecorates all known components * Only decorations related to validation are affected */ // TODO needs optimization public void redecorate() { Optional<ValidationDecoration> odecorator = Optional.ofNullable(getValidationDecorator()); for (Control target : getRegisteredControls()) { odecorator.ifPresent( decorator -> { decorator.removeDecorations(target); decorator.applyRequiredDecoration(target); if ( dataChanged.get() && isErrorDecorationEnabled()) { getHighestMessage(target).ifPresent(msg -> decorator.applyValidationDecoration(msg)); } }); } }