My Two Cents

April 3, 2009

Comparison of table implementations for Eclipse SWT – KTable, Eclipse Nebula CompositeTable, and SWT Table

Filed under: Eclipse — zuma @ 3:58 pm

The stock table implementation in SWT Table is good enough for the common case; but once your requirements grows complex – such as the need to resize rows – it falls short. There are a couple of alternate table implementations worth considering - KTable and Eclipse Nebula CompositeTable.

KTable

The main advantage of KTable is that it is custom drawn. In some sense, this is a disadvantage too, since it does not use native SWT drawing techniques. But if you are looking for more control over the table’s functionality, then KTable might suit your needs. In my case, I needed control over the height of rows, more specifically, adjust the height of rows depending on its content. SWT Table had a Windows-specific issue that prevented individual rows from having different height. Also, once the height of a row is increased in an SWT Table, it can never be decreased. KTable helps overcome all these drawbacks. The latest version of KTable is 2.1.3 released in 2006, but it seems like bugs are still being fixed in CVS and the project is still active.

Eclipse Nebula CompositeTable

Nebula is a relatively new entry, but it is an Eclipse subproject, which gives it better visibility, and hopefully, stability. As of this writing, they are clearing out some legal issues; hence the binaries are not available for download, but you can still access the plugins and source code from CVS. Nebula’s CompositeTable is a custom SWT control which provides the flexibility to add any SWT control inside a cell. It also provides support for JFace Databinding to bind UI with model. The project is still in BETA. There is some discussion on absorbing this into mainstream SWT but it seems unlikely since Nebula does not follow the SWT principals of native drawing.

I have personally selected KTable for my requirements since it provides row resizing options that SWT Table or CompositeTable do not provide. But the jury is out there.

1 Comment »

  1. Thanks for the info. Have you considered the Nebula Grid?

    Comment by Tim Metivier — July 21, 2009 @ 7:45 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress