public class ColumnViewerToolTipSupport extends DefaultToolTip
NO_RECREATE, RECREATE| Modifier | Constructor and Description |
|---|---|
protected |
ColumnViewerToolTipSupport(ColumnViewer viewer,
int style,
boolean manualActivation)
Enable ToolTip support for the viewer by creating an instance from this
class.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterHideToolTip(Event event)
This method is called after a tooltip is hidden.
|
protected Composite |
createToolTipContentArea(Event event,
Composite parent)
Instead of overwriting this method subclasses should overwrite
createViewerToolTipContentArea(Event, ViewerCell, Composite) |
protected Composite |
createViewerToolTipContentArea(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 void |
enableFor(ColumnViewer viewer)
Enable ToolTip support for the viewer by creating an instance from this
class.
|
static void |
enableFor(ColumnViewer viewer,
int style)
Enable ToolTip support for the viewer by creating an instance from this
class.
|
protected Object |
getToolTipArea(Event event)
This method is called to check for which area the tooltip is
created/hidden for.
|
protected boolean |
shouldCreateToolTip(Event event)
Should the tooltip displayed because of the given event.
|
getBackgroundColor, getBackgroundImage, getFont, getForegroundColor, getImage, getStyle, getText, setBackgroundColor, setBackgroundImage, setFont, setForegroundColor, setImage, setStyle, setTextactivate, deactivate, getData, getLocation, hide, isHideOnMouseDown, isRespectDisplayBounds, isRespectMonitorBounds, setData, setHideDelay, setHideOnMouseDown, setPopupDelay, setRespectDisplayBounds, setRespectMonitorBounds, setShift, showprotected ColumnViewerToolTipSupport(ColumnViewer viewer, int style, boolean manualActivation)
CellLabelProvider.viewer - the viewer the support is attached tostyle - style passed to control tool tip behaviormanualActivation - true if the activation is done manually using
ToolTip.show(Point)public static void enableFor(ColumnViewer viewer)
CellLabelProvider.viewer - the viewer the support is attached topublic static void enableFor(ColumnViewer viewer, int style)
CellLabelProvider.viewer - the viewer the support is attached tostyle - style passed to control tool tip behaviorToolTip.RECREATE,
ToolTip.NO_RECREATEprotected Object getToolTipArea(Event event)
ToolTipToolTip.NO_RECREATE this 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 the Object.equals(Object) method is used.getToolTipArea in class ToolTipevent - the eventnull this could be any object describing the area
(e.g. the Control onto which the tooltip is bound to, a
part of this area e.g. for ColumnViewer this could be a
ViewerCell)protected Composite createToolTipContentArea(Event event, Composite parent)
createViewerToolTipContentArea(Event, ViewerCell, Composite)createToolTipContentArea in class DefaultToolTipevent - the event that triggered the activation of the tooltipparent - the parent of the content areaprotected Composite createViewerToolTipContentArea(Event event, ViewerCell cell, Composite parent)
This method is called from
createToolTipContentArea(Event, Composite) and by default calls
the DefaultToolTip.createToolTipContentArea(Event, Composite).
event - the event that whichcell - the cell the tool tip is shown forparent - the parent of the control to createprotected boolean shouldCreateToolTip(Event event)
ToolTipSubclasses may overwrite this to get custom behavior
shouldCreateToolTip in class ToolTipevent - the eventtrue if tooltip should be displayedprotected void afterHideToolTip(Event event)
ToolTipSubclasses may override to clean up requested system resources
afterHideToolTip in class ToolTipevent - event triggered the hiding action (may be null
if event wasn't triggered by user actions directly)
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.