There have been multiple ideas tossed around, so let's separate them:

1) Adding support for a "alternateNodeColor" style to TerraTreeViewSkin is
probably a good idea, as it will be necessary to support a TreeTable
component.  That would be a style that you'd set on your tree view that
would cause the background color of each node to alternate, just like it
does in TerraTableViewSkin.

2) Creating more complex logic as to how to paint each node based on
heuristics that you define could be done in a custom renderer.  The renderer
would be set on the tree view using setNodeRenderer() and would be
responsible for laying out and painting the contents of each node.  In
absence of the "alternateNodeColor" style on the skin, you could get the
alternating node colors to *sort of* work using this custom renderer
approach -- the renderer is only responsible for the content area of each
node, not the checkbox area of expand/collapse control area.

-T

On Mon, Sep 21, 2009 at 9:17 AM, Greg Brown <[email protected]> wrote:

> so if i have understood all, the right way for my new component is:
>> set the (new or not) style as usual,
>>
>
> Again, it isn't a style - it is a property of TreeView. You set it via
> setNodeRenderer().
>
>  write the logic in the related renderer (fixed for the component), and
>> inside it choose what / how to do the paint ... ok.
>>
>
> What do you mean by "fixed for the component"?
>
>

Reply via email to