Hi Mickael,
You might try using the <title> and <desc> elements. If present Batik will automatically show tooltips when the mouse hovers over the associated graphics element. >>>>> "MM" == MECHOULAM, Mickael <[EMAIL PROTECTED]> writes: MM> Hi, I am a new Batik user. I have the following goal, and I wonder MM> whether Batik may solve it or not (and if it can, how ?): I have MM> developed in Java (JDK1.4) an editor that displays a diagram, made MM> of edges and nodes. These edges and nodes have metadata attached MM> to them, that are displayed in tooltip-form when the mouse is over MM> them(each figure has a tooltip). To sum up, each figure is a MM> class Figure with a java.awt.Shape, a java.awt.Paint fill MM> attribute, a paint() method, and a user object (node/edge + MM> metadata). I have succeeded in generating a "static SVG" from MM> this diagram with SVGGraphics2D, by calling the paint method as MM> shown in the tutorial. MM> I would like now to generate from this diagram a "dynamic SVG" MM> that when loaded in a browser displays the tooltips like in the MM> java editor.I know that it is possible by adding scripts. MM> The big problem is now to insert the tooltip, i.e the metadata, as MM> attribute of the SVG element. I have no idea how to insert these MM> metadata during the SVG generation by the svg generator. Of MM> course, when the SVG file is generated, it is too late, because MM> even if I parse it, I will not recognize that the shape X is the MM> node X in my diagram with its attached metadata. I have looked at MM> the page http://xml.apache.org/batik/svggen.html and the MM> SwingSVGPrettyPrint class but they were not very helpful to me MM> (are there any other tutorials/examples/docs ?). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
