Hi emzic,

emzic <emzic@embege.com> wrote on 11/20/2008 04:39:06 AM:

> >>>now i update the svgdocument via the dom-tree
> >
> > How exactly?  Do you make your changes thread-safe, using the update
> > manager, such as
> >
> >   RunnableQueue rq =
> > svgCanvas.getUpdateManager().getUpdateRunnableQueue();
> >   rq.invokeLater(new Runnable(){
> >     public void run(){
> >       //your doc updates here
> >     }
> >   });
> >
>
> hmmmm, will i need to do this for every document update?


   Probably.

> because i have code like:
> ((Element) node).setAttributeNS(null, "style", "fill:none");
> all over the place.

   The only time you don't need to submit the change to the
Update Manager's RunnableQueue is if the change is made in
a DOM listener on the document you are modifying.  If the
change is made in any other context (say a swing callback
or some other thread listening to a network connection, etc)
then you must synchronize it by submitting it to the runnable
queue.  See the Batik FAQ to understand why...