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 Le...@csiro.au on 2002/04/19 04:08:34 UTC
How to manipulate visibility of tool tips
Hi,
I wrote a program to manipulate the visibility of a graphics node in an svg
document. However when the node is set to invisible, its tooltip remains
visible when the user moves the cursor over the svg document. How can I
manipulate the visibility of the tooltip as well ?
Section A contains the code to manipulate the visibility of the node;
section B contains the SVG document structure. The application was
developed using the Batik version 1.1.1 official release.
========
section A
========
org.w3c.dom.Element e = svgDocument.getElementById(id);
GraphicsNode gn = bridgeContext.getGraphicsNode(e);
if (gn instanceof CompositeGraphicsNode){
CompositeGraphicsNode cgn = (CompositeGraphicsNode)gn;
for (int i = 0; i<cgn.size();i++){
if (cgn.get(i) instanceof CompositeGraphicsNode){
CompositeGraphicsNode cgn2 =
(CompositeGraphicsNode)cgn.get(i);
for (int j = 0; j<cgn2.size();j++){
GraphicsNode shpnode =
(GraphicsNode)((CompositeGraphicsNode)cgn2.get(j));
if (visflag) {
shpnode.setVisible(true);
} else {
shpnode.setVisible(false);
}
}
}
}
}
============
section B
============
<svg> ....
<g> .....
<a>
<path> ......
<title> contains tooltip text for node 1</title>
</path>
</a>
<a>
<path> ......
<title> contains tooltip text for node 2</title>
</path>
</a>
</g>
</svg>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
RE: How to manipulate visibility of tool tips
Posted by Thierry Kormann <tk...@ilog.fr>.
> I wrote a program to manipulate the visibility of a graphics node
> in an svg
> document. However when the node is set to invisible, its tooltip remains
> visible when the user moves the cursor over the svg document. How can I
> manipulate the visibility of the tooltip as well ?
>
> Section A contains the code to manipulate the visibility of the node;
> section B contains the SVG document structure. The application was
> developed using the Batik version 1.1.1 official release.
you can use the pointer-events property for that, I think.
Thierry.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org