Examples of WapTV5_WMLVersion1_3Style


Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

         this.style = style;
     }

    public WapTV5_WMLVersion1_3Style getStyle(MCSAttributes attributes) {
        if (style == null) {
            WapTV5_WMLVersion1_3Style style = (WapTV5_WMLVersion1_3Style)
                    styleMap.get(attributes);
            return (null == style) ? super.getStyle(attributes) : style;
        }
        return style;
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

        Styles styles = tableCellAttributes.getStyles();

        // we need to override the style with this mock style only for testing
        // the bgimage as the actual addBackgroundImage in the style attempts
        // to perform methods on a null Volantis object.
        WapTV5_WMLVersion1_3Style style =
                new WapTV5_WMLVersion1_3Style(
                        styles.getPropertyValues(), wapProtocol);
        wapProtocol.setStyle(style);
        wapProtocol.setActiveStyle(new WapTV5_WMLVersion1_3Style(
                styles.findNestedStyles(StatefulPseudoClasses.ACTIVE)
                .getPropertyValues(), wapProtocol));
        wapProtocol.setFormatStyle(new WapTV5_WMLVersion1_3Style(
                styles.findNestedStyles(StatefulPseudoClasses.ACTIVE)
                .getPropertyValues(), wapProtocol));

        Element element = domFactory.createElement();
        protocol.addTableCellAttributes(element, tableCellAttributes);
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

        // to prevent the href attribute from being omitted.
        if (href == null) {
            href = " ";
        }
        String content = "";
        WapTV5_WMLVersion1_3Style style = getStyle(attributes);
        if (href != null) {
            String accessKey = getPlainText(attributes.getShortcut());

            openFont(dom, attributes, true);

            // We need to render the content of the anchor as a string.
            Object contentObject = attributes.getContent();
            if (contentObject instanceof DOMOutputBuffer) {
                StringWriter contentWriter = new StringWriter();
                DocumentOutputter outputter = new DOMDocumentOutputter(
                        new XMLDocumentWriter(contentWriter),
                        characterEncoder);


                DOMOutputBuffer contentBuffer = (DOMOutputBuffer) contentObject;
                Element contentRoot = contentBuffer.getRoot();
                try {
                    outputter.output(contentRoot);
                    content = contentWriter.getBuffer().toString();
                } catch (IOException ioe) {
                    logger.error("content-generation-error", ioe);
                }
            } else {
                content = contentObject.toString();
            }

            // @todo 2005060816 annotate child with style information if it's not inherited from the parent
            Element doElement = dom.openStyledElement("do", attributes);
            if (style != null) {
                style.addMarinerFocus(doElement, "focus");
            }
            doElement.setAttribute("label", content);
            doElement.setAttribute("name", context.generateWMLActionID());

            if (supportsTabindex && attributes.getTabindex() != null) {
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

            Element element,
            ImageAttributes attributes) {

        super.addImageAttributes(element, attributes);

        WapTV5_WMLVersion1_3Style style = getStyle(attributes);

        Styles styles = attributes.getStyles();
        String value;
        if ((value = mcsImageHandler.getAsString(styles)) != null) {
            element.setAttribute("localsrc", value);
        }

        if (style != null) {
            style.addMarinerImageRepeatCount(element, "loop");
            style.addMarinerImageFrameInterval(element, "ticks");
            style.addMarinerImageInitialFrame(element, "index");

        }
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

            type = value;
        } else {
            type = "accept";
        }

        WapTV5_WMLVersion1_3Style style = getStyle(attributes);
        // @todo 2005060816 annotate child with style information if it's not inherited from the parent
        Element doElement = dom.openStyledElement("do", item);
        if (style != null) {
            style.addMarinerFocus(doElement, "focus");
        }
        doElement.setAttribute("label", item.getText());
        doElement.setAttribute("type", type);
        doElement.setAttribute("name", context.generateWMLActionID());
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

        if ((value = mcsImageHandler.getAsString(styles)) != null) {
            element.setAttribute("localsrc", value);
        }

        WapTV5_WMLVersion1_3Style style = getStyle(attributes);
        if (style != null) {
            style.addMarinerCaretColor(element, "cursorcolor");
        }
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

    //javadoc inherited
    protected void addActionDoAttributes(
            Element element,
            XFActionAttributes attributes) {
        WapTV5_WMLVersion1_3Style style = getStyle(attributes);
        if (style != null) {
            style.addMarinerFocus(element, "focus");
        }
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

        }
        if ((value = mcsImageHandler.getAsString(styles)) != null) {
            element.setAttribute("localsrc", value);
        }

        WapTV5_WMLVersion1_3Style style = getStyle(attributes);
        if (style != null) {
            style.addFontFamily(element, "font");
            style.addPosition(element, "pos");
            style.addBackgroundPosition(element, "bgoffset");
        }
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

        if (styles != null) {

            MutablePropertyValues propertyValues = styles.getPropertyValues();
            // if there are no propertyValues then we want to return null
            if (propertyValues != null) {
                WapTV5_WMLVersion1_3Style style = null;
                style = new WapTV5_WMLVersion1_3Style(propertyValues, this);
                return style;
            }
        }
        return null;
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.wml.css.emulator.styles.WapTV5_WMLVersion1_3Style

     * @param attributes The attributes which are used to retrieve the style.
     * @return The Style, or null if a Style could not be found.
     */
    public WapTV5_WMLVersion1_3Style getStyle(MCSAttributes attributes,
                          PseudoStyleEntity pseudoEntity) {
        WapTV5_WMLVersion1_3Style style = null;

        Styles styles = attributes.getStyles();

        if (styles != null) {
            Styles nestedStyles = styles.findNestedStyles(pseudoEntity);
            if (nestedStyles != null) {
                MutablePropertyValues propertyValues =
                    nestedStyles.getPropertyValues();
                // if there are no properties then we want to return null
                if (propertyValues != null) {
                    style = new WapTV5_WMLVersion1_3Style(propertyValues, this);
                }
            }
        }
        return style;
    }
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.