Class NatTableContentTooltip
java.lang.Object
org.eclipse.jface.window.ToolTip
org.eclipse.jface.window.DefaultToolTip
org.eclipse.nebula.widgets.nattable.tooltip.NatTableContentTooltip
- Direct Known Subclasses:
FormulaTooltipErrorReporter
public class NatTableContentTooltip
extends org.eclipse.jface.window.DefaultToolTip
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected NatTableTheNatTableinstance for which thisToolTipis used.protected String[]The regions of theNatTablefor which thisToolTipis active.Fields inherited from class org.eclipse.jface.window.ToolTip
NO_RECREATE, RECREATE -
Constructor Summary
ConstructorsConstructorDescriptionNatTableContentTooltip(NatTable natTable, int style, boolean manualActivation, String... tooltipRegions) Creates a newToolTipobject, attached to the givenNatTableinstance.NatTableContentTooltip(NatTable natTable, String... tooltipRegions) Creates a newToolTipobject, attaches it to the givenNatTableinstance and configures and activates it. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetText(org.eclipse.swt.widgets.Event event) protected ObjectgetToolTipArea(org.eclipse.swt.widgets.Event event) protected booleanisVisibleContentPainter(ICellPainter painter) Checks if the givenICellPainteris showing the content directly or if it is anonymized by using thePasswordTextPainterprotected booleanshouldCreateToolTip(org.eclipse.swt.widgets.Event event) Methods inherited from class org.eclipse.jface.window.DefaultToolTip
createToolTipContentArea, getBackgroundColor, getBackgroundImage, getFont, getForegroundColor, getImage, getStyle, setBackgroundColor, setBackgroundImage, setFont, setForegroundColor, setImage, setStyle, setTextMethods inherited from class org.eclipse.jface.window.ToolTip
activate, afterHideToolTip, deactivate, getData, getLocation, hide, isHideOnMouseDown, isRespectDisplayBounds, isRespectMonitorBounds, setData, setHideDelay, setHideOnMouseDown, setPopupDelay, setRespectDisplayBounds, setRespectMonitorBounds, setShift, show
-
Field Details
-
Constructor Details
-
NatTableContentTooltip
Creates a newToolTipobject, attaches it to the givenNatTableinstance and configures and activates it. UsesToolTip.NO_RECREATEas style option and manualActivation == false. -
NatTableContentTooltip
public NatTableContentTooltip(NatTable natTable, int style, boolean manualActivation, String... tooltipRegions) Creates a newToolTipobject, attached to the givenNatTableinstance.- Parameters:
natTable- TheNatTableinstance for which thisToolTipis used.style- The style passed to control tooltip behaviour.manualActivation-trueif the activation is done manually usingToolTip.show(Point).tooltipRegions- The regions of theNatTablefor which thisToolTipis active. If none are given, the tooltip will be active for all regions.- Since:
- 1.6
- See Also:
-
ToolTip.RECREATEToolTip.NO_RECREATE
-
-
Method Details
-
getToolTipArea
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).
- Overrides:
getToolTipAreain classorg.eclipse.jface.window.ToolTip
-
getText
Evaluates the cell for which the tooltip should be rendered and checks the display value. If the display value is empty
nullwill be returned which will result in not showing a tooltip.- Overrides:
getTextin classorg.eclipse.jface.window.DefaultToolTip
-
isVisibleContentPainter
Checks if the givenICellPainteris showing the content directly or if it is anonymized by using thePasswordTextPainter- Parameters:
painter- TheICellPainterto check.- Returns:
trueif the painter is not aPasswordTextPainter
-
shouldCreateToolTip
protected 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.
- Overrides:
shouldCreateToolTipin classorg.eclipse.jface.window.ToolTip
-