Package org.eclipse.jface.window
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 SummaryFields inherited from class org.eclipse.jface.window.ToolTipNO_RECREATE, RECREATE
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultToolTip(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 SummaryModifier 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 org.eclipse.jface.window.ToolTipactivate, afterHideToolTip, deactivate, getData, getLocation, getToolTipArea, hide, isHideOnMouseDown, isRespectDisplayBounds, isRespectMonitorBounds, setData, setHideDelay, setHideOnMouseDown, setPopupDelay, setRespectDisplayBounds, setRespectMonitorBounds, setShift, shouldCreateToolTip, show
- 
Constructor Details- 
DefaultToolTipCreate new instance which add TooltipSupport to the widget- Parameters:
- control- the control on whose action the tooltip is shown
 
- 
DefaultToolTipCreate new instance which add TooltipSupport to the widget- Parameters:
- control- the control to which the tooltip is bound
- style- style passed to control tooltip behaviour
- manualActivation-- trueif the activation is done manually using- ToolTip.show(Point)
- See Also:
 
 
- 
- 
Method Details- 
createToolTipContentAreaCreates 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 class- ToolTip
- Parameters:
- event- the event that triggered the activation of the tooltip
- parent- the parent of the content area
- Returns:
- the content area created
 
- 
getStyleThe style used to create theCLabelin the default implementation- Parameters:
- event- the event triggered the popup of the tooltip
- Returns:
- the style
 
- 
getImage- Parameters:
- event- the event triggered the popup of the tooltip
- Returns:
- the Imageornullif no image should be displayed
 
- 
getForegroundColor- Parameters:
- event- the event triggered the popup of the tooltip
- Returns:
- the Colorornullif default foreground color should be used
 
- 
getBackgroundColor- Parameters:
- event- the event triggered the popup of the tooltip
- Returns:
- the Colorornullif default background color should be used
 
- 
getBackgroundImage- Parameters:
- event- the event triggered the popup of the tooltip
- Returns:
- the Imageornullif no image should be displayed in the background
 
- 
getFont- Parameters:
- event- the event triggered the popup of the tooltip
- Returns:
- the Fontornullif the default font should be used
 
- 
getTextThe text displayed in theCLabelin the default implementation- Parameters:
- event- the event triggered the popup of the tooltip
- Returns:
- the text or nullif no text has to be displayed
 
- 
setBackgroundColor- Parameters:
- backgroundColor- the- Coloror- nullif default background color (- SWT.COLOR_INFO_BACKGROUND) should be used
 
- 
setBackgroundImage- Parameters:
- backgroundImage- the- Imageor- nullif no image should be displayed in the background
 
- 
setFont- Parameters:
- font- the- Fontor- nullif the default font should be used
 
- 
setForegroundColor- Parameters:
- foregroundColor- the- Coloror- nullif default foreground color should be used
 
- 
setImage- Parameters:
- image- the- Imageor- nullif no image should be displayed
 
- 
setStylepublic void setStyle(int style) The style used to create theCLabelin the default implementation- Parameters:
- style- the event triggered the popup of the tooltip
 
- 
setTextThe text displayed in theCLabelin the default implementation- Parameters:
- text- the text or- nullif no text has to be displayed
 
 
-