You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by "Roger L. Whitcomb" <Ro...@ingres.com> on 2010/05/05 19:46:42 UTC

Applying styles to LinkButton

Hi –
	I’m trying to apply a style (basically either font or color or both) to a LinkButton using Pivot 1.4.  I see that the LinkButtonDataRenderer (line 95) is calling “getStyles().get(“font”)” and then setting the font style on the label component, but if I try to put the styles in my .wtkx file it gets an error.  What am I missing here?  Thanks.

Snipped from .wtkx:
				    <LinkButton wtkx:id="findOtherButton" styles="{font:{bold:true}, color:13}" >
					<buttonData>
					    <content:ButtonData text="Find other installations..." />
					</buttonData>
				    </LinkButton>

Error I'm getting:
An error occurred while processing  element <LinkButton> starting at line number 63 in file /C:/Projects/tooldev/src/prototype.wtkx:

java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.pivot.beans.BeanDictionary.put(Unknown Source)
        at org.apache.pivot.wtk.Component$StyleDictionary.put(Unknown Source)
        at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
        at org.apache.pivot.wtk.Component.setStyles(Unknown Source)



Thank you,
Roger Whitcomb
Architect, Engineering
Ingres Corporation
roger.whitcomb@ingres.com

Re: Applying styles to LinkButton

Posted by Greg Brown <gk...@mac.com>.
For now, I'd suggest SVN. We're hoping to get the final release out soon, though.

On May 6, 2010, at 11:33 PM, Roger L. Whitcomb wrote:

> Hi Greg,
>    Thank you very much.  What's the best way to get a preview of 1.5?  Should I just pull the latest source from SVN or is there a tag or any source tarballs?
> 
> Thanks,
> Roger Whitcomb
> 
> 
> -----Original Message-----
> From: Greg Brown [mailto:gkbrown@mac.com]
> Sent: Thu 5/6/2010 5:17 AM
> To: user@pivot.apache.org
> Subject: Re: Applying styles to LinkButton
> 
> This is now checked in.
> 
> On May 6, 2010, at 7:32 AM, Greg Brown wrote:
> 
>> Actually, 13 isn't technically wrong - we support this means for setting colors in most other skins. It means "use the color at index 13 in the Terra color palette". However, TerraLinkButtonSkin is missing the setColor() override that performs the color lookup. I will add this for Pivot 1.5.
>> 
>> 
>> On May 6, 2010, at 2:37 AM, Dirk Möbius wrote:
>> 
>>> "color:13" is wrong. It must be either "color:'#FFFFFF'" or "color:'0xFFFFFFFF'"
>>> 
>>> Regards,
>>> Dirk.
>>> 
>>> 
>>> "Roger L. Whitcomb" <Ro...@ingres.com> wrote:
>>> 
>>>> Hi -
>>>> 	I'm trying to apply a style (basically either font or color or both) to a LinkButton using Pivot 1.4.  I see that the LinkButtonDataRenderer (line 95) is calling "getStyles().get("font")" and then setting the font style on the label component, but if I try to put the styles in my .wtkx file it gets an error.  What am I missing here?  Thanks.
>>>> 
>>>> Snipped from .wtkx:
>>>> 				    <LinkButton wtkx:id="findOtherButton" styles="{font:{bold:true}, color:13}" >
>>>> 					<buttonData>
>>>> 					    <content:ButtonData text="Find other installations..." />
>>>> 					</buttonData>
>>>> 				    </LinkButton>
>>>> 
>>>> Error I'm getting:
>>>> An error occurred while processing  element <LinkButton> starting at line number 63 in file /C:/Projects/tooldev/src/prototype.wtkx:
>>>> 
>>>> java.lang.IllegalArgumentException: argument type mismatch
>>>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>>      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>>      at java.lang.reflect.Method.invoke(Unknown Source)
>>>>      at org.apache.pivot.beans.BeanDictionary.put(Unknown Source)
>>>>      at org.apache.pivot.wtk.Component$StyleDictionary.put(Unknown Source)
>>>>      at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>>>>      at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>>>> 
>>>> 
>>>> 
>>>> Thank you,
>>>> Roger Whitcomb
>>>> Architect, Engineering
>>>> Ingres Corporation
>>>> roger.whitcomb@ingres.com
>>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Dirk Möbius
>>> 
>>> SCOOP GmbH
>>> Am Kielshof 29
>>> D-51105 Köln
>>> Fon   +49 221 801916-0
>>> Fax   +49 221 801916-17
>>> Mobil +49 170 7363035
>>> www.scoop-gmbh.de
>>> Sitz der Gesellschaft: Köln
>>> Handelsregister: Köln
>>> Handelsregisternummer: HRB 36623
>>> Geschäftsführer:
>>> Dr. Oleg Balovnev
>>> Frank Heinen
>>> Dr. Wolfgang Reddig
>>> Roland Scheel
>>> 
>>> 
>> 
> 
> 
> <winmail.dat>


