[ 
https://issues.apache.org/jira/browse/PIVOT-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130458#comment-13130458
 ] 

Noel Grandin commented on PIVOT-804:
------------------------------------

Comment from Chris Bartlett:

It is due to the different setters in the TabPane's skin.
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.html

The 'buttonPadding' style only has explicit setters for Insets and int
void setButtonPadding(Insets)
void setButtonPadding(int)

But 'padding' has setters for these.
void setPadding(Dictionary<String,?> padding)
void setPadding(Insets padding)
void setPadding(int padding)
void setPadding(Number padding)
void setPadding(String padding)
                
> Why can't I set a TabPane's buttonPadding to a dictionary?
> ----------------------------------------------------------
>
>                 Key: PIVOT-804
>                 URL: https://issues.apache.org/jira/browse/PIVOT-804
>             Project: Pivot
>          Issue Type: Bug
>            Reporter: Bill van Melle
>            Priority: Minor
>
> I must be missing something really obvious here.  TablePane happily
> accepts a padding value expressed as a dictionary.  So does Label.
> But when the bxml serializer gets down to the TabPane below where I
> try to set its buttonPadding to the same dictionary, it barfs, saying
> "Unable to coerce org.apache.pivot.collections.HashMap to class
> org.apache.pivot.wtk.Insets".  Aren't the padding values also of type
> Insets?  What am I doing wrong?
> <Window xmlns="org.apache.pivot.wtk">
>   <TablePane styles="{padding:{left:10,right:10,top:5,bottom:5}}">
>     <columns>
>       <TablePane.Column width="1*" />
>     </columns>
>     <TablePane.Row>
>       <Label text="Some text"
> styles="{padding:{left:10,right:10,top:5,bottom:5}}" />
>     </TablePane.Row>
>     <TablePane.Row>
>       <TabPane styles="{buttonPadding:{left:10,right:10,top:5,bottom:5}}" >
>         <BoxPane TabPane.tabData="Test" />
>       </TabPane>
>     </TablePane.Row>
>   </TablePane>
> </Window>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to