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 18:15:17 GMT
Re: a) Are you asking if styles are inherited? If so, the answer is no. Styles are simply the
bean properties of the skin, nothing more. There is no concept of inheritance.

You can, however, define an external style file you can apply to all of your TreeViews:

<CustomTreeView styles="@my_tree_styles.json"/>

Re: b) No, setting a nonexistent style always produces a warning, not an exception. We felt
that it made more sense to fail gracefully in this case, so the application continues to run
(even if it doesn't look perfect).

On Jun 9, 2010, at 1:41 PM, aappddeevv wrote:

> It all works good on that tree view.
> a) Can I add this to my Frame and *any* treeview (whether in the same WTKX
> or not) will inherit this setting? I need this set on all tree views that I
> may create in my application. I tried this a little but could not get it to
> work like I thought it should. I have several tree views each a different
> subclass and in different WTKX files and just wanted to specify the setting
> once. I did not see this in the tutorial and I tried it on my frame but it
> did not work.
> b) Can I force the system to throw an exception instead of a warning if a
> style property is specified and not used. Not a big issue for me, but just
> curious.
> -----Original Message-----
> From: Dirk Möbius [mailto:dmoebius@scoop-gmbh.de] 
> Sent: Wednesday, June 09, 2010 10:19 AM
> To: user@pivot.apache.org
> Subject: Re: TreeView: triangular node markers...always present even though
> my TreeBranch returns 0 for getLength()
> aappddeevv <aappddeevv@verizon.net> 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?
> In Java code, use:
>   treeView.getStyles().put("showEmptyBranchControls", false);
> In a WTKX xml file, use:
>   <TreeView styles="{showEmptyBranchControls: false}" .../>
> No downcast to Terra skin necessary.
> If another skin is used that doesn't support the  
> showEmptyBranchControls property, a warning is printed to stdout, but  
> it goes on nevertheless.
> Dirk.

View raw message