|
Eclipse Platform 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.eclipse.jface.viewers.LabelProvider
|
+--org.eclipse.jface.viewers.DecoratingLabelProvider
A decorating label provider is a label provider which combines a nested label provider and an optional decorator. The decorator decorates the label text and image provided by the nested label provider.
| Constructor Summary | |
DecoratingLabelProvider(ILabelProvider provider,
ILabelDecorator decorator)
Creates a decorating label provider which uses the given label decorator to decorate labels provided by the given label provider. |
|
| Method Summary | |
void |
addListener(ILabelProviderListener listener)
The DecoratingLabelProvider implementation of this IBaseLabelProvider method
adds the listener to both the nested label provider and the label decorator. |
void |
dispose()
The DecoratingLabelProvider implementation of this IBaseLabelProvider method
disposes both the nested label provider and the label decorator. |
Image |
getImage(Object element)
The DecoratingLabelProvider implementation of this
ILabelProvider method returns the image provided
by the nested label provider's getImage method,
decorated with the decoration provided by the label decorator's
decorateImage method. |
ILabelDecorator |
getLabelDecorator()
Returns the label decorator, or null if none has been set. |
ILabelProvider |
getLabelProvider()
Returns the nested label provider. |
String |
getText(Object element)
The DecoratingLabelProvider implementation of this
ILabelProvider method returns the text label provided
by the nested label provider's getText method,
decorated with the decoration provided by the label decorator's
decorateText method. |
boolean |
isLabelProperty(Object element,
String property)
The DecoratingLabelProvider implementation of this
IBaseLabelProvider method returns true if the corresponding method
on the nested label provider returns true or if the corresponding method on the
decorator returns true. |
void |
removeListener(ILabelProviderListener listener)
The DecoratingLabelProvider implementation of this IBaseLabelProvider method
removes the listener from both the nested label provider and the label decorator. |
void |
setLabelDecorator(ILabelDecorator decorator)
Sets the label decorator. |
| Methods inherited from class org.eclipse.jface.viewers.LabelProvider |
fireLabelProviderChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DecoratingLabelProvider(ILabelProvider provider,
ILabelDecorator decorator)
provider - the nested label providerdecorator - the label decorator, or null if no decorator is to be used initially| Method Detail |
public void addListener(ILabelProviderListener listener)
DecoratingLabelProvider implementation of this IBaseLabelProvider method
adds the listener to both the nested label provider and the label decorator.
addListener in interface IBaseLabelProvideraddListener in class LabelProviderlistener - a label provider listenerpublic void dispose()
DecoratingLabelProvider implementation of this IBaseLabelProvider method
disposes both the nested label provider and the label decorator.
dispose in interface IBaseLabelProviderdispose in class LabelProviderpublic Image getImage(Object element)
DecoratingLabelProvider implementation of this
ILabelProvider method returns the image provided
by the nested label provider's getImage method,
decorated with the decoration provided by the label decorator's
decorateImage method.
getImage in interface ILabelProvidergetImage in class LabelProviderelement - the element for which to provide the label image
null
if these is no image for the given objectpublic ILabelDecorator getLabelDecorator()
null if none has been set.
null if none has been set.public ILabelProvider getLabelProvider()
public String getText(Object element)
DecoratingLabelProvider implementation of this
ILabelProvider method returns the text label provided
by the nested label provider's getText method,
decorated with the decoration provided by the label decorator's
decorateText method.
getText in interface ILabelProvidergetText in class LabelProviderelement - the element for which to provide the label text
null
if these is no text label for the given object
public boolean isLabelProperty(Object element,
String property)
DecoratingLabelProvider implementation of this
IBaseLabelProvider method returns true if the corresponding method
on the nested label provider returns true or if the corresponding method on the
decorator returns true.
isLabelProperty in interface IBaseLabelProviderisLabelProperty in class LabelProviderelement - the elementproperty - the property
true if the label would be affected,
and false if it would be unaffectedpublic void removeListener(ILabelProviderListener listener)
DecoratingLabelProvider implementation of this IBaseLabelProvider method
removes the listener from both the nested label provider and the label decorator.
removeListener in interface IBaseLabelProviderremoveListener in class LabelProviderlistener - a label provider listenerpublic void setLabelDecorator(ILabelDecorator decorator)
decorator - the label decorator, or null if no decorations are to be applied
|
Eclipse Platform 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||