01: /*
02: * Copyright 2006 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: *
13: * @created Mar 2, 2006
14: * @author James Dixon
15: */
16:
17: package org.pentaho.plugin.jfreereport;
18:
19: import javax.swing.event.TableModelListener;
20: import javax.swing.table.TableModel;
21:
22: import org.jfree.report.util.CloseableTableModel;
23:
24: /**
25: * @deprecated This class is no longer used.
26: */
27: public class TableModelWrapper implements TableModel,
28: CloseableTableModel {
29:
30: private TableModel tableModel;
31:
32: public TableModelWrapper(TableModel tableModel) {
33: this .tableModel = tableModel;
34: }
35:
36: public int getColumnCount() {
37: return tableModel.getColumnCount();
38: }
39:
40: public int getRowCount() {
41: return tableModel.getRowCount();
42: }
43:
44: public boolean isCellEditable(int rowIndex, int columnIndex) {
45: return tableModel.isCellEditable(rowIndex, columnIndex);
46: }
47:
48: public Class getColumnClass(int columnIndex) {
49: return tableModel.getColumnClass(columnIndex);
50: }
51:
52: public Object getValueAt(int rowIndex, int columnIndex) {
53: return tableModel.getValueAt(rowIndex, columnIndex);
54: }
55:
56: public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
57: tableModel.setValueAt(aValue, rowIndex, columnIndex);
58: }
59:
60: public String getColumnName(int columnIndex) {
61: return tableModel.getColumnName(columnIndex);
62: }
63:
64: public void addTableModelListener(TableModelListener l) {
65: tableModel.addTableModelListener(l);
66: }
67:
68: public void removeTableModelListener(TableModelListener l) {
69: tableModel.removeTableModelListener(l);
70: }
71:
72: public void close() {
73: tableModel = null;
74: }
75:
76: }
|