Package com.volantis.styling.values

Examples of com.volantis.styling.values.MutablePropertyValues


        if (layoutDirectionality == null) {
            layoutDirectionality = FIXED;
        }

        MutablePropertyValues values = formatStyles.getPropertyValues();

        StyleValue direction =
            values.getSpecifiedValue(StylePropertyDetails.DIRECTION);

        if (direction == null) {
            direction =
                values.getComputedValue(StylePropertyDetails.DIRECTION);
        }

        if (direction == null) {
            // This should not happen !!!
            throw new IllegalStateException("No direction style found");
View Full Code Here


        final Element imgElement = createImgElement();

        assertNull(imgElement.getAttributeValue("width"));
        assertNull(imgElement.getAttributeValue("height"));

        final MutablePropertyValues propertyValues =
                imgElement.getStyles().findPropertyValues();

        assertEquals("53px", propertyValues.getSpecifiedValue(
                StylePropertyDetails.WIDTH).getStandardCSS());
        assertEquals("41px", propertyValues.getSpecifiedValue(
                StylePropertyDetails.HEIGHT).getStandardCSS());

        final CSSRemappingRule widthRule =
                createCSSRemappingRule("width", "width");
        final CSSRemappingRule heightRule =
View Full Code Here

     * @return Element result of rendering the element with the supplied
     * properties and protocol configuration
     */
    private Element doUnderlineTest(boolean supportsUnderline,
                                    boolean supportsCSS) {
        MutablePropertyValues properties = createPropertyValues();
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_TEXT_UNDERLINE_STYLE,
                MCSTextUnderlineStyleKeywords.SOLID);
        return doTest(false, false, supportsUnderline, false, supportsCSS, "p",
                properties);
    }
View Full Code Here

     * @param supportsCSS       true if the device supports CSS
     * @return Element result of rendering the element with the supplied
     * properties and protocol configuration
     */
    private Element doStrikeTest(boolean supportsStrike, boolean supportsCSS) {
        MutablePropertyValues properties = createPropertyValues();
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_TEXT_LINE_THROUGH_STYLE,
                MCSTextLineThroughStyleKeywords.SOLID);
        return doTest(false, false, false, supportsStrike, supportsCSS, "p",
                properties);
    }
View Full Code Here

     * @param supportsCSS       true if the device supports CSS
     * @return Element result of rendering the element with the supplied
     * properties and protocol configuration
     */
    private Element doBlinkTest(boolean supportsBlink, boolean supportsCSS) {
        MutablePropertyValues properties = createPropertyValues();
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_TEXT_BLINK,
                MCSTextBlinkKeywords.BLINK);
        return doTest(false, supportsBlink, false, false, supportsCSS, "p",
                properties);
    }
View Full Code Here

     *
     * @throws Exception if there was a problem running the test
     */
    public void testRenderMarqueeForDivWithStyleSet() throws Exception {

        MutablePropertyValues properties = createPropertyValues();
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_MARQUEE_STYLE,
                MCSMarqueeStyleKeywords.SCROLL);

        // Test that the div element is replaced if the device doesn't support
        // the marquee css and does support the marquee element.
View Full Code Here

     * @param dstStyles
     * @param srcStylesMap
     * @return
     */
    private Styles updateStyles(Styles dstStyles, Map srcStylesMap){
        MutablePropertyValues props = dstStyles.getPropertyValues();
        StyleValue styleValue;
        StyleProperty styleProperty;
       
        for(Iterator iter = srcStylesMap.keySet().iterator();iter.hasNext();){
            styleProperty = (StyleProperty)iter.next();
            styleValue = (StyleValue)srcStylesMap.get(styleProperty);
            props.setComputedAndSpecifiedValue(styleProperty,styleValue);           
        }
        return dstStyles;
    }
View Full Code Here

     *
     * @throws Exception if there was a problem running the test
     */
    public void testRenderMarqueeForDivWithAllSet() throws Exception {

        MutablePropertyValues properties = createPropertyValues();
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_MARQUEE_STYLE,
                MCSMarqueeStyleKeywords.SCROLL);
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_MARQUEE_DIRECTION,
                MCSMarqueeDirectionKeywords.LEFT);
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_MARQUEE_REPETITION,
                MCSMarqueeRepetitionKeywords.INFINITE);
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.BACKGROUND_COLOR, StyleColorNames.ORANGE);

        // Test that the div element is replaced if the device doesn't support
        // the marquee css and does support the marquee element.
        Element element = doMarqueeTest(true, false, properties, "div");
View Full Code Here

     *
     * @throws Exception if there was a problem running the test
     */
    public void testRenderMarqueeForDivWithStyleNotSet() throws Exception {

        MutablePropertyValues properties = createPropertyValues();
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_MARQUEE_DIRECTION,
                MCSMarqueeDirectionKeywords.LEFT);
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_MARQUEE_REPETITION,
                MCSMarqueeRepetitionKeywords.INFINITE);
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.BACKGROUND_COLOR,
                StyleColorNames.ORANGE);

        // Test that the div element is NOT replaced if the device doesn't
        // support the marquee css and does support the marquee element.
View Full Code Here

        checkMarqueeElement(element, "div", false);
    }

    public void testRenderMarqueeForNotDivWithStyleSet() throws Exception {

        MutablePropertyValues properties = createPropertyValues();
        properties.setComputedAndSpecifiedValue(
                StylePropertyDetails.MCS_MARQUEE_STYLE,
                MCSMarqueeStyleKeywords.SCROLL);

        // Test that the div element is replaced if the device doesn't support
        // the marquee css and does support the marquee element.
View Full Code Here

TOP

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

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.