Package com.volantis.styling.properties

Examples of com.volantis.styling.properties.PropertyDetailsBuilder


    // Javadoc inherited.
    public IterationAction next(CSSProperty cssProperty) {
        final StyleProperty property = cssProperty.getStyleProperty();

        // Create a details builder that defaults to the standard details.
        PropertyDetailsBuilder builder = new PropertyDetailsBuilder(property);

        String policy = "x-css.properties." + property.getName() +
                    ".initial-value";


        // Get the standard initial value source.
        InitialValueSource initialValueSource =
                property.getStandardDetails().getInitialValueSource();
        InitialValueAccuracy accuracy = InitialValueAccuracy.ASSUMED;

        String value = device.getPolicyValue(policy);

        if (value == null || value.equals("") || value.equals("<default>")) {
            accuracy = InitialValueAccuracy.ASSUMED;
        } else if (value.equals("<unknown>")) {
            accuracy = InitialValueAccuracy.UNKNOWN;
            initialValueSource = null;
        } else if (value.equals("<standard>")) {
            accuracy = InitialValueAccuracy.KNOWN;
        } else {

            // Parse the property.
            StyleValue initial = cssParser.parseStyleValue(property, value);
            if (initial != null) {
                initialValueSource = new FixedInitialValue(initial);
                accuracy = InitialValueAccuracy.KNOWN;
            }
        }

        builder.setInitialValueSource(initialValueSource);
        builder.setInitialValueAccuracy(accuracy);

        detailsSetBuilder.addBuilder(builder);

        return IterationAction.CONTINUE;
    }
View Full Code Here

TOP

Related Classes of com.volantis.styling.properties.PropertyDetailsBuilder

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.