Hi Thomas,
 
I worked on this last night and got to a solution. Basically, I created a GlassPane on top of the canvases and added my own subclasses of the interactors to it. The GlassPane interactors just redirect the user input to all the canvases. It sounds simple, but in fact it required some work to get everything going.
 
The final result is not great, though, making the app look a little sluggish in less powerful boxes.
 
I'll give your idea a try, for it sure seems simpler than mine. I'm afraid the final result will be not different, though. Now I'm thinking on trying to use Overlays for that. I would keep the original document (JSVGCanvas) and draw the other documents as overlays on top of it.
 
My only concern is, again, keeping things in synch. Looking at SelectionOverlay, in TextSelectionManager, it looks like it all comes down to your approach: getRenderingTransform(), setRenderingTransform(). Would you think this is a good idea?
 
BTW, Thomas, I had some problems with SVN-06-03-27 (the one with your wonderful change to get rid of the DOM in the JGVTComponent). It looks like SVGs with embedded (base64-encoded) JPEG don't work anymore. I just downloaded SVN-06-03-30 to see if the problem persists, and then I'll open a new thread.
 
Best regards,
 
André


<[EMAIL PROTECTED]> escreveu na mensagem news:<[EMAIL PROTECTED]>...
Hi Andre,

André Ávila <[EMAIL PROTECTED]> wrote on 03/30/2006 12:20:22 PM:

> The idea, then, is to render each version of the file to a different
> JSVGCanvas and diplay those canvases as a stack of transparent
components. I
> accomplished this by using a JLayeredPane as the stack container.
>
> The problem is, how can I synchronize those canvases? I'm specifically
talking
> about the interactors, since the action listeners are simpler. Is there
any
> way I can propagate a user interaction in one canvas to the other ones?

   I would subclass the canvas and override the setRenderingTransform
method
so whenever it is called on the 'top most' canvas you trigger the same
change
in all the children canvas's (by simply calling setRederingTransform on
all
of them with the same affine - for the children I would always use 'true'
for redraw).
----------

Reply via email to