Examples of XhtmlNamespaceHandler


Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

            XRLog.general("Already rendered, skipping");
            return;
        }

        try {
            xhtmlPanel.setDocumentFromString(content, null, new XhtmlNamespaceHandler());
            ByteArrayOutputStream os = new ByteArrayOutputStream(1024);
            ITextRenderer renderer = new ITextRenderer();

            renderer.setDocumentFromString(content);
            renderer.layout();
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

    public void setDocument(String uri) {
        setDocument(loadDocument(uri), uri);
    }

    public void setDocument(Document doc, String url) {
        setDocument(doc, url, new XhtmlNamespaceHandler());
    }
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

                    "<html style='position: absolute;'>" +
                            "This line was in the original document. Press the button to add a new node to " +
                            "the same document <br />" +
                            "</html>",
                    null,
                    new XhtmlNamespaceHandler());

            // our panel already has a DOM Document; this is what we'll modify
            domDocument = panel.getDocument();

            // root element of the document--you could grab any other element
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

    public void setDocument(String uri) {
        setDocument(loadDocument(uri), uri);
    }

    public void setDocument(Document doc, String url) {
        setDocument(doc, url, new XhtmlNamespaceHandler());
    }
View Full Code Here

Examples of org.xhtmlrenderer.simple.xhtml.XhtmlNamespaceHandler

        ReplacedElement re = super.createReplacedElement(c, box, uac, cssWidth,
            cssHeight);
        if (re == null
                && c.getNamespaceHandler() instanceof XhtmlNamespaceHandler
                && !c.isPrint()) {
            XhtmlNamespaceHandler nsh = (XhtmlNamespaceHandler) c
                .getNamespaceHandler();
            Element e = box.getElement();
            if (e == null) {
                return null;
            }

            // form controls
            // first check if the control already exists
            if (_controls != null) {
                re = (ReplacedElement) _controls.get(e);
            }
            if (re != null) {
                if (re instanceof FormControlReplacementElement) {
                    // update the size
                    ((FormControlReplacementElement) re).calculateSize(c, box
                        .getStyle(), cssWidth, cssHeight);
                }
                return re;
            }

            // not found, try to create one
            Element parentForm = getParentForm(e, c);
            // parentForm may be null, this is not a problem
            XhtmlForm form = (XhtmlForm) _forms.get(parentForm);
            if (form == null) {
                form = nsh.createForm(parentForm);
                _forms.put(parentForm, form);
            }

            FormControl control = form.createControl(e);
            if (control == null) {
View Full Code Here

Examples of org.xhtmlrenderer.simple.xhtml.XhtmlNamespaceHandler

    /**
     * @param e
     */
    protected Element getParentForm(Element e, LayoutContext context) {
        Node node = e;
        XhtmlNamespaceHandler nsh = (XhtmlNamespaceHandler) context
            .getNamespaceHandler();

        do {
            node = node.getParentNode();
        } while (node.getNodeType() == Node.ELEMENT_NODE
                && !nsh.isFormElement((Element) node));

        if (node.getNodeType() != Node.ELEMENT_NODE) {
            return null;
        }

View Full Code Here

Examples of org.xhtmlrenderer.simple.xhtml.XhtmlNamespaceHandler

     *
     * @param doc The new document value
     * @param url The new document value
     */
    public void setDocument(Document doc, String url) {
        super.setDocument(doc, url, new XhtmlNamespaceHandler());
    }
View Full Code Here

Examples of org.xhtmlrenderer.simple.xhtml.XhtmlNamespaceHandler

     *
     * @param stream The stream to read the Document from.
     * @param url The URL used to resolve relative path references.
     */
    public void setDocument(InputStream stream, String url) {
        super.setDocument(stream, url, new XhtmlNamespaceHandler());
    }
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.