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: * MyGWT - derived implementation
11: *******************************************************************************/package net.mygwt.ui.client.viewer;
12:
13: import net.mygwt.ui.client.widget.table.TableColumn;
14:
15: /**
16: * <code>ViewerColumn</code> implementation for TableViewer to enable
17: * column-specific label providers.
18: */
19: public class TableViewerColumn extends ViewerColumn {
20:
21: private TableColumn column;
22:
23: /**
24: * Creates a new viewer column for the given <code>TableViewer</code> on the
25: * given <code>TableColumn</code>.
26: *
27: * @param viewer the table viewer to which this column belongs
28: * @param column the underlying table column
29: */
30: public TableViewerColumn(TableViewer viewer, TableColumn column) {
31: super (viewer);
32: this .column = column;
33: this .column.setData(ViewerColumn.COLUMN_VIEWER_KEY, this );
34: }
35:
36: /**
37: * Returns the table column.
38: *
39: * @return the table column
40: */
41: public TableColumn getColumn() {
42: return column;
43: }
44: }
|