xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: How to send event from embedded Javascript to Java
Date Tue, 06 Nov 2007 11:50:53 GMT
Hi Adam,

ACE91 <adamlego20@hotmail.com> wrote on 11/05/2007 04:28:32 PM:

> I'm trying to make a game with Batik (Yes, a game. Why hasn't anyone 
> this before? There don't seem to be any other vector graphics engines 
> Java that can load from files) and I've encountered one critical 
> How do you send an event from the JavaScript embedded in a SVG file to 
> Java program displaying it?

   You can use BridgeContext.getInterpreter(<mimetype string>);
To get the javascript interpreter, then call 
script.Interpreter.bindObject(String name, Object obj);

   To bind an Java object into the JavaScript environment.
You can then call methods on that Java Object from javascript.

View raw message