10
|
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
|
|
14 module dwtx.jface.viewers.IColorProvider;
|
|
15
|
|
16 import dwt.graphics.Color;
|
|
17
|
|
18 /**
|
|
19 * Interface to provide color representation for a given element.
|
|
20 * @see dwtx.jface.viewers.IColorDecorator
|
|
21 */
|
|
22 public interface IColorProvider {
|
|
23
|
|
24 /**
|
|
25 * Provides a foreground color for the given element.
|
|
26 *
|
|
27 * @param element the element
|
|
28 * @return the foreground color for the element, or <code>null</code>
|
|
29 * to use the default foreground color
|
|
30 */
|
|
31 Color getForeground(Object element);
|
|
32
|
|
33 /**
|
|
34 * Provides a background color for the given element.
|
|
35 *
|
|
36 * @param element the element
|
|
37 * @return the background color for the element, or <code>null</code>
|
|
38 * to use the default background color
|
|
39 */
|
|
40 Color getBackground(Object element);
|
|
41 }
|