org.norther.tammi.acorn.jfc
Class NamedArrayMapChartModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.norther.tammi.acorn.jfc.AbstractChartModel
org.norther.tammi.acorn.jfc.ArrayMapChartModel
org.norther.tammi.acorn.jfc.ComparableArrayMapChartModel
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
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 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 |
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.
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.