ok, I try to cast my element to SVGStylable, but getStyle throws a
NullPointerException:

but I checked: s (SVGStylabl) itself is not null ! (it is a
SVGOMRectElement):

  SVGStylable s = (SVGStylable)myElement;
  CSSStyleDeclaration sd = s.getStyle();

java.lang.NullPointerException
 at
org.apache.batik.dom.svg.SVGStylableElement$StyleDeclaration.<init>(Unknown
Source)
 at org.apache.batik.dom.svg.SVGStylableElement.getStyle(Unknown Source)

any idea ? is it the wrong way to get SVGStylable ?
Maik

----- Original Message ----- 
From: "Cameron McCormack" <[EMAIL PROTECTED]>
To: "Batik Users" <[EMAIL PROTECTED]>
Sent: Wednesday, October 06, 2004 8:59 AM
Subject: Re: how to get parts of the 'style' attribute


> Maik Schrer  proveo GmbH:
> > Thanks Cameron for fast reply
> > but what is the type (class) of 'bgRect' with a method 'getStyle' in
your
> > example and how to get it?
>
> It is org.w3c.dom.svg.SVGStylable:
>
>   http://www.w3.org/TR/SVG11/types.html#InterfaceSVGStylable
>
> Cameron
>
> -- 
> Cameron McCormack
> |  Web: http://mcc.id.au/
> |  ICQ: 26955922
>
> ---------------------------------------------------------------------
> 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]

Reply via email to