Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/viewers/ILabelDecorator.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module org.eclipse.jface.viewers.ILabelDecorator; | |
14 | |
15 import org.eclipse.jface.viewers.IBaseLabelProvider; | |
16 | |
17 import org.eclipse.swt.graphics.Image; | |
18 | |
19 import java.lang.all; | |
20 | |
21 /** | |
22 * A label decorator decorates the label text and image for some element. | |
23 * The original label text and image are obtained by some other means, | |
24 * for example by a label provider. | |
25 * | |
26 * @see ILabelProvider | |
27 */ | |
28 public interface ILabelDecorator : IBaseLabelProvider { | |
29 /** | |
30 * Returns an image that is based on the given image, | |
31 * but decorated with additional information relating to the state | |
32 * of the provided element. | |
33 * | |
34 * Text and image decoration updates can occur as a result of other updates | |
35 * within the workbench including deferred decoration by background processes. | |
36 * Clients should handle labelProviderChangedEvents for the given element to get | |
37 * the complete decoration. | |
38 * @see LabelProviderChangedEvent | |
39 * @see IBaseLabelProvider#addListener | |
40 * | |
41 * @param image the input image to decorate, or <code>null</code> if the element has no image | |
42 * @param element the element whose image is being decorated | |
43 * @return the decorated image, or <code>null</code> if no decoration is to be applied | |
44 * | |
45 * @see org.eclipse.jface.resource.CompositeImageDescriptor | |
46 */ | |
47 public Image decorateImage(Image image, Object element); | |
48 | |
49 /** | |
50 * Returns a text label that is based on the given text label, | |
51 * but decorated with additional information relating to the state | |
52 * of the provided element. | |
53 * | |
54 * Text and image decoration updates can occur as a result of other updates | |
55 * within the workbench including deferred decoration by background processes. | |
56 * Clients should handle labelProviderChangedEvents for the given element to get | |
57 * the complete decoration. | |
58 * @see LabelProviderChangedEvent | |
59 * @see IBaseLabelProvider#addListener | |
60 * | |
61 * @param text the input text label to decorate | |
62 * @param element the element whose image is being decorated | |
63 * @return the decorated text label, or <code>null</code> if no decoration is to be applied | |
64 */ | |
65 public String decorateText(String text, Object element); | |
66 } |