Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d1d01373ad01cee77e9c029dbd3086c7622e15f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*******************************************************************************
 * Copyright (c) 2004, 2005 Sybase, Inc. and others.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Sybase, Inc. - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.jsf.facesconfig.ui.pageflow.figure;

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,
 * 
 * 
 * @author Xiao-guang Zhang
 */
public interface ILabelDecorator {
	/**
	 * 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);

}

Back to the top