KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > viewers > IColorDecorator


1 /*******************************************************************************
2  * Copyright (c) 2004, 2007 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  *******************************************************************************/

11 package org.eclipse.jface.viewers;
12
13 import org.eclipse.swt.graphics.Color;
14
15 /**
16  * The IColorDecorator is an interface for objects that return a color to
17  * decorate either the foreground and background colors for displaying an
18  * an object.
19  *
20  * If an IColorDecorator decorates a foreground or background in an object
21  * that also has an IColorProvider the IColorDecorator will take precedence.
22  * @see IColorProvider
23  *
24  * @since 3.1
25  */

26 public interface IColorDecorator {
27     
28     /**
29      * Return the foreground Color for element or <code>null</code> if there
30      * is not one.
31      * @param element
32      * @return Color or <code>null</code>
33      */

34     public Color decorateForeground(Object JavaDoc element);
35     
36     /**
37      * Return the background Color for element or <code>null</code> if there
38      * is not one.
39      * @param element
40      * @return Color or <code>null</code>
41      */

42     public Color decorateBackground(Object JavaDoc element);
43
44 }
45
Popular Tags