Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/viewers/ITableColorProvider.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2004, 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 * Initial implementation - Gunnar Ahlberg (IBS AB, www.ibs.net) | |
10 * IBM Corporation - further revisions | |
11 * Port to the D programming language: | |
12 * Frank Benoit <benoit@tionex.de> | |
13 *******************************************************************************/ | |
14 | |
15 module org.eclipse.jface.viewers.ITableColorProvider; | |
16 | |
17 import java.lang.all; | |
18 | |
19 import org.eclipse.swt.graphics.Color; | |
20 | |
21 /** | |
22 * Interface to provide color representation for a given cell within | |
23 * the row for an element in a table. | |
24 * @since 3.1 | |
25 */ | |
26 public interface ITableColorProvider { | |
27 | |
28 /** | |
29 * Provides a foreground color for the given element. | |
30 * | |
31 * @param element the element | |
32 * @param columnIndex the zero-based index of the column in which | |
33 * the color appears | |
34 * @return the foreground color for the element, or <code>null</code> to | |
35 * use the default foreground color | |
36 */ | |
37 Color getForeground(Object element, int columnIndex); | |
38 | |
39 /** | |
40 * Provides a background color for the given element at the specified index | |
41 * | |
42 * @param element the element | |
43 * @param columnIndex the zero-based index of the column in which the color appears | |
44 * @return the background color for the element, or <code>null</code> to | |
45 * use the default background color | |
46 * | |
47 */ | |
48 Color getBackground(Object element, int columnIndex); | |
49 } |