I have tried it and it works just fine.
Thanks to everyone who replied to my post.


From: "zze-DAROUX Olivier FTRD/DIH/GRE" <[EMAIL PROTECTED]>
Reply-To: "Batik Users" <[EMAIL PROTECTED]>
To: "Batik Users" <[EMAIL PROTECTED]>
Subject: RE: interactive SVG
Date: Wed, 6 Aug 2003 09:30:00 +0200


Hi,

> Hi
> Im a university student working on a projet that draws
> sequence diagrams. I
> am planning on using SVG to do this. The problem is that im
> not sure if SVG
> can be made interactive in a java application( i know this
> can be done with
> javascript and a browser). I need to be able to click on
> certain object
> names on the diagram which will call a java class(listener)
> that will handle
> the clicking event. Can this be done with batik??

Yes of course, this a big advantage of batik (in my opinion :-)).
If you register a mouselistener on the jsvgcanvas then the event object
is the shape you clicked. Oh, I give you the method, to help you :-)
(maybe this is not the best method, I don't know)
You get the element on which you want add the listener (i.e. with
getelementbyid) and then use addEventListener("click",
listenerClassObject, false) on it. Of course the svg element must have a
onclick attribute (even empty)

> Thanks in advance for your time. Any help will be greatly appreciated.
> Ian.

Your welcome
Olivier

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


_________________________________________________________________
Hot chart ringtones and polyphonics. Go to http://ninemsn.com.au/mobilemania/default.asp



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



Reply via email to