org.jfree.data.time
Class TimeSeriesTableModel
AbstractTableModel
org.jfree.data.time.TimeSeriesTableModel
- EventListener, SeriesChangeListener
extends AbstractTableModel
Wrapper around a time series to convert it to a table model for use in
a JTable
.
Class | getColumnClass(int column) - Returns the column class in the table model.
|
int | getColumnCount() - Returns the number of columns in the table model.
|
String | getColumnName(int column) - Returns the name of a column
|
int | getRowCount() - Returns the number of rows in the table model.
|
Object | getValueAt(int row, int column) - Returns the data value for a cell in the table model.
|
boolean | isCellEditable(int row, int column) - Returns a flag indicating whether or not the specified cell is editable.
|
void | seriesChanged(SeriesChangeEvent event) - Receives notification that the time series has been changed.
|
void | setValueAt(Object value, int row, int column) - Updates the time series.
|
TimeSeriesTableModel
public TimeSeriesTableModel(TimeSeries series,
boolean editable)
Creates a table model based on a time series.
series
- the time series.editable
- if true, the table is editable.
getColumnClass
public Class getColumnClass(int column)
Returns the column class in the table model.
column
- The column index.
- The column class in the table model.
getColumnCount
public int getColumnCount()
Returns the number of columns in the table model. For this particular
model, the column count is fixed at 2.
getColumnName
public String getColumnName(int column)
Returns the name of a column
column
- the column index.
getRowCount
public int getRowCount()
Returns the number of rows in the table model.
getValueAt
public Object getValueAt(int row,
int column)
Returns the data value for a cell in the table model.
row
- the row number.column
- the column number.
- The data value for a cell in the table model.
isCellEditable
public boolean isCellEditable(int row,
int column)
Returns a flag indicating whether or not the specified cell is editable.
row
- the row number.column
- the column number.
true
if the specified cell is editable.
setValueAt
public void setValueAt(Object value,
int row,
int column)
Updates the time series.
value
- the new value.row
- the row.column
- the column.