Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.PropertyValue


        }

        MutablePropertyValues target = styles.getPropertyValues();

        for (int i = 0; i < propertyValues.length; i++) {
            PropertyValue propertyValue = propertyValues[i];
            target.setSpecifiedValue(propertyValue.getProperty(),
                    propertyValue.getValue());
        }
    }
View Full Code Here


        }

        DeviceValuesBuilder target = styles.getValuesBuilder();

        for (int i = 0; i < propertyValues.length; i++) {
            PropertyValue propertyValue = propertyValues[i];
            target.setPropertyValue(propertyValue);
        }
    }
View Full Code Here

    }

    // Javadoc inherited.
    public StyleValue getStyleValue(StyleProperty property) {

        PropertyValue propertyValue = getPropertyValue(property);
        if (propertyValue == null) {
            return defaultValue;
        } else {
            return propertyValue.getValue();
        }
    }
View Full Code Here

        }
    }

    // Javadoc inherited.
    public Priority getPriority(StyleProperty property) {
        PropertyValue propertyValue = getPropertyValue(property);
        if (propertyValue == null) {
            return Priority.NORMAL;
        } else {
            return propertyValue.getPriority();
        }
    }
View Full Code Here

       
        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,
                    propertyValue);
        }
View Full Code Here

            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);
                if (optimized != null) {
                    outputValues.setPropertyValue(optimized);
View Full Code Here

            // Although it is a little stupid it is allowed, at least for now
            // to have no properties for a selector.
            if (properties != null) {
                Iterator p = properties.propertyValueIterator();
                while (p.hasNext()) {
                    PropertyValue propertyValue = (PropertyValue) p.next();
                    StyleProperty property = propertyValue.getProperty();
                    StyleValue value = propertyValue.getValue();
                    StyleValue activated = activateStyleValue(property, value);
                    if (activated != value) {
                        propertyValue =
                            ThemeFactory.getDefaultInstance().createPropertyValue(
                                property, activated,
                                propertyValue.getPriority());
                        properties.setPropertyValue(propertyValue);
                    }
                }
            }
        }
View Full Code Here

        StylePropertyDefinitions definitions =
                StylePropertyDetails.getDefinitions();
        for (Iterator i = definitions.stylePropertyIterator(); i.hasNext();) {
            StyleProperty prop = (StyleProperty)i.next();
            PropertyValue propertyValue = null;
            if (array != null) {
                propertyValue = array.getPropertyValue(prop);
            }
            if (propertyValue == null) {
                values.expects.getComputedValue(prop).
                        returns(null).any();
            } else {
                StyleValue value = propertyValue.getValue();
                values.expects.getComputedValue(prop).returns(value).any();
            }
        }
        return values;
    }
View Full Code Here

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        PropertyValue normalPropertyValue =
            ThemeFactory.getDefaultInstance().createPropertyValue(
                normalProperty, normalValue, Priority.NORMAL);

        PropertyValue importantPropertyValue =
            ThemeFactory.getDefaultInstance().createPropertyValue(
                importantProperty, importantValue, Priority.IMPORTANT);

        valueCompilerMock.expects.compile(normalValue)
                .returns(normalValue);
View Full Code Here

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        PropertyValue fontSize =
            ThemeFactory.getDefaultInstance().createPropertyValue(
                StylePropertyDetails.FONT_SIZE, FontSizeKeywords.LARGER,
                Priority.NORMAL);

        PropertyValue systemFont =
            ThemeFactory.getDefaultInstance().createPropertyValue(
                StylePropertyDetails.MCS_SYSTEM_FONT,
                MCSSystemFontKeywords.CAPTION, Priority.NORMAL);

        PropertyValue fontWeight =
            ThemeFactory.getDefaultInstance().createPropertyValue(
                StylePropertyDetails.FONT_WEIGHT,
                FontWeightKeywords.BOLD, Priority.IMPORTANT);

        MutableStyleProperties properties =
View Full Code Here

TOP

Related Classes of com.volantis.mcs.themes.PropertyValue

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.