| Summary: | [TableViewer] Implement cell tooltips in TableViewer. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ivan Furnadjiev <ivan> | ||||||
| Component: | JFace | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | b.muskalla, elias | ||||||
| Version: | 1.2 | ||||||||
| Target Milestone: | 1.3 M1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Ivan Furnadjiev
Created attachment 139258 [details]
TableViewer cell tooltips implementation.
To enable the tooltips:
1. Use viewer.getTable().setData( Table.ENABLE_CELL_TOOLTIP, Boolean.TRUE ); when viewer is created. If this is not set on the table, the cell tooltips are disabled.
2. Use TableViewer#setLabelProvider() or TableViewerColumn#setLabelProvider() with CellLabelProvider.
3. The cell tooltip text is taken from CellLabelProvider#getToolTipText()
Created attachment 139259 [details]
Controls Demo - TableViewer Tab with cell tooltips.
Committed in CVS HEAD. Small thing I noticed: TableLCA#writeCellToolTipText does not escape the tooltip text (WidgetLCAUtil#escapeText). Furthermore we should use the WidgetLCAUtil#replaceNewLines for replacing the new lines. Thanks Benny, for noticing this. It is fixed in CVS. |