RE: Applying styles to LinkButton

Posted by "Roger L. Whitcomb" <Ro...@ingres.com>.
Hi Greg,
    Thank you very much.  What's the best way to get a preview of 1.5?  Should I just pull the latest source from SVN or is there a tag or any source tarballs?

Thanks,
Roger Whitcomb


-----Original Message-----
From: Greg Brown [mailto:gkbrown@mac.com]
Sent: Thu 5/6/2010 5:17 AM
To: user@pivot.apache.org
Subject: Re: Applying styles to LinkButton
 
This is now checked in.

On May 6, 2010, at 7:32 AM, Greg Brown wrote:

> Actually, 13 isn't technically wrong - we support this means for setting colors in most other skins. It means "use the color at index 13 in the Terra color palette". However, TerraLinkButtonSkin is missing the setColor() override that performs the color lookup. I will add this for Pivot 1.5.
> 
> 
> On May 6, 2010, at 2:37 AM, Dirk Möbius wrote:
> 
>> "color:13" is wrong. It must be either "color:'#FFFFFF'" or "color:'0xFFFFFFFF'"
>> 
>> Regards,
>> Dirk.
>> 
>> 
>> "Roger L. Whitcomb" <Ro...@ingres.com> wrote:
>> 
>>> Hi -
>>> 	I'm trying to apply a style (basically either font or color or both) to a LinkButton using Pivot 1.4.  I see that the LinkButtonDataRenderer (line 95) is calling "getStyles().get("font")" and then setting the font style on the label component, but if I try to put the styles in my .wtkx file it gets an error.  What am I missing here?  Thanks.
>>> 
>>> Snipped from .wtkx:
>>> 				    <LinkButton wtkx:id="findOtherButton" styles="{font:{bold:true}, color:13}" >
>>> 					<buttonData>
>>> 					    <content:ButtonData text="Find other installations..." />
>>> 					</buttonData>
>>> 				    </LinkButton>
>>> 
>>> Error I'm getting:
>>> An error occurred while processing  element <LinkButton> starting at line number 63 in file /C:/Projects/tooldev/src/prototype.wtkx:
>>> 
>>> java.lang.IllegalArgumentException: argument type mismatch
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>       at java.lang.reflect.Method.invoke(Unknown Source)
>>>       at org.apache.pivot.beans.BeanDictionary.put(Unknown Source)
>>>       at org.apache.pivot.wtk.Component$StyleDictionary.put(Unknown Source)
>>>       at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>>>       at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>>> 
>>> 
>>> 
>>> Thank you,
>>> Roger Whitcomb
>>> Architect, Engineering
>>> Ingres Corporation
>>> roger.whitcomb@ingres.com
>>> 
>> 
>> 
>> 
>> -- 
>> Dirk Möbius
>> 
>> SCOOP GmbH
>> Am Kielshof 29
>> D-51105 Köln
>> Fon   +49 221 801916-0
>> Fax   +49 221 801916-17
>> Mobil +49 170 7363035
>> www.scoop-gmbh.de
>> Sitz der Gesellschaft: Köln
>> Handelsregister: Köln
>> Handelsregisternummer: HRB 36623
>> Geschäftsführer:
>> Dr. Oleg Balovnev
>> Frank Heinen
>> Dr. Wolfgang Reddig
>> Roland Scheel
>> 
>> 
> 



