문제

I think this question is quite common.

Recently I have got a requirement that I need to make a leveled or expandable table-like view. If you need an example, you can refer to Mac OS X's Activity Monitor: Leveled rows in a table view

At the same time I tried an example here which meets my requirement quite a little: SWT one http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/SWTTreeWithMulticolumns.htm

But it has some problems: 1. It's using SWT's Tree class not JFace classes; 2. I think it needs a repeat implementation of some JFace viewer classes's functions such as sorting by clicking a column header, filter and so on.

While I was feeling desperate, I found that Eclipse itself has a perfect view, its "Problems" view: Problems view in Eclipse

So I think there must be a way to do it elegantly, for example extend JFace's TableViewer or TreeViewer class.

But I need help, since I've searched a lot in Google with no good result. :-(

도움이 되었습니까?

해결책

That's simply a TreeViewer. Note that you can add TreeViewerColumns to it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top