blob: 33db14eb9a5debe7f6571f495bc3e711740cb2c8 [file] [log] [blame]
package org.eclipse.jface.viewers;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.swt.graphics.Image;
/**
* A label decorator decorates the label text and image for some element.
* The original label text and image are obtained by some other means,
* for example by a label provider.
*
* @see ILabelProvider
*/
public interface ILabelDecorator extends IBaseLabelProvider {
/**
* Returns an image that is based on the given image,
* but decorated with additional information relating to the state
* of the provided element.
*
* @param image the input image to decorate, or <code>null</code> if the element has no image
* @param element the element whose image is being decorated
* @return the decorated image, or <code>null</code> if no decoration is to be applied
*
* @see org.eclipse.jface.resource.CompositeImageDescriptor
*/
public Image decorateImage(Image image, Object element);
/**
* 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.
*
* @param text the input text label to decorate
* @param element the element whose image is being decorated
* @return the decorated text label, or <code>null</code> if no decoration is to be applied
*/
public String decorateText(String text, Object element);
}