|
|
|
Re: How to add a separator between two tree items [message #741722 is a reply to message #741412] |
Wed, 19 October 2011 20:48 |
svic4ever Messages: 7 Registered: October 2011 |
Junior Member |
|
|
Grant Gayed wrote on Wed, 19 October 2011 09:58Perhaps you could custom draw a separator line across the top of your
second root-level item. For info on using custom draw in Tables and
Trees see
..
HTH,
Grant
On 10/18/2011 1:15 PM, svic4ever wrote:
> I have a Jface TreeViewer which contains two roots. I need to add a
> separator between the trees originated from these roots. A naive way is
> to implement a dummy treeitem as a separator but I'm looking for a
> better solution!
Thank you for your advice. I use one of the snippets in the link to solve my other problem About the separator problem, I settle with the naive method above.
Quote:Hm, usually trees don't contain separators. Hence there is no direct way to do it. I'd try to avoid it or use your suggested naive way.
I wish I wouldn't have to use separator but using separator seems to be the easiest way to solve my problem.
Moreover, I don't know if I understand the Viewer framework exactly. This is an image I think that describes the framework :http: //i.imgur.com/wx1je.png. In my understanding, when we setInput on an object for a Tree, this object is feeded to the ContentProvider. The elements come out from the ContentProvider will be filtered by various filters. After that, the remaining elements will be sorted. Finally, the tree widget will take these elements and display them. Is it correct ?
|
|
|
|
Re: How to add a separator between two tree items [message #742190 is a reply to message #742184] |
Thu, 20 October 2011 09:08 |
Vijay Raj Messages: 608 Registered: July 2009 |
Senior Member |
|
|
why not incorporate the empty element in the model itself and write code in lableprovider and sorter for showing seperater element and keeping the seperater in the middle.
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
|
|
|
Powered by
FUDForum. Page generated in 0.03060 seconds