Package org.xhtmlrenderer.swing

Examples of org.xhtmlrenderer.swing.ImageReplacedElement


            Element svgElement = (Element) svgDocument.importNode(element, true);
            svgDocument.appendChild(svgElement);

            try {
                int width = box.getContentWidth() - 20;
                return new ImageReplacedElement(rasterize(svgDocument, width), width, width);
            } catch (IOException e) {
                return null;
            }
        }
        return null;
View Full Code Here


                if (fsImage != null) {
                    im = ((AWTFSImage) fsImage).getImage();
                }

                if (im != null) {
                    re = new ImageReplacedElement(im, cssWidth, cssHeight);
                } else {
                    // TODO: Should return "broken" image icon, e.g. "not found"
                    re = newIrreplaceableImageElement(cssWidth, cssHeight);
                }
            }
View Full Code Here

            g.setColor(Color.BLACK);
            g.setBackground(Color.WHITE);
            g.setFont(new Font("Serif", Font.PLAIN, 12));
            g.drawString("Missing", 0, 12);
            g.dispose();
            mre = new ImageReplacedElement(missingImage, cssWidth, cssHeight);
        } catch (Exception e) {
            mre = new EmptyReplacedElement(
                    cssWidth < 0 ? 0 : cssWidth,
                    cssHeight < 0 ? 0 : cssHeight);
        }
View Full Code Here

TOP

Related Classes of org.xhtmlrenderer.swing.ImageReplacedElement

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.