I'm using Batik (svg-gen) to draw a svg (technical) diagram with the aid of java awt in a back-end service. I use this service on many places were the need arises to draw such diagram.
I would like to use a "tool-tip-kind-of-hover-over" to give more details on for instance a rectangle in the diagram.
Is this possible in Batik? I've found some hints on using css style but it strikes me as tricky.
I found out that its done by title, like described here. In order to include the title tag, the Batik classes that generate SVG and relevant AWT classes can be extended.
To start:
And the corresponding batik class
Now the new shape converter has to be used. That can be achieved by extending the SVGShape, responsible for writing the svg xml.
And writing your own SVGGraphics2D (extending the existing one)
Now, there's the possibility to use the newly created awt extension: