KickJava   Java API By Example, From Geeks To Geeks.

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


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  *******************************************************************************/

11
12 package org.eclipse.jface.viewers;
13
14 import org.eclipse.swt.graphics.Color;
15
16 /**
17  * Interface to provide color representation for a given element.
18  * @see org.eclipse.jface.viewers.IColorDecorator
19  */

20 public interface IColorProvider {
21
22     /**
23      * Provides a foreground color for the given element.
24      *
25      * @param element the element
26      * @return the foreground color for the element, or <code>null</code>
27      * to use the default foreground color
28      */

29     Color getForeground(Object JavaDoc element);
30
31     /**
32      * Provides a background color for the given element.
33      *
34      * @param element the element
35      * @return the background color for the element, or <code>null</code>
36      * to use the default background color
37      */

38     Color getBackground(Object JavaDoc element);
39 }
40
Popular Tags