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

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


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

        styleEmulationPropertyRendererSelector.register(
                StylePropertyDetails.VERTICAL_ALIGN,
View Full Code Here


        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,
                backgroundColorRenderer);
View Full Code Here

        // 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,
                backgroundColor);
View Full Code Here

TOP

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

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.