comparison dwtx/jface/viewers/ITableColorProvider.d @ 10:b6c35faf97c8

Viewers
author Frank Benoit <benoit@tionex.de>
date Mon, 31 Mar 2008 00:47:19 +0200
parents
children
comparison
equal deleted inserted replaced
9:6c14e54dfc11 10:b6c35faf97c8
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 dwtx.jface.viewers.ITableColorProvider;
16
17 import dwt.graphics.Color;
18
19 /**
20 * Interface to provide color representation for a given cell within
21 * the row for an element in a table.
22 * @since 3.1
23 */
24 public interface ITableColorProvider {
25
26 /**
27 * Provides a foreground color for the given element.
28 *
29 * @param element the element
30 * @param columnIndex the zero-based index of the column in which
31 * the color appears
32 * @return the foreground color for the element, or <code>null</code> to
33 * use the default foreground color
34 */
35 Color getForeground(Object element, int columnIndex);
36
37 /**
38 * Provides a background color for the given element at the specified index
39 *
40 * @param element the element
41 * @param columnIndex the zero-based index of the column in which the color appears
42 * @return the background color for the element, or <code>null</code> to
43 * use the default background color
44 *
45 */
46 Color getBackground(Object element, int columnIndex);
47 }