You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Amir Kouchekinia <am...@pyrus.us> on 2007/06/12 02:28:22 UTC

After second setSVGDocument call UpdateManager fails

Hi,

I am having a problem with the UpdateManager for Batik as a new user. I 
can't seem to overcome the problem. Any help would be appreciated.

Batik Version: 1.7 beta 1
OS: Windows XP & Linux (Fedora 7)
JRE: JDK1.6u1

Problem:  When the second call to the 'makeChangesToDoc'  is made, the 
'myUpdateManagerListener' will always get an 'updateFailed'. I am not 
sure if I have come across a bug, or I am missing a crucial step.

JSVGCanvas svgCanvas = new JSVGCanvas();
svgCanvas.addGVTTreeBuilderListener(myGVTTreeBuilderListener);
svgCanvas.addUpdateManagerListener(myUpdateManagerListener);
svgCanvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);

setDocument(svgDoc);
waitForGVTBuildToCompleteOrFail();

makeChangesToDoc(svgDoc);
waitForUpdateManagerToCompleteOrFail();

setDocument(svgDoc);
waitForGVTBuildToCompleteOrFail();

makeChangesToDoc(svgDoc);
waitForUpdateManagerToCompleteOrFail();


||Notes for setDocument:
	Makes calls to svgCanvas.setSVGDocument()
	After the first invocation, makes the call in a Runable in
		UpdateRunnableQueue.invokeLater

Notes for the wait methods:
	Coordinate with the canvas listeners and wait in a separate thread
	until desired flag is set.

Notes for makeChangesToDoc:
	Makes changes to the SVG DOM element attributes in a Runable in
		UpdateRunnableQueue.invokeLater




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org