public abstract class LabelDecorator extends Object implements ILabelDecorator
IDecorationContext
Constructor and Description |
---|
LabelDecorator() |
Modifier and Type | Method and Description |
---|---|
abstract Image |
decorateImage(Image image,
Object element,
IDecorationContext context)
Returns an image that is based on the given image,
but decorated with additional information relating to the state
of the provided element taking into account the provided context.
|
abstract String |
decorateText(String text,
Object element,
IDecorationContext context)
Returns a text label that is based on the given text label,
but decorated with additional information relating to the state
of the provided element taking into account the provided context.
|
abstract boolean |
prepareDecoration(Object element,
String originalText,
IDecorationContext context)
Prepare the element for decoration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decorateImage, decorateText
addListener, dispose, isLabelProperty, removeListener
public abstract Image decorateImage(Image image, Object element, IDecorationContext context)
image
- the input image to decorate, or null
if the element has no imageelement
- the element whose image is being decoratedcontext
- additional context information about the element being decoratednull
if no decoration is to be appliedLabelProviderChangedEvent
,
IBaseLabelProvider.addListener(org.eclipse.jface.viewers.ILabelProviderListener)
,
CompositeImageDescriptor
public abstract String decorateText(String text, Object element, IDecorationContext context)
text
- the input text label to decorateelement
- the element whose image is being decoratedcontext
- additional context information about the element being decoratednull
if no decoration is to be appliedLabelProviderChangedEvent
,
IBaseLabelProvider.addListener(org.eclipse.jface.viewers.ILabelProviderListener)
public abstract boolean prepareDecoration(Object element, String originalText, IDecorationContext context)
element
- The element to be decoratedoriginalText
- The starting text.context
- The decoration contexttrue
if the decoration is ready for this element
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.