xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bishop, Michael W. CONTR J9C880" <Michael.Bis...@je.jfcom.mil>
Subject Drag and drop breaks with a JSVGScrollPane?
Date Thu, 01 Dec 2005 15:58:07 GMT
I added a JSVGScrollPane around my JSVGCanvas.  Now I'm getting random
NPEs when dragging an element around the canvas.  This looks
thread-related, but my drag and drop code hasn't changed.  I'm updating
the document in the JSVGCanvas's UpdateManager with a Runnable.  Here's
the stack trace:

 

java.lang.NullPointerException

        at org.apache.batik.swing.JSVGScrollPane.getViewBoxRect(Unknown
Source)

        at
org.apache.batik.swing.JSVGScrollPane$ScrollListener.updateCompleted(Unk
nown Source)

        at org.apache.batik.swing.svg.JSVGComponent$12.run(Unknown
Source)

        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)

        at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)

        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d.java:201)

        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
java:151)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

 

Is there something else I need to manage when I have a JSVGScrollPane?
I just wanted to be able to scroll around the canvas when I'm zoomed in.
All I did was wrap the JSVGCanvas in the JSVGScrollPane.  Oddly enough,
this error occurs if I don't even add the JSVGScrollPane to the
application.  As long as I call its constructor with the JSVGCanvas as
the parameter, the error happens.

 

Michael Bishop


Mime
View raw message