OK, I'm looking at the Wiki and I'm confused. I'm using the JSVGCanvas.
>From the Wiki:
"If you are using the JSVGCanvas it does this when you associate an
SVGDocument with the canvas."
It sounds like that I'm using the SVG and CSS DOM interfaces already
then? I also have a GVTTreeRendererAdapter that listens for
gvtRenderingCompleted.
My element definitely has a "fill" associated with it.
Here's my stack trace. The offending line is the SVGPaint declaration:
java.lang.NullPointerException
at
org.apache.batik.css.dom.CSSOMComputedStyle.getPropertyCSSValue(Unknown
Source)
at
mil.jfcom.cie.whiteboard.util.SVGUtil.getColor(SVGUtil.java:79)
at
mil.jfcom.cie.whiteboard.ui.listeners.button.PageChangeAction.setBackgro
undButton(PageChangeAction.java:51)
at
mil.jfcom.cie.whiteboard.ui.listeners.button.PageChangeAction.actionPerf
ormed(PageChangeAction.java:81)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
utton.java:1839)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.ja
va:420)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonList
ener.java:245)
at
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
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)
Michael Bishop
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 17, 2006 12:07 PM
To: [email protected]
Cc: [email protected]
Subject: RE: JSVGCanvas background
Hi Vincent, Michael,
"V. de Weger" <[EMAIL PROTECTED]> wrote on 09/16/2006 06:59:36 PM:
> Michael, you probably get the NPE because you're specific element has
no
fill
> in it's style. cssvalue is null then, and can't be casted.
This also reminds me that if you are asking about the fill on an
SVG element that is a child of a non-SVG element (say a custom
element in a custom namespace) then the CSS cascade won't be active
in that 'branch' of the DOM (partially because it's unclear how
the non-SVG element should effect the CSS cascade).
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]