public void initComponents() {
        svgCanvas = new JSVGCanvas();
        svgCanvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
        
        DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
        doc = (SVGDocument)impl.createDocument(svgNS, "svg", null);
        
        svgCanvas.setDocument(doc);
        
        registerListeners();
    }
    
    public void registerListeners() {
        svgCanvas.addSVGDocumentLoaderListener(new
SVGDocumentLoaderAdapter() {
            public void documentLoadingStarted(SVGDocumentLoaderEvent e) {
                System.out.println("Document Loading...");
            }
            public void documentLoadingCompleted(SVGDocumentLoaderEvent e) {
                System.out.println("Document Loaded.");
            }
        });
        svgCanvas.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
            public void gvtBuildStarted(GVTTreeBuilderEvent e) {
                System.out.println("gvt bUILD Started...");
            }
            public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
                System.out.println("GVT Build Done...");
            }
        });
        svgCanvas.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
            public void gvtRenderingPrepare(GVTTreeRendererEvent e) {
                System.out.println("Renderer Started...");
            }
            public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
                System.out.println("Renderer Completed...");
               
                UpdateManager um = svgCanvas.getUpdateManager();
                um.getUpdateRunnableQueue().invokeLater(new Runnable() {
                    public void run() {
                        initCanvas();
                    }
                });
            }
        });
        
        SVGSVGElement svgRoot = doc.getRootElement();
        EventTarget t = (EventTarget)svgRoot;
        t.addEventListener("SVGLoad", new OnLoadAction(), false);
    }

i have these on my app but i still need to move the mouse for it to update
-- 
View this message in context: 
http://www.nabble.com/how-to-update-SVGCanvas-without-moving-mouse-on-canvas--tf3975725.html#a11292540
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to