org.norther.tammi.acorn.jfc
Class RenamedChartModel

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

public class RenamedChartModel
extends ChartModelAdapter

A renamed chart model.

Version:
$Id: RenamedChartModel.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
RenamedChartModel(ChartModel model, List<Comparable<?>> columns, List<Comparable<?>> rows)
          Constructs a new model.
 
Method Summary
 Comparable<?> getColumnKey(int column)
          Gets the key of the indexed column.
 String getColumnName(int column)
           
 Comparable<?> getRowKey(int row)
          Gets the key of the indexed row.
 String getRowName(int row)
          Gets a default name for the row using spreadsheet conventions: 1, 2, 3, etc.
 
Methods inherited from class org.norther.tammi.acorn.jfc.ChartModelAdapter
getChartModel, getColumnCount, getColumnIndex, getRowCount, getRowIndex, getValueAt, isCellEditable, setValueAt
 
Methods inherited from class org.norther.tammi.acorn.jfc.AbstractChartModel
findColumnKey, findRow, findRowKey
 
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

RenamedChartModel

public RenamedChartModel(ChartModel model,
                         List<Comparable<?>> columns,
                         List<Comparable<?>> rows)
Constructs a new model.

Parameters:
model - the model.
columns - the column keys.
rows - the row keys.
Method Detail

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 ChartModelAdapter
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 ChartModelAdapter

getRowKey

public Comparable<?> getRowKey(int row)
Description copied from interface: ChartModel
Gets the key of the indexed row.

Specified by:
getRowKey in interface ChartModel
Overrides:
getRowKey in class ChartModelAdapter
Parameters:
row - the index of the row.
Returns:
the key of the row.

getColumnKey

public Comparable<?> getColumnKey(int column)
Description copied from interface: ChartModel
Gets the key of the indexed column.

Specified by:
getColumnKey in interface ChartModel
Overrides:
getColumnKey in class ChartModelAdapter
Parameters:
column - the index of the column.
Returns:
the key of the column.


Copyright © 2004 The Norther Organization. All rights reserved.