You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Guillaume Pothier <gp...@free.fr> on 2003/10/03 15:44:31 UTC

getStyle in StylableExtensionElement

Hi!

The current implementation of getStyle () in 
org.apache.batik.extension.StylableExtensionElement is as follows 
(nightly cvs):

  public CSSStyleDeclaration getStyle() {
         throw new InternalError("Not implemented");
     }

Is this the intended behaviour? I mean, should every subclass implement 
getStyle in its own way, or dos "Not implemented" means "Not implemented 
yet"?

Guillaume


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


Re: getStyle in StylableExtensionElement

Posted by Thomas DeWeese <Th...@Kodak.com>.
Guillaume Pothier wrote:

> Yeah, I looked at the SVGStylableElement implementation, and my first 
> reaction was to copy/paste the method body to my subclass, but then I 
> noted that there is also a quite big inner class to copy, so I didn't go 
> on.
> Are you going to implement to change you mentioned?

   Probably not right away.  There is also a problem with setting
shorthand properties through this interface.  So when I get around
to fixing that I will probably refactor this a bit so subclassing is
more straight forward.

> Thx
> Guillaume
> 
> Thomas DeWeese wrote:
> 
>> Guillaume Pothier wrote:
>>
>>> Hi!
>>>
>>> The current implementation of getStyle () in 
>>> org.apache.batik.extension.StylableExtensionElement is as follows 
>>> (nightly cvs):
>>>
>>>  public CSSStyleDeclaration getStyle() {
>>>         throw new InternalError("Not implemented");
>>>     }
>>>
>>> Is this the intended behaviour? I mean, should every subclass 
>>> implement getStyle in its own way, or dos "Not implemented" means 
>>> "Not implemented yet"?
>>
>>
>>
>>   It isn't 100% clear to me why this is done.  If you look in
>> batik.dom.svg.SVGStylableElement you can see a pretty good
>> implementation of getStyle.  I would be tempted to make
>> the ExtensionElement a subclass of SVGStylable.  You will however
>> notice that there are a couple of SVG specific things in that
>> implementation (most notably the handling of paint/color properties).
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>> For additional commands, e-mail: batik-users-help@xml.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 




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


Re: getStyle in StylableExtensionElement

Posted by Guillaume Pothier <gp...@free.fr>.
Yeah, I looked at the SVGStylableElement implementation, and my first 
reaction was to copy/paste the method body to my subclass, but then I 
noted that there is also a quite big inner class to copy, so I didn't go on.
Are you going to implement to change you mentioned?
Thx
Guillaume

Thomas DeWeese wrote:
> Guillaume Pothier wrote:
> 
>> Hi!
>>
>> The current implementation of getStyle () in 
>> org.apache.batik.extension.StylableExtensionElement is as follows 
>> (nightly cvs):
>>
>>  public CSSStyleDeclaration getStyle() {
>>         throw new InternalError("Not implemented");
>>     }
>>
>> Is this the intended behaviour? I mean, should every subclass 
>> implement getStyle in its own way, or dos "Not implemented" means "Not 
>> implemented yet"?
> 
> 
>   It isn't 100% clear to me why this is done.  If you look in
> batik.dom.svg.SVGStylableElement you can see a pretty good
> implementation of getStyle.  I would be tempted to make
> the ExtensionElement a subclass of SVGStylable.  You will however
> notice that there are a couple of SVG specific things in that
> implementation (most notably the handling of paint/color properties).
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 


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


Re: getStyle in StylableExtensionElement

Posted by Thomas DeWeese <Th...@Kodak.com>.
Guillaume Pothier wrote:

> Hi!
> 
> The current implementation of getStyle () in 
> org.apache.batik.extension.StylableExtensionElement is as follows 
> (nightly cvs):
> 
>  public CSSStyleDeclaration getStyle() {
>         throw new InternalError("Not implemented");
>     }
> 
> Is this the intended behaviour? I mean, should every subclass implement 
> getStyle in its own way, or dos "Not implemented" means "Not implemented 
> yet"?

   It isn't 100% clear to me why this is done.  If you look in
batik.dom.svg.SVGStylableElement you can see a pretty good
implementation of getStyle.  I would be tempted to make
the ExtensionElement a subclass of SVGStylable.  You will however
notice that there are a couple of SVG specific things in that
implementation (most notably the handling of paint/color properties).





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