Search in sources :

Example 1 with IconValidation

use of org.ovirt.engine.ui.uicommonweb.validation.IconValidation in project ovirt-engine by oVirt.

the class IconEditorWidget method validateIcon.

private void validateIcon() {
    final IconWithOsDefault oldValue = getValue();
    createValidationImageElement(icon, new ImageElementCallback() {

        @Override
        public void onElementReady(ImageElement imageElement) {
            validationResult = new IconValidation(imageElement).validate(icon);
            updateErrorIconLabel(validationResult);
            final IconWithOsDefault newValue = getValue();
            ValueChangeEvent.fireIfNotEqual(IconEditorWidget.this, oldValue, newValue);
        }
    });
}
Also used : ImageElement(com.google.gwt.dom.client.ImageElement) IconWithOsDefault(org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault) IconValidation(org.ovirt.engine.ui.uicommonweb.validation.IconValidation)

Aggregations

ImageElement (com.google.gwt.dom.client.ImageElement)1 IconWithOsDefault (org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault)1 IconValidation (org.ovirt.engine.ui.uicommonweb.validation.IconValidation)1