PDA

View Full Version : [FIXED] Tree should provide an equivalent to setCellRenderer



negge
30 Jun 2008, 5:57 AM
Right now the only way to customize a tree is by using setStyleProvider(). Because tree's are nested and the style is applied to a div that contains a table, it is difficult to use this to change fonts, colors, etc. to indicate state on a particular TreeItem.

A better way to achieve this is to use something like a CellRenderer which will provide the element styled markup for the TreeItem.

Please add something like this to Tree.

Nathan

negge
30 Jun 2008, 6:22 AM
Perhaps I spoke too soon. It looks like you can achieve the desired functionality by using setStringProvider() and returning a styled html attribute.

Nathan

darrellmeyer
30 Jun 2008, 6:26 AM
TreeBinder was using item.addStyleName which has been changed to item.setTextStyle. Change is in SVN.