public class TimeSeriesTableModel extends javax.swing.table.AbstractTableModel implements SeriesChangeListener
JTable
.Constructor and Description |
---|
TimeSeriesTableModel()
Default constructor.
|
TimeSeriesTableModel(TimeSeries series)
Constructs a table model for a time series.
|
TimeSeriesTableModel(TimeSeries series,
boolean editable)
Creates a table model based on a time series.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getColumnClass(int column)
Returns the column class in the table model.
|
int |
getColumnCount()
Returns the number of columns in the table model.
|
java.lang.String |
getColumnName(int column)
Returns the name of a column
|
int |
getRowCount()
Returns the number of rows in the table model.
|
java.lang.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(java.lang.Object value,
int row,
int column)
Updates the time series.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public TimeSeriesTableModel()
public TimeSeriesTableModel(TimeSeries series)
series
- the time series.public TimeSeriesTableModel(TimeSeries series, boolean editable)
series
- the time series.editable
- if true
, the table is editable.public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.Class getColumnClass(int column)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
column
- the column index.public java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
column
- the column index.public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int row, int column)
getValueAt
in interface javax.swing.table.TableModel
row
- the row number.column
- the column number.public boolean isCellEditable(int row, int column)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- the row number.column
- the column number.true
if the specified cell is editable.public void setValueAt(java.lang.Object value, int row, int column)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
value
- the new value.row
- the row.column
- the column.public void seriesChanged(SeriesChangeEvent event)
seriesChanged
in interface SeriesChangeListener
event
- the event.