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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]