01: /*******************************************************************************
02: * Copyright (c) 2004, 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.viewers;
11:
12: import org.eclipse.swt.graphics.Color;
13:
14: /**
15: * The IColorDecorator is an interface for objects that return a color to
16: * decorate either the foreground and background colors for displaying an
17: * an object.
18: *
19: * If an IColorDecorator decorates a foreground or background in an object
20: * that also has an IColorProvider the IColorDecorator will take precedence.
21: * @see IColorProvider
22: *
23: * @since 3.1
24: */
25: public interface IColorDecorator {
26:
27: /**
28: * Return the foreground Color for element or <code>null</code> if there
29: * is not one.
30: * @param element
31: * @return Color or <code>null</code>
32: */
33: public Color decorateForeground(Object element);
34:
35: /**
36: * Return the background Color for element or <code>null</code> if there
37: * is not one.
38: * @param element
39: * @return Color or <code>null</code>
40: */
41: public Color decorateBackground(Object element);
42:
43: }
|