Package com.volantis.styling.values

Examples of com.volantis.styling.values.PropertyValues


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

        PropertyValues inputValues = helper.parseDeclarations(
                "font: caption; font-size: medium");

        shorthandsMock.expects.contains(StyleShorthands.FONT)
                .returns(true).any();
View Full Code Here


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

        PropertyValues inputValues = helper.parseDeclarations(
                "font: medium/90% Foo");

        shorthandsMock.expects.contains(StyleShorthands.FONT)
                .returns(true).any();
View Full Code Here

        // =====================================================================

        StyleValues parentValues = helper.parseDeclarations(
                "font: large FooBar");

        PropertyValues inputValues = helper.parseDeclarations(
                "font: medium FooBar");

        shorthandsMock.expects.contains(StyleShorthands.FONT)
                .returns(true).any();
View Full Code Here

        // =====================================================================

        StyleValues parentValues = helper.parseDeclarations(
                "font: large FooBar");

        PropertyValues inputValues = helper.parseDeclarations(
                "font: medium FooBar");

        shorthandsMock.expects.contains(StyleShorthands.FONT)
                .returns(true).any();
View Full Code Here

            engine.endElement(NS, "a");
        }
    }

    private void assertStylesEqual(Styles sparseStyles, StylingEngine engine) {
        PropertyValues expectedValues = sparseStyles.getPropertyValues();
        PropertyValues actualValues = engine.getStyles().getPropertyValues();
        Iterator iterator = expectedValues.stylePropertyIterator();
        while (iterator.hasNext()) {
            StyleProperty property = (StyleProperty) iterator.next();
            StyleValue specified = expectedValues.getSpecifiedValue(property);
            if (specified != null) {
                // Only interested in the specified values.
                StyleValue expected = expectedValues.getComputedValue(property);
                StyleValue actual = actualValues.getComputedValue(property);
                assertEquals(property.getName(), expected, actual);
            }
        }
    }
View Full Code Here

     * it shouldn't be.
     */
    private void checkFlattenedValues(Styles expectedStyles,
            Styles actualStyles, boolean doInlineDiv) {

        PropertyValues expected = expectedStyles.getPropertyValues();
        PropertyValues actual = actualStyles.getPropertyValues();

        assertNotNull(actual);
        assertEquals(
                expected.getComputedValue(
                        StylePropertyDetails.BACKGROUND_COLOR),
                actual.getComputedValue(
                        StylePropertyDetails.BACKGROUND_COLOR));
        assertEquals(
                expected.getComputedValue(StylePropertyDetails.COLOR),
                actual.getComputedValue(StylePropertyDetails.COLOR));

        if (doInlineDiv) {
            StyleValue value = DisplayKeywords.INLINE;
            assertEquals(value,
                    actual.getComputedValue(StylePropertyDetails.DISPLAY));
        }
    }
View Full Code Here

            throw new IllegalStateException("styles cannot be null");
        }

        counters.iterate(counterElementStarter);

        PropertyValues values = styles.getPropertyValues();

        if (values != null) {

            // If this styles has display:none ...
            StyleValue display = values.getComputedValue(
                    StylePropertyDetails.DISPLAY);
            if (display == DisplayKeywords.NONE) {
                // ... then it cannot increment or reset a counter.
            } else {
                // ... else it can increment and reset counters.
                // So process the counters.

                // Process any resets before any increments.
                StyleValue reset = values.getComputedValue(
                        StylePropertyDetails.COUNTER_RESET);
                if (reset != null) {
                    reset.visit(counterResetter, null);
                }
                StyleValue increment = values.getComputedValue(
                        StylePropertyDetails.COUNTER_INCREMENT);
                if (increment != null) {
                    increment.visit(counterIncrementer, null);
                }
            }
View Full Code Here

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

        PropertyValues inputValues = createEdgeProperties(
                BorderWidthKeywords.MEDIUM, BorderWidthKeywords.MEDIUM,
                BorderWidthKeywords.MEDIUM, BorderWidthKeywords.MEDIUM,
                PropertyStatus.CLEARABLE, PropertyStatus.CLEARABLE,
                PropertyStatus.CLEARABLE, PropertyStatus.CLEARABLE);
View Full Code Here

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

        PropertyValues inputValues = createEdgeProperties(
                OptimizerHelper.ANY, OptimizerHelper.ANY,
                OptimizerHelper.ANY, OptimizerHelper.ANY,
                PropertyStatus.REQUIRED, PropertyStatus.REQUIRED,
                PropertyStatus.REQUIRED, PropertyStatus.REQUIRED);
View Full Code Here

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

        PropertyValues inputValues = createBorderEdge(
                OptimizerHelper.ANY,
                StyleKeywords.NONE,
                StyleValueFactory.getDefaultInstance().getLength(
                    null, 0,LengthUnit.PX),
                PropertyStatus.REQUIRED,
View Full Code Here

TOP

Related Classes of com.volantis.styling.values.PropertyValues

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.