Hi Chris,
Web Query wrote:
I just started programming with batik today and have come to a point that is stumpping me after hours of looking at the API and tracing code through the debugger. I have managed to take the sample SVGBrowser application and implement mouse listening in such a way that I can get the GraphicsNode object that I click on (whew - that took some work).
This is a lot easier if you use the DOM:
Element x = document.getElementById(...); EventListener el = new EventListener() { public void handleEvent(Event evt) {... } }; ((EventTarget)x).addEventListener("mousemove", el, false);
BTW you probably want to look at the DOM events spec (it's a pretty short read). It will let you know about event propagation (which can help avoid registering lots of listeners).
But, now I need to change the color of the SVG object I selected.
Archie already answered this, once again the DOM is your friend.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]