Package com.volantis.styling.values

Examples of com.volantis.styling.values.MutablePropertyValues


        checkMarqueeElement(parent, "html", false);
    }

    public void testRenderMarqueeForNotDivWithAllSet() 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 marquee element is inserted if the device doesn't
        // support the marquee css and does support the marquee element.
View Full Code Here


     *
     * @throws Exception if there was a problem running the test
     */
    public void testRenderMarqueeForNotDivWithStyleNotSet() 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 a marquee element is NOT inserted if the device doesn't
        // support the marquee css and does support the marquee element.
View Full Code Here

        //   Set Expectations
        // ===================================================================
        resetExpectations();
        setOuterCellCanOptimizeExpectations(expectedValues);
        setInnerTableCanOptimizeExpectations(expectedValues);
        MutablePropertyValues values =
                createTestablePropertyValues(property, nonNullStyleValue);
        styles.expects.getPropertyValues().returns(values);
        expectedValues.put("styles", styles);
        setOuterTableCanOptimizeExpectations(expectedValues);
View Full Code Here

        //   Set Expectations
        // ===================================================================
        resetExpectations();
        setOuterCellCanOptimizeExpectations(expectedValues);
        setInnerTableCanOptimizeExpectations(expectedValues);
        MutablePropertyValues values =
                createTestablePropertyValues(property, nonNullStyleValue);
        styles.expects.getPropertyValues().returns(values);
        expectedValues.put("styles", styles);
        setOuterTableCanOptimizeExpectations(expectedValues);
View Full Code Here

        engine.pushStyleSheet(compiledStyleSheet);

        engine.startElement(XDIMESchemata.XHTML2_NAMESPACE, "p", attributes);
        Styles styles = engine.getStyles();

        MutablePropertyValues propertyValues = styles.getPropertyValues();
        StyleValue value = propertyValues.getComputedValue(
                StylePropertyDetails.MCS_CONTAINER);

        StyleFormatReference styleFormatReference =
                (StyleFormatReference) value;
        FormatReference formatReference = styleFormatReference.getReference();
View Full Code Here

        engine.pushStyleSheet(compiledStyleSheet);

        engine.startElement(XDIMESchemata.XHTML2_NAMESPACE, "p", attributes);
        Styles styles = engine.getStyles();

        MutablePropertyValues propertyValues = styles.getPropertyValues();
        StyleValue value = propertyValues.getComputedValue(
                StylePropertyDetails.MCS_CONTAINER);

        StyleFormatReference styleFormatReference =
                (StyleFormatReference) value;
        FormatReference formatReference = styleFormatReference.getReference();
View Full Code Here

            da.copy(attributes);

            // Make sure that the display value is block, rather than the
            // default for xfsi/muselect which is inline.
            Styles styles = da.getStyles();
            MutablePropertyValues propertyValues = styles.getPropertyValues();
            propertyValues.setComputedValue(StylePropertyDetails.DISPLAY,
                    DisplayKeywords.BLOCK);

            da.setId(attributes.getId());
            openDiv(dom, da);
View Full Code Here

                element.getStyles().getPropertyValues().setComputedValue(
                        StylePropertyDetails.WIDTH, value);
            }
        }

        MutablePropertyValues propertyValues =
                element.getStyles().getPropertyValues();
        StyleValue widthValue =
                propertyValues.getStyleValue(StylePropertyDetails.WIDTH);

        if (widthValue != null) {
            if (emulateWidthPercentages && widthValue instanceof StylePercentage) {
                if (useableWidth != -1) {
                    StylePercentage percentage = (StylePercentage) widthValue;
                    double pixelWidth = useableWidth * percentage.getPercentage() / 100.0;
                    StyleLength length = StyleValueFactory.getDefaultInstance()
                            .getLength(null, pixelWidth, LengthUnit.PX);
                    propertyValues.setComputedValue(StylePropertyDetails.WIDTH, length);
                } else {
                    propertyValues.clearPropertyValue(StylePropertyDetails.WIDTH);
                }
            }
        }
    }
View Full Code Here

     */
    private void addTextFormatAttributes(Element element,
                                           MCSAttributes attributes) {

        Styles styles = attributes.getStyles();
        MutablePropertyValues propertyValues = styles.getPropertyValues();
        StyleValue value = propertyValues.getComputedValue(
                StylePropertyDetails.WHITE_SPACE);

        if (value == WhiteSpaceKeywords.NOWRAP) {
            element.setAttribute("nowrap", "nowrap");
        }
View Full Code Here

     *            styles of xf:group element.
     */
    public void renderOpenStep(VolantisProtocol protocol, Styles xfGroupStyles)
            throws ProtocolException {

        MutablePropertyValues styleValues = xfGroupStyles.getPropertyValues();

        if (!isWidgetSupported(protocol)) {
            // Fallback behaviour
            styleValues.setSpecifiedValue(StylePropertyDetails.MCS_BREAK_AFTER,
                    StyleKeywords.ALWAYS);
            return;
        } else {
            // Because form fragmentation and wizard rendering are two
            // mutually exclusive features, disable form fragmentation
            // by clearing the 'mcs-break-after' style.
            styleValues.setSpecifiedValue(StylePropertyDetails.MCS_BREAK_AFTER,
                    null);
        }

        getCurrentStepRenderer(false).renderOpen(xfGroupStyles);
    }
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.