Examples of StyleValue


Examples of com.volantis.mcs.themes.StyleValue

        List functionArgs = new ArrayList();
        functionArgs.add(getCounterIdentifier("hippopotamus"));
        functionArgs.add(STYLE_VALUE_FACTORY.getString(null, "."));
        functionArgs.add(ListStyleTypeKeywords.LOWER_ALPHA);

        StyleValue functionValue =
                function.evaluate(evaluationContextMock,
                        "counter", functionArgs);
        StyleString expected = STYLE_VALUE_FACTORY.getString(null, "0.A.B.C");
        assertEquals(expected, functionValue);
    }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleValue

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

        StyleValue result = STYLE_VALUE_FACTORY.getString(null, "result");

        expressionMock.expects.evaluate(evaluationContextMock).returns(result);

        // =====================================================================
        //   Test Expectations
View Full Code Here

Examples of com.volantis.mcs.themes.StyleValue

     * @throws Exception
     */
    public void testReturnsStyleInteger() throws Exception {

        CounterFormatter formatter = new DecimalFormatter();
        StyleValue result = formatter.formatAsStyleValue(
                ListStyleTypeKeywords.DECIMAL, 4);
        assertTrue("Must be StyleInteger", result instanceof StyleInteger);
    }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleValue

            STYLE_VALUE_FACTORY.getString(null, "arg 1"),
            STYLE_VALUE_FACTORY.getString(null, "arg 2"),
            STYLE_VALUE_FACTORY.getString(null, "arg 3"),
        });

        StyleValue result = STYLE_VALUE_FACTORY.getString(null, "result");

        argumentsMock.expects.evaluate(evaluationContextMock).returns(values);
        stylingFunctionMock.expects
                .evaluate(evaluationContextMock, "fred", values)
                .returns(result);
View Full Code Here

Examples of com.volantis.mcs.themes.StyleValue

        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

Examples of com.volantis.mcs.themes.StyleValue

        Element rowElement = (Element) tableElement.getHead();
        Element cellElement = (Element) rowElement.getHead();

        Styles cellStyles = cellElement.getStyles();
        StyleValue expectedPadding = StyleValueFactory.getDefaultInstance().
            getLength(null, 10, LengthUnit.PX);
        // Check the computed values for the table cell (since these are the
        // values that will be displayed
        assertEquals("Cell should have 10px padding (bottom)", expectedPadding,
                cellStyles.getPropertyValues().
View Full Code Here

Examples of com.volantis.mcs.themes.StyleValue

        this.property = property;
    }

    // Javadoc inherited
    public StyleValue postProcess(final StyleValue value) {
        StyleValue postProcessed = value;
        String parseable = null;
        if (value instanceof StyleInvalid) {
            parseable = ((StyleInvalid) value).getValue();
        }
        if (parseable != null) {
            parseable = "\"" + parseable + "\"";
            StyleValue quotedParsed = parseStyleValue(property, parseable);
            if (quotedParsed != null &&
                    !(quotedParsed instanceof StyleInvalid)) {
                postProcessed = quotedParsed;
            }
        }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleValue

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

        StyleValue value;

        engine.startElement(NS, "body", attributesMock);
        value = getContainerValue(engine, StylePropertyDetails.MCS_CONTAINER);
        assertEquals(ABC_STRING, value);
View Full Code Here

Examples of com.volantis.mcs.themes.StyleValue

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

        StyleValue value;

        StyleList expected = STYLE_VALUE_FACTORY.getList(Arrays.asList(
                new Object[]{
                    XYZ_STRING,
                    ABC_STRING,
View Full Code Here

Examples of com.volantis.mcs.themes.StyleValue

        this.processor = processor;
    }

    // Javadoc inherited
    public StyleValue postProcess(final StyleValue value) {
        StyleValue processed = value;
        if (value instanceof StyleList) {
            StyleList list = (StyleList) value;
            List values = list.getList();
            List processedValues = new ArrayList();
            boolean changed = false;
            Iterator it = values.iterator();
            while (it.hasNext()) {
                StyleValue listValue = (StyleValue) it.next();
                StyleValue listValueProcessed = processor.postProcess(listValue);
                processedValues.add(listValueProcessed);
                if (listValue != listValueProcessed) {
                    changed = true;
                }
            }
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.