logo       

Add user info to SVG shapes: msg#00110

Subject: Add user info to SVG shapes
Hi,

I am a new Batik user. I have the following goal, and I wonder whether Batik
may solve it or not (and if it can, how ?):
I have developed in Java (JDK1.4) an editor that displays a diagram, made of
edges and nodes. These edges and nodes have metadata attached to them, that
are displayed in tooltip-form when the mouse is over them(each figure has a
tooltip).
To sum up, each figure is a class Figure with a java.awt.Shape, a
java.awt.Paint fill attribute, a paint() method, and a user object
(node/edge + metadata).  
I have succeeded in generating a "static SVG" from this diagram with
SVGGraphics2D, by calling the paint method as shown in the tutorial.

I would like now to generate from this diagram a "dynamic SVG" that when
loaded in a browser displays the tooltips like in the java editor.I know
that it is possible by adding scripts.

--->The big problem is now to insert the tooltip, i.e the metadata, as
attribute of the SVG element. 
I have no idea how to insert these metadata during the SVG generation by the
svg generator. Of course, when the SVG file is generated, it is too late,
because even if I parse it, I will not recognize that the shape X is the
node X in my diagram with its attached metadata. I have looked at the page
http://xml.apache.org/batik/svggen.html and the SwingSVGPrettyPrint class
but they were not very helpful to me (are there any other
tutorials/examples/docs ?).

Thanks, 

Mikael Mechoulam


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe