Because the alternative stylesheet option in the useragent has the same
effect as changing the css in the DOM, I tried it from that angle, and that
seems to be working fine. When I step through my code (debug in eclipse) the
next code works fine, but when I run it in normal mode I get NPE's in
fireEventListeners (see stacktrace). Has anybody any clue what's going on?
My code (in a method of subclassed JSVGCanvas):
if (getUpdateManager()!=null) {
getUpdateManager().interrupt();
}
... remove all the event listeners I created ...
if (this.getDocument()!= null) {
((SVGOMDocument)this.getDocument()).clearViewCSS();
... change the alternate stylesheet in the useragent of
the canvas ...
this.setSVGDocument(this.getDocument());
}
After running this code I get multple (>40) sets of this stacktrace (I'm
using a recent 1.6 trunc version):
java.lang.NullPointerException
at org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown
Source)
at org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown
Source)
at org.apache.batik.dom.events.EventSupport.dispatchEvent(Unknown
Source)
at org.apache.batik.dom.AbstractNode.dispatchEvent(Unknown Source)
at
org.apache.batik.dom.AbstractParentNode.fireDOMNodeInsertedEvent(Unknown
Source)
at org.apache.batik.dom.AbstractParentNode.appendChild(Unknown Source)
at
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(Unknown
Source)
at
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(Unknown
Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source)
Vincent
--
View this message in context:
http://www.nabble.com/JSVGCanvas-background-tf2239369.html#a6517525
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]