org.jfree.report.modules.misc.tablemodel

Class JoiningTableModel


public class JoiningTableModel
extends AbstractTableModel

======================================== JFreeReport : a free Java report library ======================================== Project Info: http://reporting.pentaho.org/ (C) Copyright 2000-2007, by Object Refinery Limited, Pentaho Corporation and Contributors. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. [Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.] ------------ $Id: JoiningTableModel.java 3525 2007-10-16 11:43:48Z tmorgner $ ------------ (C) Copyright 2000-2005, by Object Refinery Limited. (C) Copyright 2005-2007, by Pentaho Corporation.

Field Summary

static String
TABLE_PREFIX_COLUMN

Constructor Summary

JoiningTableModel()

Method Summary

void
addTableModel(String prefix, TableModel model)
Class
getColumnClass(int columnIndex)
Returns Object.class regardless of columnIndex.
int
getColumnCount()
Returns the number of columns managed by the data source object.
String
getColumnName(int column)
Returns a default name for the column using spreadsheet conventions: A, B, C, ...
int
getRowCount()
Returns the number of records managed by the data source object.
TableModel
getTableModel(int pos)
int
getTableModelCount()
Object
getValueAt(int rowIndex, int columnIndex)
Returns an attribute value for the cell at columnIndex and rowIndex.
boolean
isCellEditable(int rowIndex, int columnIndex)
Returns false.
void
removeTableModel(TableModel model)
protected void
updateData()
protected void
updateRowCount()
protected void
updateStructure()

Field Details

TABLE_PREFIX_COLUMN

public static final String TABLE_PREFIX_COLUMN

Constructor Details

JoiningTableModel

public JoiningTableModel()

Method Details

addTableModel

public void addTableModel(String prefix,
                          TableModel model)

getColumnClass

public Class getColumnClass(int columnIndex)
Returns Object.class regardless of columnIndex.
Parameters:
columnIndex - the column being queried
Returns:
the Object.class

getColumnCount

public int getColumnCount()
Returns the number of columns managed by the data source object. A JTable uses this method to determine how many columns it should create and display on initialization.
Returns:
the number or columns in the model
See Also:
getRowCount()

getColumnName

public String getColumnName(int column)
Returns a default name for the column using spreadsheet conventions: A, B, C, ... Z, AA, AB, etc. If column cannot be found, returns an empty string.
Parameters:
column - the column being queried
Returns:
a string containing the default name of column

getRowCount

public int getRowCount()
Returns the number of records managed by the data source object. A JTable uses this method to determine how many rows it should create and display. This method should be quick, as it is call by JTable quite frequently.
Returns:
the number or rows in the model

getTableModel

public TableModel getTableModel(int pos)

getTableModelCount

public int getTableModelCount()

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Returns an attribute value for the cell at columnIndex and rowIndex.
Parameters:
rowIndex - the row whose value is to be looked up
columnIndex - the column whose value is to be looked up
Returns:
the value Object at the specified cell

isCellEditable

public final boolean isCellEditable(int rowIndex,
                                    int columnIndex)
Returns false. JFreeReport does not like changing cells.
Parameters:
rowIndex - the row being queried
columnIndex - the column being queried
Returns:
false

removeTableModel

public void removeTableModel(TableModel model)

updateData

protected void updateData()

updateRowCount

protected void updateRowCount()

updateStructure

protected void updateStructure()