Re: Applying styles to LinkButton

Posted by Greg Brown <gk...@mac.com>.
This is now checked in.

On May 6, 2010, at 7:32 AM, Greg Brown wrote:

> Actually, 13 isn't technically wrong - we support this means for setting colors in most other skins. It means "use the color at index 13 in the Terra color palette". However, TerraLinkButtonSkin is missing the setColor() override that performs the color lookup. I will add this for Pivot 1.5.
> 
> 
> On May 6, 2010, at 2:37 AM, Dirk Möbius wrote:
> 
>> "color:13" is wrong. It must be either "color:'#FFFFFF'" or "color:'0xFFFFFFFF'"
>> 
>> Regards,
>> Dirk.
>> 
>> 
>> "Roger L. Whitcomb" <Ro...@ingres.com> wrote:
>> 
>>> Hi –
>>> 	I’m trying to apply a style (basically either font or color or both) to a LinkButton using Pivot 1.4.  I see that the LinkButtonDataRenderer (line 95) is calling “getStyles().get(“font”)” and then setting the font style on the label component, but if I try to put the styles in my .wtkx file it gets an error.  What am I missing here?  Thanks.
>>> 
>>> Snipped from .wtkx:
>>> 				    <LinkButton wtkx:id="findOtherButton" styles="{font:{bold:true}, color:13}" >
>>> 					<buttonData>
>>> 					    <content:ButtonData text="Find other installations..." />
>>> 					</buttonData>
>>> 				    </LinkButton>
>>> 
>>> Error I'm getting:
>>> An error occurred while processing  element <LinkButton> starting at line number 63 in file /C:/Projects/tooldev/src/prototype.wtkx:
>>> 
>>> java.lang.IllegalArgumentException: argument type mismatch
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>       at java.lang.reflect.Method.invoke(Unknown Source)
>>>       at org.apache.pivot.beans.BeanDictionary.put(Unknown Source)
>>>       at org.apache.pivot.wtk.Component$StyleDictionary.put(Unknown Source)
>>>       at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>>>       at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>>> 
>>> 
>>> 
>>> Thank you,
>>> Roger Whitcomb
>>> Architect, Engineering
>>> Ingres Corporation
>>> roger.whitcomb@ingres.com
>>> 
>> 
>> 
>> 
>> -- 
>> Dirk Möbius
>> 
>> SCOOP GmbH
>> Am Kielshof 29
>> D-51105 Köln
>> Fon   +49 221 801916-0
>> Fax   +49 221 801916-17
>> Mobil +49 170 7363035
>> www.scoop-gmbh.de
>> Sitz der Gesellschaft: Köln
>> Handelsregister: Köln
>> Handelsregisternummer: HRB 36623
>> Geschäftsführer:
>> Dr. Oleg Balovnev
>> Frank Heinen
>> Dr. Wolfgang Reddig
>> Roland Scheel
>> 
>> 
> 


Re: Applying styles to LinkButton

Posted by Greg Brown <gk...@mac.com>.
Actually, 13 isn't technically wrong - we support this means for setting colors in most other skins. It means "use the color at index 13 in the Terra color palette". However, TerraLinkButtonSkin is missing the setColor() override that performs the color lookup. I will add this for Pivot 1.5.


On May 6, 2010, at 2:37 AM, Dirk Möbius wrote:

