Should TreeItem have a Text property?

2014-05-21 Thread Jeff Martin
I'm working with TreeView today and it seems like it would be convenient if 
TreeItem had a Text property in addition to it's Graphic property. This would 
seem to solve the most common need for a custom TreeCell factory.

Since most trees basically show a tree of labels, it would seem to make as much 
sense as the Graphic property.

It might have been sufficient if the default rendering used TreeItem.toString() 
instead of TreeItem.getValue().toString(), although this would miss the free 
updating you could get by resetting a TreeItem.Text property dynamically.

jeff

Re: Should TreeItem have a Text property?

2014-05-21 Thread Stephen F Northover

This sounds reasonable to me.  Please enter a JIRA for it.

Steve

On 2014-05-21 2:52 PM, Jeff Martin wrote:

I'm working with TreeView today and it seems like it would be convenient if 
TreeItem had a Text property in addition to it's Graphic property. This would 
seem to solve the most common need for a custom TreeCell factory.

Since most trees basically show a tree of labels, it would seem to make as much 
sense as the Graphic property.

It might have been sufficient if the default rendering used TreeItem.toString() 
instead of TreeItem.getValue().toString(), although this would miss the free 
updating you could get by resetting a TreeItem.Text property dynamically.

jeff




Re: Should TreeItem have a Text property?

2014-05-21 Thread Jeff Martin
Thanks!

Jira: TreeItem should have a Text property

jeff


On May 21, 2014, at 2:44 PM, Stephen F Northover steve.x.northo...@oracle.com 
wrote:

 This sounds reasonable to me.  Please enter a JIRA for it.
 
 Steve
 
 On 2014-05-21 2:52 PM, Jeff Martin wrote:
 I'm working with TreeView today and it seems like it would be convenient if 
 TreeItem had a Text property in addition to it's Graphic property. This 
 would seem to solve the most common need for a custom TreeCell factory.
 
 Since most trees basically show a tree of labels, it would seem to make as 
 much sense as the Graphic property.
 
 It might have been sufficient if the default rendering used 
 TreeItem.toString() instead of TreeItem.getValue().toString(), although this 
 would miss the free updating you could get by resetting a TreeItem.Text 
 property dynamically.
 
 jeff