Thomas DeWeese wrote:
> If you want the update manager so you can twiddle the document you > can (and should) do this in an onload DOM event handler (perhaps > attached after document load) or in one of the svgLoadEventDispatch > callbacks (so if you do it in the Completed call you will know that > any 'in document' onload handlers have run and completed).
Yes the goal is in fact to twiddle the DOM. But I don't quite understand what you mean by "onload DOM event handler"... JavaScript?
> I'm not 100% sure that I understand what you want to do so let me > know if I've missed something important.
I want to know when the doc is fully loaded into the canvas, and ready for updates by modifying the DOM programmatically. I have an app where the user can navigate among several SVG documents. For performance I would like to line up several canvases and keep them ready in a cache. When the user navigates to a particular document, its canvas is added to my frame, and he can then perform various edits on the doc via Swing actions (funneled into the UpdateManager's queue.)
To keep the rest of my code simple, I wanted my CanvasCache to worry about canvas creation and blocking until the UpdateManager is available. I wrote a simple waitUntilLoaded() method that blocks waiting for gvtRenderingCompleted. This way clients of the cache can request and immediately use canvases without worrying about whether the UpdateManager was ready yet or not. Also since the cache blocks waiting for each document to be ready, it's able to figure out how much time is spent loading each doc, and can be somewhat intelligent about not using too much CPU.
But for this waitUntilLoaded to work, the canvas must first be made visible. Which means either I have to fake out Batik by displaying my canvas in a hidden frame somewhere, or I have to move push the call up into my client code somewhere, which I was hoping to avoid.
Sorry if this explanation has not been succint, I tried my best. ;-)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]