Class DefaultToolTip
java.lang.Object
org.eclipse.jface.window.ToolTip
org.eclipse.jface.window.DefaultToolTip
- Direct Known Subclasses:
ColumnViewerToolTipSupport
Default implementation of ToolTip that provides an iconofied label with font
and color controls by subclass.
- Since:
- 3.3
-
Field Summary
Fields inherited from class ToolTip
NO_RECREATE, RECREATE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultToolTip(Control control) Create new instance which add TooltipSupport to the widgetDefaultToolTip(Control control, int style, boolean manualActivation) Create new instance which add TooltipSupport to the widget -
Method Summary
Modifier and TypeMethodDescriptionprotected CompositecreateToolTipContentArea(Event event, Composite parent) Creates the content are of the the tooltip.protected ColorgetBackgroundColor(Event event) protected ImagegetBackgroundImage(Event event) protected Fontprotected ColorgetForegroundColor(Event event) protected Imageprotected intThe style used to create theCLabelin the default implementationprotected StringThe text displayed in theCLabelin the default implementationvoidsetBackgroundColor(Color backgroundColor) voidsetBackgroundImage(Image backgroundImage) voidvoidsetForegroundColor(Color foregroundColor) voidvoidsetStyle(int style) The style used to create theCLabelin the default implementationvoidThe text displayed in theCLabelin the default implementationMethods inherited from class ToolTip
activate, afterHideToolTip, deactivate, getData, getLocation, getToolTipArea, hide, isHideOnMouseDown, isRespectDisplayBounds, isRespectMonitorBounds, setData, setHideDelay, setHideOnMouseDown, setPopupDelay, setRespectDisplayBounds, setRespectMonitorBounds, setShift, shouldCreateToolTip, show
-
Constructor Details
-
DefaultToolTip
Create new instance which add TooltipSupport to the widget- Parameters:
control- the control on whose action the tooltip is shown
-
DefaultToolTip
Create new instance which add TooltipSupport to the widget- Parameters:
control- the control to which the tooltip is boundstyle- style passed to control tooltip behaviourmanualActivation-trueif the activation is done manually usingToolTip.show(Point)- See Also:
-
-
Method Details
-
createToolTipContentArea
Creates the content are of the the tooltip. By default this creates a CLabel to display text. To customize the text Subclasses may override the following methods- Specified by:
createToolTipContentAreain classToolTip- Parameters:
event- the event that triggered the activation of the tooltipparent- the parent of the content area- Returns:
- the content area created
-
getStyle
-
getImage
-
getForegroundColor
-
getBackgroundColor
-
getBackgroundImage
-
getFont
-
getText
-
setBackgroundColor
- Parameters:
backgroundColor- theColorornullif default background color (SWT.COLOR_INFO_BACKGROUND) should be used
-
setBackgroundImage
-
setFont
-
setForegroundColor
-
setImage
-
setStyle
public void setStyle(int style) The style used to create theCLabelin the default implementation- Parameters:
style- the event triggered the popup of the tooltip
-
setText
-