01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.viewers;
11:
12: import org.eclipse.swt.graphics.Image;
13:
14: /**
15: * Extends <code>IBaseLabelProvider</code> with the methods
16: * to provide the text and/or image for each column of a given element.
17: * Used by table viewers.
18: *
19: * @see TableViewer
20: */
21: public interface ITableLabelProvider extends IBaseLabelProvider {
22: /**
23: * Returns the label image for the given column of the given element.
24: *
25: * @param element the object representing the entire row, or
26: * <code>null</code> indicating that no input object is set
27: * in the viewer
28: * @param columnIndex the zero-based index of the column in which
29: * the label appears
30: * @return Image or <code>null</code> if there is no image for the
31: * given object at columnIndex
32: */
33: public Image getColumnImage(Object element, int columnIndex);
34:
35: /**
36: * Returns the label text for the given column of the given element.
37: *
38: * @param element the object representing the entire row, or
39: * <code>null</code> indicating that no input object is set
40: * in the viewer
41: * @param columnIndex the zero-based index of the column in which the label appears
42: * @return String or or <code>null</code> if there is no text for the
43: * given object at columnIndex
44: */
45: public String getColumnText(Object element, int columnIndex);
46: }
|