W3C home > Mailing lists > Public > www-svg@w3.org > November 2001

Re: Java & SVG

From: Vincent Hardy <vincent.hardy@sun.com>
Date: Mon, 19 Nov 2001 19:18:00 +0100
Message-ID: <3BF94CD8.C4843D04@sun.com>
To: sds@darval.com, www-svg@w3.org
Sigurdur,

Sigurdur Darri Skulason wrote:
> 
> Hello all
> 
>  I know that this may be a stupid question, but I would appreciate some
> information.
> 
>  Basically we have created a solution that is based on Javascript/DHTML/SVG
> etc and drives dynamically some svg files, including a world map view running
> in the Adobe SVG plugin inside IE. Based on XML information fetched from
> various sources by the javascript code, we change attributes of various nodes
> on the svg map.
> 
>  I am now interested in creating a Java version of this solution, so that it
> could potentially be considerably more powerful and dynamic. I would however
> like to continue using SVG for the graphics.
> 
>  Based on looking at the batik implementation it seems that it does not
> support dynamic modification and updates of SVG elements, so that I would not
> be able to, say, change the color of a node in my SVG file without having to
> re-render the whole file.

This is right: the current Batik code does not support dynamic updates.
However, the team is working on adding that support and you should see
the initial result coming out of that work in the next several months. 

Note that when that development is completed, you will be able to deploy 
your solution using Batik and JavaWebStart for deployment
so that your application can be viewed from any browser. The current
Batik demo uses that technique: 

http://xml.apache.org/batikDemo.html

> 
>  A way around this does therefore seem to be to continue using the adobe
> plugin in IE, with the java code running as a applet, and the two
> communicating via javascript. It does not seem quite as elegant though and I
> would also prefer being able to contain the SVG inside the Java application.
> 
>  My question is therefore: Is there any way to do this Java <-> SVG
> interaction in a obvious way that I am missing or does anyone have any
> suggestions. Any information or pointers would be very much appreciated.

I do not know about IE. I think that Netscape's liveconnect API would 
let you do what you want:

http://home.netscape.com/eng/mozilla/3.0/handbook/plugins/

I am not sure if Liveconnect is supported in IE even though I found some
pages which seem to indicate it was in IE 4.0x. For example:

http://www.simonstl.com/dynhtml/update/lc.html

I hope this helps,
Regards,
Vincent Hardy
Received on Monday, 19 November 2001 13:16:30 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:21 GMT