Class DelegatingStyledCellLabelProvider
- All Implemented Interfaces:
- IBaseLabelProvider,- IToolTipProvider
- Direct Known Subclasses:
- DecoratingStyledCellLabelProvider
DelegatingStyledCellLabelProvider is a
 StyledCellLabelProvider that delegates requests for the styled string
 and the image to a
 DelegatingStyledCellLabelProvider.IStyledLabelProvider.
 
 Existing label providers can be enhanced by implementing
 DelegatingStyledCellLabelProvider.IStyledLabelProvider so they can be
 used in viewers with styled labels.
 
 The DelegatingStyledCellLabelProvider.IStyledLabelProvider can
 optionally implement IColorProvider and IFontProvider to
 provide foreground and background color and a default font.
 
 Since 3.10, DelegatingStyledCellLabelProvider.IStyledLabelProvider
 can optionally implement IToolTipProvider to provide tooltip
 support.
 
- Since:
- 3.4
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceInterface marking a label provider that provides styled text labels and images.
- 
Field SummaryFields inherited from class org.eclipse.jface.viewers.StyledCellLabelProviderCOLORS_ON_SELECTION, NO_FOCUS
- 
Constructor SummaryConstructorsConstructorDescriptionDelegatingStyledCellLabelProvider(DelegatingStyledCellLabelProvider.IStyledLabelProvider labelProvider) Creates aDelegatingStyledCellLabelProviderthat delegates the requests for the styled labels and the images to aDelegatingStyledCellLabelProvider.IStyledLabelProvider.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddListener(ILabelProviderListener listener) Adds a listener to this label provider.voiddispose()TheBaseLabelProviderimplementation of thisIBaseLabelProvidermethod clears its internal listener list.getBackground(Object element) Provides a background color for the given element.Provides a font for the given element.getForeground(Object element) Provides a foreground color for the given element.Returns the image for the label of the given element.Returns the styled string provider.protected StyledStringgetStyledText(Object element) Returns the styled text for the label of the given element.getToolTipText(Object element) Get the text displayed in the tool tip for object.booleanisLabelProperty(Object element, String property) TheBaseLabelProviderimplementation of thisIBaseLabelProvidermethod returnstrue.voidremoveListener(ILabelProviderListener listener) Removes a listener to this label provider.voidupdate(ViewerCell cell) Update the label for cell.Methods inherited from class org.eclipse.jface.viewers.StyledCellLabelProvidererase, getColumn, getViewer, initialize, isOwnerDrawEnabled, measure, paint, prepareStyleRange, setOwnerDrawEnabled, styleDecoratedStringMethods inherited from class org.eclipse.jface.viewers.OwnerDrawLabelProviderdispose, initialize, setOwnerDrawEnabled, setUpOwnerDrawMethods inherited from class org.eclipse.jface.viewers.CellLabelProvidergetToolTipBackgroundColor, getToolTipDisplayDelayTime, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipShift, getToolTipStyle, getToolTipTimeDisplayed, useNativeToolTipMethods inherited from class org.eclipse.jface.viewers.BaseLabelProviderfireLabelProviderChangedMethods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
- 
Constructor Details- 
DelegatingStyledCellLabelProviderpublic DelegatingStyledCellLabelProvider(DelegatingStyledCellLabelProvider.IStyledLabelProvider labelProvider) Creates aDelegatingStyledCellLabelProviderthat delegates the requests for the styled labels and the images to aDelegatingStyledCellLabelProvider.IStyledLabelProvider.- Parameters:
- labelProvider- the label provider that provides the styled labels and the images
 
 
- 
- 
Method Details- 
updateDescription copied from class:CellLabelProviderUpdate the label for cell.- Overrides:
- updatein class- StyledCellLabelProvider
- Parameters:
- cell-- ViewerCell
 
- 
getForegroundProvides a foreground color for the given element.- Parameters:
- element- the element
- Returns:
- the foreground color for the element, or nullto use the default foreground color
 
- 
getBackgroundProvides a background color for the given element.- Parameters:
- element- the element
- Returns:
- the background color for the element, or nullto use the default background color
 
- 
getFontProvides a font for the given element.- Parameters:
- element- the element
- Returns:
- the font for the element, or nullto use the default font
 
- 
getToolTipTextDescription copied from class:CellLabelProviderGet the text displayed in the tool tip for object.If CellLabelProvider.getToolTipText(Object)andCellLabelProvider.getToolTipImage(Object)both returnnullthe control is set back to standard behavior- Specified by:
- getToolTipTextin interface- IToolTipProvider
- Overrides:
- getToolTipTextin class- CellLabelProvider
- Parameters:
- element- the element for which the tool tip is shown
- Returns:
- the Stringornullif there is not text to display
 
- 
getImageReturns the image for the label of the given element. The image is owned by the label provider and must not be disposed directly. Instead, dispose the label provider when no longer needed.- Parameters:
- element- the element for which to provide the label image
- Returns:
- the image used to label the element, or nullif there is no image for the given object
 
- 
getStyledTextReturns the styled text for the label of the given element.- Parameters:
- element- the element for which to provide the styled label text
- Returns:
- the styled text string used to label the element
 
- 
getStyledStringProviderReturns the styled string provider.- Returns:
- the wrapped label provider
 
- 
addListenerDescription copied from interface:IBaseLabelProviderAdds a listener to this label provider. Has no effect if an identical listener is already registered.Label provider listeners are informed about state changes that affect the rendering of the viewer that uses this label provider. - Specified by:
- addListenerin interface- IBaseLabelProvider
- Overrides:
- addListenerin class- BaseLabelProvider
- Parameters:
- listener- a label provider listener
 
- 
removeListenerDescription copied from interface:IBaseLabelProviderRemoves a listener to this label provider. Has no effect if an identical listener is not registered.- Specified by:
- removeListenerin interface- IBaseLabelProvider
- Overrides:
- removeListenerin class- BaseLabelProvider
- Parameters:
- listener- a label provider listener
 
- 
isLabelPropertyDescription copied from class:BaseLabelProviderTheBaseLabelProviderimplementation of thisIBaseLabelProvidermethod returnstrue. Subclasses may override.- Specified by:
- isLabelPropertyin interface- IBaseLabelProvider
- Overrides:
- isLabelPropertyin class- BaseLabelProvider
- Parameters:
- element- the element
- property- the property
- Returns:
- trueif the label would be affected, and- falseif it would be unaffected
 
- 
disposepublic void dispose()Description copied from class:BaseLabelProviderTheBaseLabelProviderimplementation of thisIBaseLabelProvidermethod clears its internal listener list. Subclasses may extend but should call the super implementation.- Specified by:
- disposein interface- IBaseLabelProvider
- Overrides:
- disposein class- StyledCellLabelProvider
 
 
-