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?
>  
>  

Reply via email to