> "color:13" is wrong. It must be either "color:'#FFFFFF'" or "color:'0xFFFFFFFF'"
> 
> Regards,
> Dirk.
> 
> 
> "Roger L. Whitcomb" <Ro...@ingres.com> wrote:
> 
>> Hi –
>> 	I’m trying to apply a style (basically either font or color or both) to a LinkButton using Pivot 1.4.  I see that the LinkButtonDataRenderer (line 95) is calling “getStyles().get(“font”)” and then setting the font style on the label component, but if I try to put the styles in my .wtkx file it gets an error.  What am I missing here?  Thanks.
>> 
>> Snipped from .wtkx:
>> 				    <LinkButton wtkx:id="findOtherButton" styles="{font:{bold:true}, color:13}" >
>> 					<buttonData>
>> 					    <content:ButtonData text="Find other installations..." />
>> 					</buttonData>
>> 				    </LinkButton>
>> 
>> Error I'm getting:
>> An error occurred while processing  element <LinkButton> starting at line number 63 in file /C:/Projects/tooldev/src/prototype.wtkx:
>> 
>> java.lang.IllegalArgumentException: argument type mismatch
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>        at java.lang.reflect.Method.invoke(Unknown Source)
>>        at org.apache.pivot.beans.BeanDictionary.put(Unknown Source)
>>        at org.apache.pivot.wtk.Component$StyleDictionary.put(Unknown Source)
>>        at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>>        at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>> 
>> 
>> 
>> Thank you,
>> Roger Whitcomb
>> Architect, Engineering
>> Ingres Corporation
>> roger.whitcomb@ingres.com
>> 
> 
> 
> 
> -- 
> Dirk Möbius
> 
> SCOOP GmbH
> Am Kielshof 29
> D-51105 Köln
> Fon   +49 221 801916-0
> Fax   +49 221 801916-17
> Mobil +49 170 7363035
> www.scoop-gmbh.de
> Sitz der Gesellschaft: Köln
> Handelsregister: Köln
> Handelsregisternummer: HRB 36623
> Geschäftsführer:
> Dr. Oleg Balovnev
> Frank Heinen
> Dr. Wolfgang Reddig
> Roland Scheel
> 
> 


Re: Applying styles to LinkButton

Posted by Dirk Möbius <dm...@scoop-gmbh.de>.
"color:13" is wrong. It must be either "color:'#FFFFFF'" or  
"color:'0xFFFFFFFF'"

Regards,
Dirk.


"Roger L. Whitcomb" <Ro...@ingres.com> wrote:

> Hi –
> 	I’m trying to apply a style (basically either font or color or  
> both) to a LinkButton using Pivot 1.4.  I see that the  
> LinkButtonDataRenderer (line 95) is calling  
> “getStyles().get(“font”)” and then setting the font style on the  
> label component, but if I try to put the styles in my .wtkx file it  
> gets an error.  What am I missing here?  Thanks.
>
> Snipped from .wtkx:
> 				    <LinkButton wtkx:id="findOtherButton"  
> styles="{font:{bold:true}, color:13}" >
> 					<buttonData>
> 					    <content:ButtonData text="Find other installations..." />
> 					</buttonData>
> 				    </LinkButton>
>
> Error I'm getting:
> An error occurred while processing  element <LinkButton> starting at  
> line number 63 in file /C:/Projects/tooldev/src/prototype.wtkx:
>
> java.lang.IllegalArgumentException: argument type mismatch
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.pivot.beans.BeanDictionary.put(Unknown Source)
>         at org.apache.pivot.wtk.Component$StyleDictionary.put(Unknown Source)
>         at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>         at org.apache.pivot.wtk.Component.setStyles(Unknown Source)
>
>
>
> Thank you,
> Roger Whitcomb
> Architect, Engineering
> Ingres Corporation
> roger.whitcomb@ingres.com
>



-- 
Dirk Möbius

SCOOP GmbH
Am Kielshof 29
D-51105 Köln
Fon   +49 221 801916-0
Fax   +49 221 801916-17
Mobil +49 170 7363035
www.scoop-gmbh.de
Sitz der Gesellschaft: Köln
Handelsregister: Köln
Handelsregisternummer: HRB 36623
Geschäftsführer:
Dr. Oleg Balovnev
Frank Heinen
Dr. Wolfgang Reddig
Roland Scheel