>>>>> "MV" == M van Veen <[EMAIL PROTECTED]> writes:

MV> I already use the 1.5b (CVS, updated today).  If I look into the
MV> JGVTComponent into renderGVTTree I see something like this:

MV> Looks like everything is repainted instead of the changed part
MV> (which my eyes confirm in a test). Or do I have to call some other
MV> methode than setDocument, to perform only a partial repaint
MV> (hopefully leaving the already painted things on screen and only
MV> repainting the changed part)?

    Ohh, if you are using 1.5b1 then you do not need to set the
document.  You probably need to call:

           JSVGCanvas canvas = ...
           canvas.setDocumentState(JSVGCanvs.ALWAYS_DYNAMIC);

    Before loading the document so Batik knows that it needs to
register change listeners on the DOM tree (it normally doesn't if the
document is static SVG).  You should also take care to only modify the
DOM in our update RunnableQueue:

    import org.apache.batik.bridge.UpdateManager;
    import org.apache.batik.util.RunnableQueue;

    UpdateManager um = canvas.getUpdateManager();
    RunnableQueue rq = um.getUpdateRunnableQueue();
    rq.invokeLater(new Runnable() { public void run() { /*...*/ } });
    rq.invokeAndWait(new Runnable() { public void run() { /*...*/ } });

    You need to do this to avoid multiple threads modifying the DOM at
the same time.

    Hope this helps...

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

Reply via email to