Search code examples
eclipseeclipse-rcpjfaceeclipse-pde

jface tableviewer cell-span


I am endeavouring to render some hierarchic data in a TableViewer (the TreeViewer isn't a good fit - trust me on this :-). Consequently I need to render the parent cells with a row-span > 1.

As far as I can tell, this currently isn't possible with the regular JFace TableViewer, or the SWT Table underneath.

Can anyone tell me I'm wrong?

M.


Solution

  • Correct.

    You could use a TreeViewer displayed in a "table mode", like illustrated by this class.

    alt text
    (source: sowas.com)

    However, since a TreeViewer is not an option for you, you could take some idea from the code of TableTree, even though it has been deprecated in eclipse3.3.

    alt text
    (source: java2s.com)

    TableTreeViewer and TableTree are both based on a Table.