public class NatTableContentTooltip
extends org.eclipse.jface.window.DefaultToolTip
ToolTip implementation for the NatTable which will show the display
value of the cell of which the tooltip is requested.
It is possible to configure for which regions the tooltips should be activated.
If none are configured, the tooltips are active for every region of the NatTable.
| Modifier and Type | Field and Description |
|---|---|
protected NatTable |
natTable
The
NatTable instance for which this ToolTip is used. |
protected String[] |
tooltipRegions
The regions of the
NatTable for which this ToolTip is
active. |
| Constructor and Description |
|---|
NatTableContentTooltip(NatTable natTable,
String... tooltipRegions)
Creates a new
ToolTip object, attaches it to the given NatTable
instance and configures and activates it. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getText(org.eclipse.swt.widgets.Event event) |
protected Object |
getToolTipArea(org.eclipse.swt.widgets.Event event) |
protected boolean |
isVisibleContentPainter(ICellPainter painter)
Checks if the given
ICellPainter is showing the content directly or if it is
anonymized by using the PasswordTextPainter |
protected boolean |
shouldCreateToolTip(org.eclipse.swt.widgets.Event event) |
createToolTipContentArea, getBackgroundColor, getBackgroundImage, getFont, getForegroundColor, getImage, getStyle, setBackgroundColor, setBackgroundImage, setFont, setForegroundColor, setImage, setStyle, setTextactivate, afterHideToolTip, deactivate, getData, getLocation, hide, isHideOnMouseDown, isRespectDisplayBounds, isRespectMonitorBounds, setData, setHideDelay, setHideOnMouseDown, setPopupDelay, setRespectDisplayBounds, setRespectMonitorBounds, setShift, showprotected Object getToolTipArea(org.eclipse.swt.widgets.Event event)
Implementation here means the tooltip is not redrawn unless mouse hover moves outside of the current cell (the combination of ToolTip.NO_RECREATE style and override of this method).
getToolTipArea in class org.eclipse.jface.window.ToolTipprotected String getText(org.eclipse.swt.widgets.Event event)
Evaluates the cell for which the tooltip should be rendered and checks the
display value. If the display value is empty null will be returned
which will result in not showing a tooltip.
getText in class org.eclipse.jface.window.DefaultToolTipprotected boolean isVisibleContentPainter(ICellPainter painter)
ICellPainter is showing the content directly or if it is
anonymized by using the PasswordTextPainterpainter - The ICellPainter to check.true if the painter is not a PasswordTextPainterprotected boolean shouldCreateToolTip(org.eclipse.swt.widgets.Event event)
Will only display a tooltip if the value of the cell for which the tooltip should be rendered is not empty.
If there are regions configured for which the tooltip should be visible, it is also checked if the the region for which the tooltip should be rendered is in one of the configured tooltip regions.
shouldCreateToolTip in class org.eclipse.jface.window.ToolTipCopyright © 2013. All Rights Reserved.