xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tacio Santos" <tacio.san...@gmail.com>
Subject UpdateManager thread not refreshing dynamic svg in JSVGCanvas
Date Wed, 07 Mar 2007 05:21:02 GMT
Hi,

I'm new to batik and to svg. I'm trying to dynamically add elements to
a JSVGCanvas but updates are not been displayed. I went throgh the FAQ
and the mailing list archives( from 200501 to 200703) but I haven't
found a hint to my problem. Does anybody know what am I missing or
mistaking in the code below?

Thanks in advance,
Tacio

PS:

canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
canvas.setURI( MY_SVG_FILE );
..
// after gvtRenderingCompleted event I'm doing:

canvas.getUpdateManager().getUpdateRunnableQueue()
		.invokeLater(
				new Runnable() {
					public void run() {

						SVGDocument doc = canvas.getSVGDocument();
						SVGSVGElement root =doc.getRootElement();
						String svgNS="http://www.w3.org/2000/svg";
						Element rectangle = doc.createElementNS(svgNS, "rect");
						rectangle.setAttributeNS(null, "x", "200");
						rectangle.setAttributeNS(null, "y", "200" );
						rectangle.setAttributeNS(null, "width", "100");
						rectangle.setAttributeNS(null, "height", "510");
                  }
            );

PS2: My system

BATIK version 1.6

JAVA:

java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_10-b03, mixed mode)

OS:
Debian GNU/Linux 4.0 (etch)
Linux  2.6.18-3-amd64  SMP x86_64

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


Mime
View raw message