This is how it looked in FX 2.2:
I figured something had changed in TreeCell so I had a look at the docs and Oracle tutorials (A BIG thank you for those :-) but actually didn't see anything new. So I decided to mimic one of their examples and see what I'd get. In the end it turns out that I wasn't correctly handling empty tree cells. (It maybe that FX 2.2 did this for me, but FX 8.0 sure wasn't.) So this is very important for TreeCell as well as TableCell where I had a similar problem:
public void updateItem( Object item, boolean empty )
{
super.updateItem( item, empty );
if ( empty )
{
setGraphic( null );
setText( null );
}
else
{
setGraphic( itemGraphic );
setText( itemText );
}
}
The result after fixing things up:
Next up, where's my carrot ? Sorry I meant caret .... see part 5.
No comments:
Post a Comment