Hi,

I am a new Batik user. I have the following goal, and I wonder whether Batik
may solve it or not (and if it can, how ?):
I have developed in Java (JDK1.4) an editor that displays a diagram, made of
edges and nodes. These edges and nodes have metadata attached to them, that
are displayed in tooltip-form when the mouse is over them(each figure has a
tooltip).
To sum up, each figure is a class Figure with a java.awt.Shape, a
java.awt.Paint fill attribute, a paint() method, and a user object
(node/edge + metadata).  
I have succeeded in generating a "static SVG" from this diagram with
SVGGraphics2D, by calling the paint method as shown in the tutorial.

I would like now to generate from this diagram a "dynamic SVG" that when
loaded in a browser displays the tooltips like in the java editor.I know
that it is possible by adding scripts.

--->The big problem is now to insert the tooltip, i.e the metadata, as
attribute of the SVG element. 
I have no idea how to insert these metadata during the SVG generation by the
svg generator. Of course, when the SVG file is generated, it is too late,
because even if I parse it, I will not recognize that the shape X is the
node X in my diagram with its attached metadata. I have looked at the page
http://xml.apache.org/batik/svggen.html and the SwingSVGPrettyPrint class
but they were not very helpful to me (are there any other
tutorials/examples/docs ?).

Thanks, 

Mikael Mechoulam

  







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

Reply via email to