users@woodstock.java.net

Re: Dynamic Background

From: Ratnadeep Bhattacharjee <Ratnadeep.Bhattacharjee_at_Sun.COM>
Date: Fri, 07 Sep 2007 10:12:56 -0400

Lark Fitzgerald wrote:
> Woodstock-ers,
>
> Is there a non-theme related solution to this issue of changing the Tree
> background color?

All woodstock components have "style" and "styleClass" JSF attributes
that can be applied to the node or the facets within each node (if a
facet is being used). Did you try using these?

Thanks,
-Deep.


> If not, is there a pointer to changing or creating
> themes?
>
> lark
>
>
>
> Master Eyeball wrote:
>> Hi Lark,
>>
>> I did that already. TreeNode uses a green color by default and does respond
>> to the folderNode.setStyle("background-color: transparent"); command. Tree
>> uses light blue by default and does not respond to the
>> folderNode.setStyle("background-color: transparent"); command.
>>
>> Any other ideas?
>>
>> Dave
>>
>>
>>
>> larkula wrote:
>>
>>> I'm not 100%, but I believe that they are all failing. If I am not
>>> mistaken, then the TreeNode uses background-color: transparent by
>>> default, where as Tree uses the light blue. To verify this you can try
>>> changing the TreeNode to something other than transparent.
>>>
>>> lark
>>>
>>>
>>> Master Eyeball wrote:
>>>
>>>> I'm having difficulty controlling the background of dynamically generated
>>>> text for a Tree object.
>>>>
>>>> Here's my code:
>>>>
>>>> This code doesn't work for a Tree object.
>>>>
>>>> private Tree displayTree = new Tree();
>>>> displayTree.setText("Reports Home"); // works
>>>> displayTree.setStyle("background-color: transparent"); // doesn't work
>>>>
>>>> The background behind the "Reports Home" text display as light blue.
>>>>
>>>>
>>>> The same logic works for a TreeNode object.
>>>>
>>>> TreeNode folderNode = new TreeNode();
>>>> folderNode.setText("Weekly Reports"); // works
>>>> folderNode.setStyle("background-color: transparent"); // works
>>>>
>>>> The background behind the "Weekly Reports" text is transparent. This
>>>> works
>>>> for n number of dynamically created TreeNodes.
>>>>
>>>>
>>>> Any help would be greatly appreciated.
>>>>
>>>> NetBeans 5.5.1
>>>> VWP 5.5.1
>>>> XP Pro
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_visualweb.netbeans.org
>>> For additional commands, e-mail: users-help_at_visualweb.netbeans.org
>>>
>>>
>>>
>>>
>>
>>
>