|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.viewers.BaseLabelProvider
org.eclipse.jface.viewers.CellLabelProvider
org.eclipse.jface.viewers.OwnerDrawLabelProvider
org.eclipse.jface.viewers.StyledCellLabelProvider
org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider
A 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.
Nested Class Summary | |
static interface |
DelegatingStyledCellLabelProvider.IStyledLabelProvider
Interface marking a label provider that provides styled text labels and images. |
Field Summary |
Fields inherited from class org.eclipse.jface.viewers.StyledCellLabelProvider |
COLORS_ON_SELECTION, NO_FOCUS |
Constructor Summary | |
DelegatingStyledCellLabelProvider(DelegatingStyledCellLabelProvider.IStyledLabelProvider labelProvider)
Creates a DelegatingStyledCellLabelProvider that delegates the
requests for the styled labels and the images to a
DelegatingStyledCellLabelProvider.IStyledLabelProvider . |
Method Summary | |
void |
addListener(ILabelProviderListener listener)
Adds a listener to this label provider. |
void |
dispose()
The BaseLabelProvider implementation of this
IBaseLabelProvider method clears its internal listener list.
|
Color |
getBackground(Object element)
Provides a background color for the given element. |
Font |
getFont(Object element)
Provides a font for the given element. |
Color |
getForeground(Object element)
Provides a foreground color for the given element. |
Image |
getImage(Object element)
Returns the image for the label of the given element. |
DelegatingStyledCellLabelProvider.IStyledLabelProvider |
getStyledStringProvider()
Returns the styled string provider. |
protected StyledString |
getStyledText(Object element)
Returns the styled text for the label of the given element. |
boolean |
isLabelProperty(Object element,
String property)
The BaseLabelProvider implementation of this
IBaseLabelProvider method returns true . |
void |
removeListener(ILabelProviderListener listener)
Removes a listener to this label provider. |
void |
update(ViewerCell cell)
Update the label for cell. |
Methods inherited from class org.eclipse.jface.viewers.StyledCellLabelProvider |
erase, getColumn, getViewer, initialize, isOwnerDrawEnabled, measure, paint, prepareStyleRange, setOwnerDrawEnabled |
Methods inherited from class org.eclipse.jface.viewers.OwnerDrawLabelProvider |
dispose, initialize, setOwnerDrawEnabled, setUpOwnerDraw |
Methods inherited from class org.eclipse.jface.viewers.CellLabelProvider |
getToolTipBackgroundColor, getToolTipDisplayDelayTime, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipShift, getToolTipStyle, getToolTipText, getToolTipTimeDisplayed, useNativeToolTip |
Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider |
fireLabelProviderChanged |
Methods inherited from class org.eclipse.core.commands.common.EventManager |
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DelegatingStyledCellLabelProvider(DelegatingStyledCellLabelProvider.IStyledLabelProvider labelProvider)
DelegatingStyledCellLabelProvider
that delegates the
requests for the styled labels and the images to a
DelegatingStyledCellLabelProvider.IStyledLabelProvider
.
labelProvider
- the label provider that provides the styled labels and the
imagesMethod Detail |
public void update(ViewerCell cell)
CellLabelProvider
update
in class StyledCellLabelProvider
public Color getForeground(Object element)
element
- the element
null
to
use the default foreground colorpublic Color getBackground(Object element)
element
- the element
null
to
use the default background colorpublic Font getFont(Object element)
element
- the element
null
to use the
default fontpublic Image getImage(Object element)
element
- the element for which to provide the label image
null
if
there is no image for the given objectprotected StyledString getStyledText(Object element)
element
- the element for which to provide the styled label text
public DelegatingStyledCellLabelProvider.IStyledLabelProvider getStyledStringProvider()
public void addListener(ILabelProviderListener listener)
IBaseLabelProvider
Label provider listeners are informed about state changes that affect the rendering of the viewer that uses this label provider.
addListener
in interface IBaseLabelProvider
addListener
in class BaseLabelProvider
public void removeListener(ILabelProviderListener listener)
IBaseLabelProvider
removeListener
in interface IBaseLabelProvider
removeListener
in class BaseLabelProvider
public boolean isLabelProperty(Object element, String property)
BaseLabelProvider
BaseLabelProvider
implementation of this
IBaseLabelProvider
method returns true
. Subclasses may
override.
isLabelProperty
in interface IBaseLabelProvider
isLabelProperty
in class BaseLabelProvider
public void dispose()
BaseLabelProvider
BaseLabelProvider
implementation of this
IBaseLabelProvider
method clears its internal listener list.
Subclasses may extend but should call the super implementation.
dispose
in interface IBaseLabelProvider
dispose
in class StyledCellLabelProvider
|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.