1

i have a JFace table-viewer, which consists of large number of rows, i thought that it would be better if there is a short description for each row,as a workaround i was trying to implement doubleclick listner but that's not apt to my need,i don't know if there is an event like hover for this,which shows a tooltip containing a brief info about the particular row.

srk
  • 4,857
  • 12
  • 65
  • 109

1 Answers1

5

The answer to this question depends somewhat on the exact implementation of your table viewer. Having said that, the primary options are:

  • Add a MouseTrackListener to the underlying table
  • Add a SWT Listener for SWT.MouseHover to the underlying table
  • If you use a CellLabelProvider, have a look at the various getToolTip...(Object) methods

For the first two, you have to figure out the row element yourself - look at event.item.getData(), whereas that is provide to you in the last option...

Tonny Madsen
  • 12,628
  • 4
  • 31
  • 70