I have an application that I would like to implement using SVG and the Java
Language Binding Scripting.  I have an SVG document and a Java
EventListenerInitializer that is working in Squiggle.  So far, so good.  Now
I would like to sping off a thread that creates a socket connection and
listens for data.  When the data arrives I would like to update the SVG DOM.
To do that I need to ask the Batik canvas for the update manager and ask
that for the runnable queue then queue up a runnable to do the update.
However, I don't have a reference to the canvas.  Is there some way to get
one from the document?

I would also like my code to not use any Batik implementation specific stuff
(in the hope that other browsers will also support SVG with Java scripting).
So I took a look at the SVG 1.2 spec to see if there was some upcoming
standard way to do this.  Section 11 talks about adding a SVGWindow
interface with a way to create SVGTimer objects that can run a set of
SVGRunnable objects.  So it sounds like the following:

SVGDocument document = ?:
SVGWindow window = document.getSVGWindow();
SVGTimer timer = window.createTimer(0, false);
timer.addHandler(new SVGRunnable() {
    public void run() {
    }
});
timer.start();

will have the same effect as:

SVGCanvas canvas = ?;
UpdateManager updateManager = canvas.getUpdateManager();
RunnableQueue runnableQueue = updateManager.getRunnableQueue();
runnableQueue.invokeLater(new Runnable() {
    public void run() {
    }
});

but it could potentially run in other implementations.  Does that sound
right?

BTW: It looks like adding these interfaces and an implementation that just
routes the calls the existing Batik code would be fairly straight forward.
Is there any interest in that?

Thanks,
  Denis


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to