Skip to main content

SVGImage update

3 replies [Last post]
sopel39
Offline
Joined: 2008-02-20
Points: 0

Hi

Can i update dynamically my build from scratch SVGImage without using document update thread? I saw in examples that i can add object to documents without calling some document update threads. Can i do the same with traits of existing objects?

Thx

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
terrencebarr
Offline
Joined: 2004-03-04
Points: 0

Hi sopel39,

Sorry about the very slow reply. I just got back from India - too much going on ;-( However, I did manage to speak to one of our SVG experts about the topic. Just wanted to make sure I close on this thread:

As long as the SVG image is not being displayed then you can access and update the DOM with any thread. Once the image is being displayed you need to perform updates on the document thread to ensure synchronization with the SVG engine. You would use the svgAnimator.invokeLater() API for that. For an example, see

https://meapplicationdevelopers.dev.java.net/source/browse/meapplication...

Hope this helps. Again, sorry for the slow reply.

-- Terrence

terrencebarr
Offline
Joined: 2004-03-04
Points: 0

I believe you can use any thread to add objects to an SVG DOM as long as the document is not being displayed. Once displayed you need to hook into the document thread for synchronization purposes. Is that what you are asking?

Cheers,

-- Terrence

sopel39
Offline
Joined: 2008-02-20
Points: 0

yes it is what i mean, but how can i hook into document update thread?