private final NodeController constraintController;
public PropertyElementController(final AbstractFXForm fxForm, PropertyElement element) {
super(fxForm, element);
PropertyElementValidator validator = ((PropertyEditorController) editorController).getPropertyElementValidator();
validator.constraintViolationsProperty().addListener(new ListChangeListener<ConstraintViolation>() {
@Override
public void onChanged(Change<? extends ConstraintViolation> change) {
while (change.next()) {
fxForm.getConstraintViolations().addAll(change.getAddedSubList());
fxForm.getConstraintViolations().removeAll(change.getRemoved());
}
}
});
constraintController = new ConstraintController(fxForm, element, validator.constraintViolationsProperty());
updateSkin((FXFormSkin) fxForm.getSkin());
validator.invalidProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean aBoolean2) {
if (aBoolean2) {
addStyle(FXForm.INVALID_STYLE);
} else {
removeStyle(FXForm.INVALID_STYLE);
}
}
});
validator.warningProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean aBoolean2) {
if (aBoolean2) {
addStyle(FXForm.WARNING_STYLE);
} else {