org.norther.tammi.acorn.jfc
Class TableModelAdapter

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.norther.tammi.acorn.jfc.AbstractChartModel
          extended by org.norther.tammi.acorn.jfc.TableModelAdapter
All Implemented Interfaces:
Serializable, TableModel, ChartModel

public class TableModelAdapter
extends AbstractChartModel

A table model adapter.

Version:
$Id: TableModelAdapter.java,v 1.2 2009/09/28 15:08:50 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TableModelAdapter(TableModel model)
          Constructs a new model.
 
Method Summary
 int getColumnCount()
           
 String getColumnName(int column)
           
 int getRowCount()
           
 String getRowName(int row)
          Gets a default name for the row using spreadsheet conventions: 1, 2, 3, etc.
protected  TableModel getTableModel()
          Gets the table model.
 Object getValueAt(int row, int column)
           
 boolean isCellEditable(int row, int column)
           
 void setValueAt(Object value, int row, int column)
           
 
Methods inherited from class org.norther.tammi.acorn.jfc.AbstractChartModel
findColumnKey, findRow, findRowKey, getColumnKey, getRowKey
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, removeTableModelListener
 

Constructor Detail

TableModelAdapter

public TableModelAdapter(TableModel model)
Constructs a new model.

Parameters:
model - the model.
Method Detail

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getRowName

public String getRowName(int row)
Description copied from class: AbstractChartModel
Gets a default name for the row using spreadsheet conventions: 1, 2, 3, etc. If row cannot be found, returns an empty string.

Specified by:
getRowName in interface ChartModel
Overrides:
getRowName in class AbstractChartModel
Parameters:
row - the row being queried.
Returns:
a string containing the default name of row.

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

getValueAt

public Object getValueAt(int row,
                         int column)

setValueAt

public void setValueAt(Object value,
                       int row,
                       int column)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

getTableModel

protected TableModel getTableModel()
Gets the table model.

Returns:
the chart model.


Copyright © 2004 The Norther Organization. All rights reserved.