Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » TreeViewer with Columns
TreeViewer with Columns [message #540048] Mon, 14 June 2010 16:57 Go to next message
budili Missing name is currently offline budili Missing nameFriend
Messages: 64
Registered: May 2010
Member
Hello,

i need a special treeviewer with columns, like the picture below Razz

Col 1 | Col 2 | Col 3
__________________________
-item1 | |
| -item1.1 |
| | +item1.1.1
| | +item1.1.2
| +item1.2 |
| +item1.3 |
| +item1.4 |


is this in jface possible? i want that the childs of an item, are placed on the next column.
Re: TreeViewer with Columns [message #540055 is a reply to message #540048] Mon, 14 June 2010 17:19 Go to previous messageGo to next message
budili Missing name is currently offline budili Missing nameFriend
Messages: 64
Registered: May 2010
Member
Hello,

i need a special treeviewer with columns.

Col 1 | Col 2 | Col 3
__________________________
-item1 | |
| -item1.1 |
| | +item1.1.1
| | +item1.1.2
| +item1.2 |
| +item1.3 |
| +item1.4 |

is this in jface possible? i want that the childs of an item, are placed on the next column.


P.S.
Sorry, but the formatter has scramble my Text.
It is here possible to upload a picture?
Re: TreeViewer with Columns [message #540140 is a reply to message #540055] Tue, 15 June 2010 07:10 Go to previous messageGo to next message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
Quote:
Hello,

i need a special treeviewer with columns.

Col 1 | Col 2 | Col 3
__________________________
-item1 | |
| -item1.1 |
| | +item1.1.1
| | +item1.1.2
| +item1.2 |
| +item1.3 |
| +item1.4 |

is this in jface possible? i want that the childs of an item, are placed on the next column.



For this to be possible you would need infinite columns...

cuz item1.1.1 children will be required to be shifted one more column,which doesnt exist,
and there children will require one more column...

Whats your requirement exacly???


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: TreeViewer with Columns [message #540445 is a reply to message #540055] Wed, 16 June 2010 08:04 Go to previous messageGo to next message
Mohamed Hussein is currently offline Mohamed HusseinFriend
Messages: 71
Registered: July 2009
Member
If I understand correctly, you want to create a tree with columns, were the first column is the tree and the following columns are for attributes of nodes in the tree.

If this is the case, you can achieve this via TreeColumn class
TreeColumn column = new TreeColumn(view.getTree(), SWT.CENTER);

Note, Your label provider needs to implement ITableLabelProvider

Hope this helps


Best Regards,
Mohamed.
Re: TreeViewer with Columns [message #541933 is a reply to message #540048] Wed, 23 June 2010 09:25 Go to previous message
budili Missing name is currently offline budili Missing nameFriend
Messages: 64
Registered: May 2010
Member

I have found a solution for the problem btw. i found
a code snippet therefor:

- Snippet026AnonymousBeanProperties

Thats exactly my problem, but with this snippet i have solved it.

Previous Topic:string filter for TreeViewer
Next Topic:Getting TableViewerColumns from TableViewer reference?
Goto Forum:
  


Current Time: Wed Nov 26 15:25:55 GMT 2014

Powered by FUDForum. Page generated in 0.02896 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software