Examples of SVGDocumentLoader


Examples of org.apache.batik.dom.svg.SVGDocumentLoader

*/
public class DefaultBridgeContext extends SVGBridgeContext {

    public DefaultBridgeContext(String parser, SVGDocument svgDocument) {
        setDocumentLoader(new BufferedDocumentLoader
                          (new SVGDocumentLoader(parser)));
        setGVTFactory(ConcreteGVTFactory.getGVTFactoryImplementation());
        setParserFactory(new ParserFactory());
        setUserAgent(new DefaultUserAgent());
        setViewCSS((ViewCSS) svgDocument.getRootElement());
        setGraphicsNodeRableFactory(new ConcreteGraphicsNodeRableFactory());
View Full Code Here

Examples of org.apache.batik.dom.svg.SVGDocumentLoader

     */
    protected BridgeContext createBridgeContext(SVGDocument doc) {
        BridgeContext result = new SVGBridgeContext();
        result.setDocumentLoader
            (new BufferedDocumentLoader
             (new SVGDocumentLoader(userAgent.getXMLParserClassName())));
        result.setGVTFactory(ConcreteGVTFactory.getGVTFactoryImplementation());
        result.setParserFactory(parserFactory);
        result.setUserAgent(userAgent);
        result.setGraphicsNodeRableFactory
            (new ConcreteGraphicsNodeRableFactory());
View Full Code Here

Examples of org.apache.batik.swing.svg.SVGDocumentLoader

   * @param documentURL the URL of the document to rasterize

   */
  public SVGRasterizer(String documentURL) {
    UserAgent userAgent = new UserAgentAdapter();
    SVGDocumentLoader loader = new SVGDocumentLoader(documentURL,
        new DocumentLoader(userAgent));   
    loader.addSVGDocumentLoaderListener(new SVGRasterizerListener());
    /* Note that Batik uses the context class loader for loading SAX Parser, etc.
     * Context class loader is inappropriate under the Felix implementation of OSGi,
     * so replace it with the regular class loader. */
    loader.setContextClassLoader(loader.getClass().getClassLoader());
    loader.start();
  }
 
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.