org.norther.tammi.acorn.jfc
Class NamedArrayMapChartModel

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

public class NamedArrayMapChartModel
extends ComparableArrayMapChartModel

An array map chart model applying comparable array keys as named columns and separately named rows as row keys.

Version:
$Id: NamedArrayMapChartModel.java,v 1.3 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
NamedArrayMapChartModel(OrderedMap<Comparable<?>,?> map, Comparable<?>[] rows)
          Constructs a new model with named rows.
 
Method Summary
 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.ComparableArrayMapChartModel
getArrayMap, getColumnKey, getColumnName
 
Methods inherited from class org.norther.tammi.acorn.jfc.ArrayMapChartModel
getColumnCount, getRowCount, getValueAt, isCellEditable, isEditable, setEditable, 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

NamedArrayMapChartModel

public NamedArrayMapChartModel(OrderedMap<Comparable<?>,?> map,
                               Comparable<?>[] rows)
Constructs a new model with named rows.

Parameters:
map - the map of column arrays.
rows - the row keys column.
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 AbstractChartModel
Parameters:
row - the row being queried.
Returns:
a string containing the default name of row.

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 AbstractChartModel
Parameters:
row - the index of the row.
Returns:
the key of the row.


Copyright © 2004 The Norther Organization. All rights reserved.