Hi Philip,
philip zuniga <[EMAIL PROTECTED]> wrote on 02/28/2006 06:03:20 AM:
> Hello I am currently creating a java software that has
> 2 JSVG canvasses in it. Each JSVG canvas loads a
> different svg file.
Each canvas will have a separate UpdateManager thread.
> This is what I did, inside the event handler of the
> first SVG file, I placed changed the "fill" attribute
> of the rectangle in the other file,
You can only modify a document inside it's UpdateManager's
thread. By do the above you are modifying the 'second'
document in the 'first' documents UpdateManager thread.
As a result the second document has no idea that it's
content has changed.
You need to modify the DOM of the second document in
the second canvas's UpdateManager Thread:
public void handleEvent(Event e) {
canvas2.getUpdateManager().getUpdateRunnableQueue().
invokeLater(new Runnable() {
public void run() {
rect.setAttributeNS(null, "fill", "red");
}
});
}
> But the color of the rectangle doesn't change
> instantaneously, I have to place the mouse over the
> other SVG file, so that the color of its rectangle
> changes...
>
> what do you think am I doing wrong.
>
>
> Thanks a lot
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]