Widgets in JFace TableViewer?

I am developing an application using JFace on Eclipse 3.6, and I would like to have the actual widgets - basically checkboxes and buttons - in TableViewer. Everything I found seems to suggest that this is not possible at the moment.

My current workaround involves having a MouseListener for the wrapped table control, where the coordinates of the mouseDown event are translated into cells using the getCell () method and acted. Then I use the content provider to deliver images and formatted text, which are somewhat closer to the appearance of the corresponding widgets.

The problem is that the result is not native. There are some workarounds associated with using screenshots of real widgets, but this has several problems:

  • It's a hack
  • Captured widgets automatically become visible, creating a flickering artifact on the screen
  • To process images with table colors, image processing tricks are required.
  • It does not scale well when, for example, buttons with different contents are required

Is there a way to embed widgets in TableViewer cells without using such cumbersome methods? You can, of course, do this at the heart of this SWT table, but the TableViewer interface does not seem to support this ...

+3
source share

All Articles