Package com.volantis.mcs.dom

Examples of com.volantis.mcs.dom.Text


    // Javadoc inherited.
    public void updateInlinePlaceHolder(PlaceHolder placeHolder, String css) {
        DOMPlaceHolder domPlaceHolder = (DOMPlaceHolder) placeHolder;
        Element style = domPlaceHolder.getElement();

        Text text = style.getDOMFactory().createText();
        text.append(css);
        style.addTail(text);
    }
View Full Code Here


                                    String textAfterStrongElement) {
        DOMFactory factory = DOMFactory.getDefaultInstance();

        rootElement = factory.createElement("body");

        Text text = factory.createText();
        text.append(textBeforeStrongElement);

        rootElement.addTail(text);

        strongElement = factory.createElement("strong");

        Text strongText = factory.createText();
        strongText.append(textWithinStrongElement);
        strongElement.addTail(strongText);

        rootElement.addTail(strongElement);

        Text textNodeAfterStrongElement = factory.createText();
        textNodeAfterStrongElement.append(textAfterStrongElement);

        rootElement.addTail(textNodeAfterStrongElement);
    }
View Full Code Here

    // javadoc inherited
    public void fixUpSpace(Element element, boolean isOpen) {
        Node node = isOpen ? element.getHead() : element.getTail();
        if (node instanceof Text) {
            Text text = (Text) node;
            if (isOpen) {
                prependText(text, SINGLE_WHITESPACE);               
            } else {
                // append the whitespace to the node
                text.append(SINGLE_WHITESPACE);
            }
        }
    }
View Full Code Here

     * @param element being fixed.
     */
    private void appendTextToPreviousElement(Element element) {
        Node node = element.getPrevious();
        if (node instanceof Text) {
            Text text = (Text)node;

            text.append(SINGLE_WHITESPACE);
            text.append(NON_BREAKING_SPACE);
            text.append(NON_BREAKING_SPACE);
            text.append(NON_BREAKING_SPACE);
        }
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dom.Text

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.