01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.ubt.report.data.file.derived;
06:
07: import com.sun.portal.ubt.report.data.DataMiner;
08: import com.sun.portal.ubt.report.view.IllegalMinerException;
09:
10: import javax.swing.table.AbstractTableModel;
11:
12: /**
13: *
14: */
15: public abstract class UBTTableDataSource extends AbstractTableModel
16: implements UBTDataSourceI {
17: protected Object[][] data;
18: protected String[] columnNames;
19:
20: public UBTTableDataSource(DataMiner miner)
21: throws IllegalMinerException {
22: }
23:
24: public final int getColumnCount() {
25: return this .columnNames.length;
26: }
27:
28: public final String getColumnName(int columnIndex) {
29: return this .columnNames[columnIndex];
30: }
31:
32: public final int getRowCount() {
33: return this .data.length;
34: }
35:
36: public final Object getValueAt(int rowIndex, int columnIndex) {
37: return this .data[rowIndex][columnIndex];
38: }
39:
40: public final Object[][] getData() {
41: return this .data;
42: }
43:
44: public final Object[] getColumns() {
45: return this.columnNames;
46: }
47: }
|