Hello,
I tried it out following your example:
if ("rect".equals(tag)) {
Element desc =
doc.createElementNS(SVGDOMImplementation.SVG_NAMESPACE_URI, "desc");
desc.appendChild(doc.createTextNode("tip"));
elem.appendChild(desc);
walker.nextNode();
}
I'm using a walker and try to add to every rectangle in my Dom-Tree a
tooltip...
But it's not working. Do I miss something?
Thanks,
Christoph
-----Urspr�ngliche Nachricht-----
Von: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 22. Februar 2005 15:05
An: Batik Users
Betreff: Re: Tool tip
Scheit Christoph wrote:
> I want to generate dynamically tool tips for some elements of a svg
> document. Using a group and setting a title for example works fine.
> But instead of giving the tool tips already in the svg file, I'm
> looking for a possibility to set them using the batik api (like one
> would do with any JComponent - setToolTipText(...)).
Well assuming your document is dynamic, you should be able to
add them using the DOM:
Element desc = document.createElementNS(svgns, "desc");
desc.appendChild(document.createText("Some Description"));
document.getElementById("foo").appendChild(desc);
That said I don't know for certain if this will work, it is
possible that our title/desc analysis is done only when the
document is loaded (which would be a bug). If it is the case
it shouldn't be a particularly hard bug to fix.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]