public abstract class CellLabelProvider extends BaseLabelProvider implements IToolTipProvider
This class is intended to be subclassed
as a concrete implementation| Constructor and Description |
|---|
CellLabelProvider()
Create a new instance of the receiver.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(ColumnViewer viewer,
ViewerColumn column)
Dispose of this label provider which was used with the given column
viewer and column.
|
Color |
getToolTipBackgroundColor(Object object)
Return the background color used for the tool tip
|
int |
getToolTipDisplayDelayTime(Object object)
The time in milliseconds until the tool tip is displayed.
|
Font |
getToolTipFont(Object object)
Get the
Font used to display the tool tip |
Color |
getToolTipForegroundColor(Object object)
The foreground color used to display the the text in the tool tip
|
Image |
getToolTipImage(Object object)
Get the image displayed in the tool tip for object.
|
Point |
getToolTipShift(Object object)
Return the amount of pixels in x and y direction you want the tool tip to
pop up from the mouse pointer.
|
int |
getToolTipStyle(Object object)
|
String |
getToolTipText(Object element)
Get the text displayed in the tool tip for object.
|
int |
getToolTipTimeDisplayed(Object object)
The time in milliseconds the tool tip is shown for.
|
protected void |
initialize(ColumnViewer viewer,
ViewerColumn column)
Initialize this label provider for use with the given column viewer for
the given column.
|
abstract void |
update(ViewerCell cell)
Update the label for cell.
|
boolean |
useNativeToolTip(Object object)
Return whether or not to use the native tool tip.
|
addListener, dispose, fireLabelProviderChanged, isLabelProperty, removeListeneraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectpublic CellLabelProvider()
public Image getToolTipImage(Object object)
If getToolTipText(Object) and
getToolTipImage(Object) both return null the
control is set back to standard behavior
object - the element for which the tool tip is shownImage or null if there is not image.public String getToolTipText(Object element)
If getToolTipText(Object) and
getToolTipImage(Object) both return null the
control is set back to standard behavior
getToolTipText in interface IToolTipProviderelement - the element for which the tool tip is shownString or null if there is not text to
displaypublic Color getToolTipBackgroundColor(Object object)
object - the Object for which the tool tip is shownColor used or null if you want to use
the default color SWT.COLOR_INFO_BACKGROUNDSWT.COLOR_INFO_BACKGROUNDpublic Color getToolTipForegroundColor(Object object)
object - the Object for which the tool tip is shownColor used or null if you want to use
the default color SWT.COLOR_INFO_FOREGROUNDSWT.COLOR_INFO_FOREGROUNDpublic Font getToolTipFont(Object object)
Font used to display the tool tipobject - the element for which the tool tip is shownFont or null if the default font is to be
used.public Point getToolTipShift(Object object)
object - the element for which the tool tip is shownPoint to shift of the tool tip or null if the
default shift should be used.public boolean useNativeToolTip(Object object)
getToolTipText(Object) is used all
other features from custom tool tips are not supported.
To reset the control to native behavior you should return
true from this method and null from
getToolTipText(Object) or null from
getToolTipText(Object) and getToolTipImage(Object) at
the same time
object - the Object for which the tool tip is showntrue if native tool tips should be usedpublic int getToolTipTimeDisplayed(Object object)
object - the Object for which the tool tip is shownpublic int getToolTipDisplayDelayTime(Object object)
object - the Object for which the tool tip is shownpublic int getToolTipStyle(Object object)
SWT style used to create the CLabel (see there for
supported styles). By default SWT.SHADOW_NONE is used.object - the element for which the tool tip is shownCLabelpublic abstract void update(ViewerCell cell)
cell - ViewerCellprotected void initialize(ColumnViewer viewer, ViewerColumn column)
viewer - the viewercolumn - the column, or null if a column is not
available.public void dispose(ColumnViewer viewer, ViewerColumn column)
BaseLabelProvider.dispose()).viewer - the viewercolumn - the column, or null if a column is not
available.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.