You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Scheit Christoph <ch...@siemens.com> on 2005/02/22 14:59:26 UTC
Tool tip
Hello everybody!
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(...)).
Thank's in advance,
Christoph
Re: Tool tip
Posted by Thomas DeWeese <Th...@Kodak.com>.
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: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org