Package com.volantis.mcs.protocols.css.emulator.renderer

Examples of com.volantis.mcs.protocols.css.emulator.renderer.AttributeOnlyStyleEmulationPropertyRenderer


//                StylePropertyDetails.TEXT_ALIGN,
//                new StyleEmulationElementSetAttributeRenderer(
//                        new String[]{"p"}, "align",
//                        new DefaultTextAlignEmulationAttributeValueRenderer()));
        // vertical-align
        AttributeOnlyStyleEmulationPropertyRenderer verticalAlignRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementSetAttributeRenderer(
                        new String[]{"img"}, "align",
                        new DefaultVerticalAlignEmulationAttributeValueRenderer()));

        styleEmulationPropertyRendererSelector.register(
View Full Code Here


            // can not be saved then register an emulator to handle it.
            String policy = device.getPolicyValue(
                    DevicePolicyConstants.WML_IMAGE_NOSAVE);
            if (DevicePolicyConstants.WML_IMAGE_NOSAVE__ALT_NO_SAVE.equals(policy)) {

                AttributeOnlyStyleEmulationPropertyRenderer imageSavingRenderer =
                        new AttributeOnlyStyleEmulationPropertyRenderer(
                                new WMLImageAltEmulationPropertyRenderer());
                styleEmulationPropertyRendererSelector.register(
                        StylePropertyDetails.MCS_IMAGE_SAVING,
                        imageSavingRenderer);
            }
View Full Code Here

    protected void registerAttributeOnlyStyleEmulationPropertyRenderers(
            InternalDevice device) {
        super.registerAttributeOnlyStyleEmulationPropertyRenderers(device);
        // Register the style emulation property renderers in order of opening.
        // text-align
        AttributeOnlyStyleEmulationPropertyRenderer textAlignRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementSetAttributeRenderer(
                        new String[]{"p", "div", "table", "tr", "td", "img",
                                     "hr"}, "align",
                        new DefaultTextAlignEmulationAttributeValueRenderer()));
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.TEXT_ALIGN, textAlignRenderer);

        // background-color
        AttributeOnlyStyleEmulationPropertyRenderer backgroundColorRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementSetAttributeRenderer(
                        new String[]{"table", "tr", "td"}, "bgcolor",
                        new HTML3_2ColorEmulationAttributeValueRenderer()));
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.BACKGROUND_COLOR,
View Full Code Here

        // First, those that just add attributes. These require access to
        // the the protocol element which has just been rendered for this
        // XDIME/PAPI element in order to add atttributes to it.

        // text-align
        AttributeOnlyStyleEmulationPropertyRenderer textAlignRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                     new StyleEmulationElementSetAttributeRenderer(
                        new String[] {"p", "div", "table", "tr", "td", "th",
                                      "img", "input", "h1", "h2", "h3", "h4",
                                      "h5", "h6", "hr"}, "align",
                        new DefaultTextAlignEmulationAttributeValueRenderer())
                );
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.TEXT_ALIGN, textAlignRenderer);

        // vertical-align
        AttributeOnlyStyleEmulationPropertyRenderer verticalAlignRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                    new HTML3_2VerticalAlignEmulationPropertyRenderer()
                );
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.VERTICAL_ALIGN,
                verticalAlignRenderer);

        // padding
        registerPaddingPropertyRenderers();

        // margin
        registerMarginPropertyRenderers();

        // border-spacing
        AttributeOnlyStyleEmulationPropertyRenderer borderSpacingRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementSetAttributeRenderer(
                        new String[] {"table"}, "cellspacing",
                        new HTML3_2BorderSpacingEmulationAttributeValueRenderer()));
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.BORDER_SPACING,
                borderSpacingRenderer);

        // border-width
        AttributeOnlyStyleEmulationPropertyRenderer borderWidthRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementSetAttributeRenderer(
                        new String[] {"table", "img"}, "border",
                        new HTML3_2PixelsEmulationAttributeValueRenderer()));
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.BORDER_TOP_WIDTH,
                borderWidthRenderer);

        // width
        AttributeOnlyStyleEmulationPropertyRenderer widthRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementSetAttributeRenderer(
                        new String[]{"table", "td", "th", "hr"}, "width",
                        new HTML3_2PixelsEmulationAttributeValueRenderer()));
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.WIDTH,
                widthRenderer);

        // height
        AttributeOnlyStyleEmulationPropertyRenderer heightRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementSetAttributeRenderer(
                        new String[]{"td", "hr", "th"}, "height",
                        new HTML3_2PixelsEmulationAttributeValueRenderer()));
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.HEIGHT,
                heightRenderer);

        // background-color
        AttributeOnlyStyleEmulationPropertyRenderer backgroundColor =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementSetAttributeRenderer(
                        new String[] {"body", "table", "tr", "td", "th"}, "bgcolor",
                        new HTML3_2ColorEmulationAttributeValueRenderer()));
        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.BACKGROUND_COLOR,
View Full Code Here

                "padding-right");

        } else {

            // General HTML 3.2 renderer
            AttributeOnlyStyleEmulationPropertyRenderer paddingRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                    new HTML3_2PaddingEmulationPropertyRenderer());
            styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.PADDING_TOP, paddingRenderer);
        }
View Full Code Here

        // the requesting device supports border-color styling on.
        String[] elementsSupportingBorderStyleProperty =
                getElementsThatSupportStyleProperty(elementNames,
                                                    styleProperty);

        AttributeOnlyStyleEmulationPropertyRenderer borderColorRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementAppendAttributeRenderer(
                        elementsSupportingBorderStyleProperty, "style",
                        new CSSColorPropertyRenderer(cssPropertyName)));

        propertiesRenderer.register(styleProperty, borderColorRenderer);
View Full Code Here

        String[] elementsSupportingBorderWidthProperty =
                getElementsThatSupportStyleProperty(elementNames,
                                                    styleProperty);

        AttributeOnlyStyleEmulationPropertyRenderer borderWidthRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementAppendAttributeRenderer(
                        elementsSupportingBorderWidthProperty, "style",
                        new CSSBorderWidthPropertyRenderer(cssPropertyName)));

        propertiesRenderer.register(styleProperty, borderWidthRenderer);
View Full Code Here

        String[] elementsSupportingBorderStyleProperty =
                getElementsThatSupportStyleProperty(elementNames,
                                                    styleProperty);

        AttributeOnlyStyleEmulationPropertyRenderer borderStyleRenderer =
                new AttributeOnlyStyleEmulationPropertyRenderer(
                        new StyleEmulationElementAppendAttributeRenderer(
                        elementsSupportingBorderStyleProperty, "style",
                        new CSSBorderStylePropertyRenderer(cssPropertyName)));

        propertiesRenderer.register(styleProperty, borderStyleRenderer);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.css.emulator.renderer.AttributeOnlyStyleEmulationPropertyRenderer

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.