Package com.volantis.mcs.eclipse.validation

Examples of com.volantis.mcs.eclipse.validation.Validator


        ValidationMessageBuilder builder =
                new ValidationMessageBuilder(
                        ControlsMessages.getResourceBundle(),
                        messageKeyMappings,
                        null);
        Validator validator = new ColorValidator(NamedColor.getAllColors());
        return new IndependentValidator(validator, builder);
    }
View Full Code Here


     * Creates and returns a validator for validating the list of times.
     *
     * @return the independent validator to use
     */
    private static IndependentValidator createTimeListValidator() {
        Validator validator = new Validator() {
            private final ValidationStatus OK_STATUS =
                    new ValidationStatus(ValidationStatus.OK, "");

            public ValidationStatus validate(Object object,
                                             ValidationMessageBuilder builder) {
View Full Code Here

     * @param attributeName The name of the attribute.
     * @return the Validator associated with the named attribute
     * or null is there is none or attributeName was null.
     */
    public Validator getAttributeValidator(String attributeName) {
        Validator validator = null;

        if (attributeName != null) {

            Control control = getControl(attributeName);
            if (control != null) {
View Full Code Here

            ValidationStatus status = null;
            boolean valid = true;
            for (int i = 0; i < attributeNames.length && valid; i++) {
                String attrName = attributeNames[i];
                String value = attrsComposite.getAttributeValue(attrName);
                Validator validator =
                        attrsComposite.getAttributeValidator(attrName);
                if (value != null && validator != null) {
                    status = validateAttribute(attrName, value, validator);
                    valid = status.getSeverity() == IStatus.OK;
                }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.eclipse.validation.Validator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.