Package org.eclipse.jface.viewers
Class ColumnViewerToolTipSupport
java.lang.Object
org.eclipse.jface.window.ToolTip
org.eclipse.jface.window.DefaultToolTip
org.eclipse.jface.viewers.ColumnViewerToolTipSupport
The ColumnViewerTooltipSupport is the class that provides tool tips for
ColumnViewers.
- Since:
- 3.3
-
Field Summary
Fields inherited from class org.eclipse.jface.window.ToolTip
NO_RECREATE, RECREATE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedColumnViewerToolTipSupport(ColumnViewer viewer, int style, boolean manualActivation) Enable ToolTip support for the viewer by creating an instance from this class. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterHideToolTip(Event event) This method is called after a tooltip is hidden.protected CompositecreateToolTipContentArea(Event event, Composite parent) Instead of overwriting this method subclasses should overwritecreateViewerToolTipContentArea(Event, ViewerCell, Composite)protected CompositecreateViewerToolTipContentArea(Event event, ViewerCell cell, Composite parent) Creates the content area of the tool tip giving access to the cell the tip is shown for.static voidenableFor(ColumnViewer viewer) Enable ToolTip support for the viewer by creating an instance from this class.static voidenableFor(ColumnViewer viewer, int style) Enable ToolTip support for the viewer by creating an instance from this class.protected ObjectgetToolTipArea(Event event) This method is called to check for which area the tooltip is created/hidden for.protected booleanshouldCreateToolTip(Event event) Should the tooltip displayed because of the given event.Methods inherited from class org.eclipse.jface.window.DefaultToolTip
getBackgroundColor, getBackgroundImage, getFont, getForegroundColor, getImage, getStyle, getText, setBackgroundColor, setBackgroundImage, setFont, setForegroundColor, setImage, setStyle, setTextMethods inherited from class org.eclipse.jface.window.ToolTip
activate, deactivate, getData, getLocation, hide, isHideOnMouseDown, isRespectDisplayBounds, isRespectMonitorBounds, setData, setHideDelay, setHideOnMouseDown, setPopupDelay, setRespectDisplayBounds, setRespectMonitorBounds, setShift, show
-
Constructor Details
-
ColumnViewerToolTipSupport
Enable ToolTip support for the viewer by creating an instance from this class. To get all necessary informations this support class consults theCellLabelProvider.- Parameters:
viewer- the viewer the support is attached tostyle- style passed to control tool tip behaviormanualActivation-trueif the activation is done manually usingToolTip.show(Point)
-
-
Method Details
-
enableFor
Enable ToolTip support for the viewer by creating an instance from this class. To get all necessary informations this support class consults theCellLabelProvider.- Parameters:
viewer- the viewer the support is attached to
-
enableFor
Enable ToolTip support for the viewer by creating an instance from this class. To get all necessary informations this support class consults theCellLabelProvider.- Parameters:
viewer- the viewer the support is attached tostyle- style passed to control tool tip behavior- See Also:
-
getToolTipArea
Description copied from class:ToolTipThis method is called to check for which area the tooltip is created/hidden for. In case ofToolTip.NO_RECREATEthis is used to decide if the tooltip is hidden recreated.By the default it is the widget the tooltip is created for but could be any object. To decide if the area changed theObject.equals(Object)method is used.- Overrides:
getToolTipAreain classToolTip- Parameters:
event- the event- Returns:
- the area responsible for the tooltip creation or
nullthis could be any object describing the area (e.g. theControlonto which the tooltip is bound to, a part of this area e.g. forColumnViewerthis could be aViewerCell)
-
createToolTipContentArea
Instead of overwriting this method subclasses should overwritecreateViewerToolTipContentArea(Event, ViewerCell, Composite)- Overrides:
createToolTipContentAreain classDefaultToolTip- Parameters:
event- the event that triggered the activation of the tooltipparent- the parent of the content area- Returns:
- the content area created
-
createViewerToolTipContentArea
Creates the content area of the tool tip giving access to the cell the tip is shown for. Subclasses can overload this method to implement their own tool tip design.This method is called from
createToolTipContentArea(Event, Composite)and by default calls theDefaultToolTip.createToolTipContentArea(Event, Composite).- Parameters:
event- the event that whichcell- the cell the tool tip is shown forparent- the parent of the control to create- Returns:
- the control to be displayed in the tool tip area
- Since:
- 3.4
-
shouldCreateToolTip
Description copied from class:ToolTipShould the tooltip displayed because of the given event.Subclasses may overwrite this to get custom behavior
- Overrides:
shouldCreateToolTipin classToolTip- Parameters:
event- the event- Returns:
trueif tooltip should be displayed
-
afterHideToolTip
Description copied from class:ToolTipThis method is called after a tooltip is hidden.Subclasses may override to clean up requested system resources
- Overrides:
afterHideToolTipin classToolTip- Parameters:
event- event triggered the hiding action (may benullif event wasn't triggered by user actions directly)
-