xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thierry Kormann <Thierry.Korm...@sophia.inria.fr>
Subject Re: Congrats & Question
Date Wed, 07 Feb 2001 08:21:10 GMT

> Congratulations to all the contributors on a great job! I'm really impressed
> with Batik.


> 1.) Can I make changes to an SVG document or some DOM and have it
> dynamically update the visible graphic in Batik's current state? (OPT: If
> not how should I approach this problem?)

Not yet. we put in place some mecanism to prepare the dynamic behavior but at
this time, you only thing you can do is:

1. modify the DOM
2. call the setDocument on JSVGCanvas to see the update

Of course that's not the appropriate solution as the whole DOM tree is going to
be re-interpreted but it works. It's also a good approach as the DOM is our
model (in a MVC approach). So later, you will just have to remove the
setDocument method and see the real-time graphical update :)

> 2.) Can JSVGCanvas or SVG elements accept events such as mouse clicks in
> Batik's current state?

Yes you can. The good way to do that is to consider the DOM is the model of
Batik. So, you have to:

1. add an EventListener on the nodes you want to in the DOM

You will automatically receive mouse events each time the mouse has been clicked
on the 'graphic representation' of this node. Please notice that key and focus
event support is not implemented yet.


View raw message