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 6659 2008-12-02 15:35:06Z tmorgner $ ------------ (C) Copyright 2000-2005, by Object Refinery Limited. (C) Copyright 2005-2007, by Pentaho Corporation.
Field Summary
static StringTABLE_PREFIX_COLUMN
Constructor Summary
JoiningTableModel()
Method Summary
voidaddTableModel(String prefix, TableModel model)
ClassgetColumnClass(int columnIndex)
Returns Object.class regardless of columnIndex.
intgetColumnCount()
Returns the number of columns managed by the data source object.
StringgetColumnName(int column)
Returns a default name for the column using spreadsheet conventions: A, B, C, ...
intgetRowCount()
Returns the number of records managed by the data source object.
TableModelgetTableModel(int pos)
intgetTableModelCount()
ObjectgetValueAt(int rowIndex, int columnIndex)
Returns an attribute value for the cell at columnIndex and rowIndex.
booleanisCellEditable(int rowIndex, int columnIndex)
Returns false.
voidremoveTableModel(TableModel model)
protected voidupdateData()
protected voidupdateRowCount()
protected voidupdateStructure()

Field Detail

TABLE_PREFIX_COLUMN

public static final String TABLE_PREFIX_COLUMN

Constructor Detail

JoiningTableModel

public JoiningTableModel()

Method Detail

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: JoiningTableModel

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

See Also: JoiningTableModel

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()