Examples of StyleProperty


Examples of com.volantis.styling.properties.StyleProperty

                    StylePropertyDetails.MCS_SYSTEM_FONT);
            cost += StyleShorthands.FONT.getName().length() + 1 +
                    systemFont.getStandardCost();

            for (int i = 0; i < FontShorthandValue.PROPERTIES.length; i++) {
                StyleProperty property = FontShorthandValue.PROPERTIES[i];
                StyleValue value = inputValues.getStyleValue(property);
                if (value != UnknownFontValue.INSTANCE && value != null) {
                    cost += 1 + property.getName().length() + 1 +
                            value.getStandardCost();
                }
            }
        } else {
            cost = standardAnalyzer.getShorthandCost(requiredForIndividual,
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

        InitialValueFinder initialValueFinder = new InitialValueFinder();
        Styles styles = new StylesImpl();
        MutablePropertyValues propertyValues = styles.getPropertyValues();
        while (iterator.hasNext()) {
            StyleProperty property = (StyleProperty) iterator.next();
            StyleValue value;
            if (property.getStandardDetails().isInherited()) {
                value = parentValues.getStyleValue(property);
            } else  {
                value = initialValueFinder.getInitialValue(
                        propertyValues, property.getStandardDetails());
            }

            propertyValues.setComputedValue(property, value);
        }
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

            }
        } else {
            this.specifiedValues = new StyleValue[definitions.count()];
            this.computedValues = new StyleValue[definitions.count()];
            for (Iterator i = definitions.stylePropertyIterator(); i.hasNext();) {
                StyleProperty property = (StyleProperty) i.next();
                final int index = property.getIndex();
                specifiedValues[index] =
                        values.getSpecifiedValue(property);
                computedValues[index] =
                        values.getComputedValue(property);
            }
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

        if (computedValues != null) {
            String separator = "";
            for (int i = 0; i < computedValues.length; i++) {
                StyleValue propertyValue = computedValues[i];
                if (propertyValue != null) {
                    StyleProperty property = definitions.getStyleProperty(i);
                    buffer.append(separator)
                            .append(property.getName())
                            .append(":")
                            .append(propertyValue.getStandardCSS());
                    separator = ";";
                }
            }
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

            StyleProperty[] boxProperties,
            StyleValue value,
            PropertyStatus status) {

        for (int i = 0; i < boxProperties.length; i++) {
            StyleProperty property = boxProperties[i];
            setPropertyValue(inputValues, property, value, status);
        }
    }
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

    }

    // Javadoc inherited.
    public void removeProperties(MutableStylePropertySet individualProperties) {
        for (int i = 0; i < properties.length; i++) {
            StyleProperty property = properties[i];
            individualProperties.remove(property);
        }
    }
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

        }
        return action;
    }

    public IterationAction next(PropertyValue propertyValue) {
        StyleProperty property = propertyValue.getProperty();
        // remove the common property from the properties passed in.
        properties.clearPropertyValue(property);
        return IterationAction.CONTINUE;
    }
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

        optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
                deviceValuesMock);

        for (int i = 0; i < expectedValues.length; i++) {
            PropertyValue expectedValue = expectedValues[i];
            StyleProperty property = expectedValue.getProperty();

            PropertyValue propertyValue = outputValues.getPropertyValue(
                    property);

            assertEquals("Value " + i + " mismatch", expectedValue,
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

            TargetEntity target, PropertyValues inputValues,
            MutableStyleProperties outputValues,
            DeviceValues deviceValues) {

        for (int i = 0; i < individualProperties.length; i++) {
            StyleProperty property = individualProperties[i];
            StyleValue styleValue = inputValues.getStyleValue(property);
            PropertyValue optimized;
            if (styleValue != null) {
                optimized = optimizeImpl(property, styleValue,
                        inputValues, deviceValues);
View Full Code Here

Examples of com.volantis.styling.properties.StyleProperty

    private boolean checkInheritedValue(
            PropertyDetails details, StyleValue inputValue) {

        // If the property is automatically inherited and the value
        // matches the inherited value then it can be cleared.
        StyleProperty property = details.getProperty();
        StyleValue parentValue = parentValues.getStyleValue(property);
        return OptimizerHelper.styleValueEqualsWithAny(inputValue, parentValue);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.