You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by lello <rb...@gmail.com> on 2010/11/05 09:36:53 UTC

Re: TreeTable

I am back on this topic again.
I really need a treeTable. I was trying to understand how to create my own
treeTable but 
probably my knowledge of pivot rendering is not enough.
Could Anyone tell me where to start from?
Do I just need to implement a TreeTableCellRenderer, or do I also need to
extend the TableView class? 
Any suggestion?

Thanks,
Lello
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TreeTable-tp1723341p1847011.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TreeTable

Posted by Greg Brown <gk...@mac.com>.
> The tree table cell renderer would be declared as
> 
> public class TreeTableCellRenderer extends TreeView implements
> TableView.CellRenderer
> 
> but then how do I use it in a TableView?

You set it as the cell renderer for the column. See TableView.Column#setCellRenderer().

> why should I use "flat List implementation backed by a nested list and a
> TreeView instance"?

Because a TableView uses an instance of List as a model. This is analogous to the TableModel implementation in the Swing example.


Re: TreeTable

Posted by lello <rb...@gmail.com>.
Indeed, this is the technique that I as trying to follow:

The tree table cell renderer would be declared as

public class TreeTableCellRenderer extends TreeView implements
TableView.CellRenderer

but then how do I use it in a TableView?

why should I use "flat List implementation backed by a nested list and a
TreeView instance"?

I am quite confused.
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TreeTable-tp1723341p1848892.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TreeTable

Posted by Greg Brown <gk...@mac.com>.
You may be able to use a technique similar to that described in this article:

  http://java.sun.com/products/jfc/tsc/articles/treetable1/

The Pivot version would use a TreeView as a table view cell renderer, and you'd create a custom flat List implementation backed by a nested list and a TreeView instance.

Let us know how it goes!


On Nov 5, 2010, at 4:36 AM, lello wrote:

> 
> I am back on this topic again.
> I really need a treeTable. I was trying to understand how to create my own
> treeTable but 
> probably my knowledge of pivot rendering is not enough.
> Could Anyone tell me where to start from?
> Do I just need to implement a TreeTableCellRenderer, or do I also need to
> extend the TableView class? 
> Any suggestion?
> 
> Thanks,
> Lello
> -- 
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TreeTable-tp1723341p1847011.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.