KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > plugin > jfreereport > TableModelWrapper


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * 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 JavaDoc;
20 import javax.swing.table.TableModel JavaDoc;
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 JavaDoc, CloseableTableModel {
28
29     private TableModel JavaDoc tableModel;
30
31     public TableModelWrapper(TableModel JavaDoc tableModel) {
32         this.tableModel = tableModel;
33     }
34
35     public int getColumnCount() {
36         return tableModel.getColumnCount();
37     }
38
39     public int getRowCount() {
40         return tableModel.getRowCount();
41     }
42
43     public boolean isCellEditable(int rowIndex, int columnIndex) {
44         return tableModel.isCellEditable(rowIndex, columnIndex);
45     }
46
47     public Class JavaDoc getColumnClass(int columnIndex) {
48         return tableModel.getColumnClass(columnIndex);
49     }
50
51     public Object JavaDoc getValueAt(int rowIndex, int columnIndex) {
52         return tableModel.getValueAt(rowIndex, columnIndex);
53     }
54
55     public void setValueAt(Object JavaDoc aValue, int rowIndex, int columnIndex) {
56         tableModel.setValueAt(aValue, rowIndex, columnIndex);
57     }
58
59     public String JavaDoc getColumnName(int columnIndex) {
60         return tableModel.getColumnName(columnIndex);
61     }
62
63     public void addTableModelListener(TableModelListener JavaDoc l) {
64         tableModel.addTableModelListener(l);
65     }
66
67     public void removeTableModelListener(TableModelListener JavaDoc l) {
68         tableModel.removeTableModelListener(l);
69     }
70
71     public void close() {
72         tableModel = null;
73     }
74
75 }
76
Popular Tags