Hi Habib,

(from a previous message)
>> > For example, for an svg image which contains a
>> > circle, I should be able to trigger an even by clicking the circle. Is it
>> > possible with Batik?

Yes, this is possible. Mark directed towards a JavaScript (actually,
ECMAScript) solution for simplicity. But Batik supports both
Java-based [1] and ECMAScript-based [2] scripting. :-)


> The svg image should be displayed in a java application, and some of its
> component (like the nodes in the example) are clickable, and even draggable
> (which implies dynamic svg, although it is not a crucial requirement, I'm
> more interested in  the "clickable" feature).

Yes, the SVG DOM has several interesting events [3] such as "onclick",
"onmousedown", "onmouseup", etc., which can be used to implement such
behavior. Remember that Batik is aims to be a complete SVG
specification, so understanding at least basic SVG concepts will be
very important while trying to use Batik in a programming way.


> I don't see how I can
> integrate javascript with java.

Batik uses Rhino for this, but there seem to be other ways of doing it...


Remember that the mailing lists [4] are a great way of crawling for
answers (most things asked were already addressed previously).
Personally, I prefer the Nabble's interface [5] for searches, but the
official interface works as well. ;-)


Hope this helps,
 Helder


[1] http://xmlgraphics.apache.org/batik/using/scripting/java.html
[2] http://xmlgraphics.apache.org/batik/using/scripting/ecmascript.html
[3] http://www.w3.org/TR/SVG/interact.html#SVGEvents
[4] http://xmlgraphics.apache.org/batik/mailing-lists.html
[5] http://www.nabble.com/Batik-f308.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to