elge.storage.file
Class DataRecordCategoryDataset

java.lang.Object
  |
  +--com.jrefinery.data.AbstractDataset
        |
        +--elge.storage.file.DataRecordCategoryDataset
All Implemented Interfaces:
com.jrefinery.data.CategoryDataset, com.jrefinery.data.Dataset, DataStorageDataset, com.jrefinery.data.KeyedValues2D, com.jrefinery.data.Values2D

public class DataRecordCategoryDataset
extends com.jrefinery.data.AbstractDataset
implements com.jrefinery.data.CategoryDataset, DataStorageDataset

Author:
Palino

Constructor Summary
DataRecordCategoryDataset(DataRecorder dr)
           
DataRecordCategoryDataset(DataRecorder dr, List property)
           
DataRecordCategoryDataset(DataRecorder dr, String property)
           
 
Method Summary
 void addSeries(DataReader dr)
           
 int getColumnCount()
          Returns the number of columns in the table.
 int getColumnIndex(Comparable key)
          Returns the column index for a given key.
 Comparable getColumnKey(int column)
          Returns a column key.
 List getColumnKeys()
          Returns the column keys.
 int getRowCount()
          Returns the number of rows in the table.
 int getRowIndex(Comparable key)
          Returns the row index for a given key.
 Comparable getRowKey(int row)
          Returns a row key.
 List getRowKeys()
          Returns the row keys.
 Number getValue(Comparable rowKey, Comparable columnKey)
          Returns the value for a pair of keys.
 Number getValue(int row, int column)
          Returns a value from the table.
 void update()
          Notifies the listeners, that the data has been updates.
 
Methods inherited from class com.jrefinery.data.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jrefinery.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
 

Constructor Detail

DataRecordCategoryDataset

public DataRecordCategoryDataset(DataRecorder dr)

DataRecordCategoryDataset

public DataRecordCategoryDataset(DataRecorder dr,
                                 String property)

DataRecordCategoryDataset

public DataRecordCategoryDataset(DataRecorder dr,
                                 List property)
Method Detail

addSeries

public void addSeries(DataReader dr)

getColumnCount

public int getColumnCount()
Returns the number of columns in the table.

Specified by:
getColumnCount in interface com.jrefinery.data.Values2D
Returns:
the column count.

getColumnIndex

public int getColumnIndex(Comparable key)
Returns the column index for a given key.

Specified by:
getColumnIndex in interface com.jrefinery.data.KeyedValues2D
Parameters:
key - the column key.
Returns:
the column index.

getColumnKey

public Comparable getColumnKey(int column)
Returns a column key.

Specified by:
getColumnKey in interface com.jrefinery.data.KeyedValues2D
Parameters:
column - the column index (zero-based).
Returns:
the column key.

getColumnKeys

public List getColumnKeys()
Returns the column keys.

Specified by:
getColumnKeys in interface com.jrefinery.data.KeyedValues2D
Returns:
the keys.

getRowCount

public int getRowCount()
Returns the number of rows in the table.

Specified by:
getRowCount in interface com.jrefinery.data.Values2D
Returns:
the row count.

getRowIndex

public int getRowIndex(Comparable key)
Returns the row index for a given key.

Specified by:
getRowIndex in interface com.jrefinery.data.KeyedValues2D
Parameters:
key - the row key.
Returns:
the row index.

getRowKey

public Comparable getRowKey(int row)
Returns a row key.

Specified by:
getRowKey in interface com.jrefinery.data.KeyedValues2D
Parameters:
row - the row index (zero-based).
Returns:
the row key.

getRowKeys

public List getRowKeys()
Returns the row keys.

Specified by:
getRowKeys in interface com.jrefinery.data.KeyedValues2D
Returns:
the keys.

getValue

public Number getValue(Comparable rowKey,
                       Comparable columnKey)
Returns the value for a pair of keys.

This method should return null if either of the keys is not found.

Specified by:
getValue in interface com.jrefinery.data.KeyedValues2D
Parameters:
rowKey - the row key.
columnKey - the column key.
Returns:
the value.

getValue

public Number getValue(int row,
                       int column)
Returns a value from the table.

Specified by:
getValue in interface com.jrefinery.data.Values2D
Parameters:
row - the row index (zero-based).
column - the column index (zero-based).
Returns:
the value (possibly null).

update

public void update()
Description copied from interface: DataStorageDataset
Notifies the listeners, that the data has been updates.

Specified by:
update in interface DataStorageDataset