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 Cyannick <ya...@gmail.com> on 2009/06/25 19:19:07 UTC

Migrating SVG/AJAX to Batik?

Hello,

I'm currently working on an application that use a AJAX structure to update
a SVG file (change colors, hide element, open new window with svg ...). This
SVG is displayed in an html page, and javascripts are loaded in the html
page too.

We would like to migrate the display of those files in a java application,
since we are already migrating some other old parts to java. 

I read in Batik home page and in here about javascript support, but I could
not fully grasp the extent of that compatibility.

To be able to fully use our javascripts, do we need to make some
adaptations? (with Batik, or Rhino as I read)
Or does JSVGCanvas automatically load external javascripts and use their
functions? (provided that javascripts are loaded in SVG files)

Can Batik (listeners I suppose) catch a modification to the SVG file made
through a javascript function?


Thanks for your help.
-- 
View this message in context: http://www.nabble.com/Migrating-SVG-AJAX-to-Batik--tp24207556p24207556.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Migrating SVG/AJAX to Batik?

Posted by Cyannick <ya...@gmail.com>.
Thanks for your reply.


thomas.deweese wrote:
> 
> Hi Yannick,
> 
> Cyannick <ya...@gmail.com> wrote on 06/25/2009 01:19:07 PM:
> 
>> I read in Batik home page and in here about javascript support, but I 
> could
>> not fully grasp the extent of that compatibility.
>> 
>> To be able to fully use our javascripts, do we need to make some
>> adaptations? (with Batik, or Rhino as I read)
>> Or does JSVGCanvas automatically load external javascripts and use their
>> functions? (provided that javascripts are loaded in SVG files)
> 
>    The JSVGCanvas will automatically load external javascripts and
> run their functions (as appropriate).  You can test it standalone 
> with the squiggle SVG Browser included in the standard Batik 
> distribution.
> 
>> Can Batik (listeners I suppose) catch a modification to the SVG file 
> made
>> through a javascript function?
> 
>    Yes, Batik fully implements DOM level 2 Events, so you can register for
> mutation events (in either Java or JavaScript).
> 
> 

-- 
View this message in context: http://www.nabble.com/Migrating-SVG-AJAX-to-Batik--tp24207556p24271201.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Migrating SVG/AJAX to Batik?

Posted by th...@kodak.com.
Hi Yannick,

Cyannick <ya...@gmail.com> wrote on 06/25/2009 01:19:07 PM:

> I read in Batik home page and in here about javascript support, but I 
could
> not fully grasp the extent of that compatibility.
> 
> To be able to fully use our javascripts, do we need to make some
> adaptations? (with Batik, or Rhino as I read)
> Or does JSVGCanvas automatically load external javascripts and use their
> functions? (provided that javascripts are loaded in SVG files)

   The JSVGCanvas will automatically load external javascripts and
run their functions (as appropriate).  You can test it standalone 
with the squiggle SVG Browser included in the standard Batik 
distribution.

> Can Batik (listeners I suppose) catch a modification to the SVG file 
made
> through a javascript function?

   Yes, Batik fully implements DOM level 2 Events, so you can register for
mutation events (in either Java or JavaScript).