pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: TreeView: triangular node markers...always present even though my TreeBranch returns 0 for getLength()
Date Wed, 09 Jun 2010 14:13:33 GMT
Skin properties are set via styles. So. in WTKX, you would do:

<TreeView styles="{showEmptyBranchControls:false}"/>

or:

<TreeView>
  <styles showEmptyBranchControls="false"/>
</TreeView>

In Java, you would do this:

treeView.getStyles().put("showEmptyBranchControls", false);

This is guaranteed to work on any skin that supports the "showEmptyBranchControls" style.
It will fail gracefully for skins that do not. This way, you don't need to cast the skin to
a specific type - in fact, the getSkin() method in Component is protected specifically to
prevent callers from doing so.


On Jun 9, 2010, at 9:41 AM, aappddeevv wrote:

> Using TreeView. I poked around the code but did not quite see how it all works together.
>  
>  
>  
> a)      How do I get hold of the skin (the terra) skin to call
> setShowEmptyBranchControls(false)? Can I do this without casting so I always know that
empty branch controls property is available regardless of skin?
>  
>  


Mime
View raw message