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.
Asked
Active
Viewed 2,881 times
1 Answers
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
forSWT.MouseHover
to the underlying table - If you use a
CellLabelProvider
, have a look at the variousgetToolTip...(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
-
2Have a look at http://wiki.eclipse.org/index.php/JFaceSnippets - here you can find plenty of examples. – Tonny Madsen Nov 01 '11 at 11:57