|
Header
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.jfree.data.xy.XYDatasetTableModel
public class XYDatasetTableModel
A READ-ONLY wrapper around a TableXYDataset
to convert it to a
table model for use in a JTable. The first column of the table shows the
x-values, the remaining columns show the y-values for each series (series 0
appears in column 1, series 1 appears in column 2, etc).
TO DO:
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
XYDatasetTableModel()
Default constructor. |
|
XYDatasetTableModel(TableXYDataset dataset)
Creates a new table model based on the specified dataset. |
Method Summary | |
---|---|
void |
datasetChanged(DatasetChangeEvent event)
Receives notification that the underlying dataset has changed. |
int |
getColumnCount()
Gets the number of columns in the model. |
java.lang.String |
getColumnName(int column)
Returns the column name. |
int |
getRowCount()
Returns the number of rows. |
java.lang.Object |
getValueAt(int row,
int column)
Returns a value of the specified cell. |
boolean |
isCellEditable(int row,
int column)
Returns a flag indicating whether or not the specified cell is editable. |
void |
setModel(TableXYDataset dataset)
Sets the model (dataset). |
void |
setValueAt(java.lang.Object value,
int row,
int column)
Updates the XYDataset if allowed. |
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 |
---|
public XYDatasetTableModel()
public XYDatasetTableModel(TableXYDataset dataset)
dataset
- the dataset.Method Detail |
---|
public void setModel(TableXYDataset dataset)
dataset
- the dataset.public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
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 java.lang.Object getValueAt(int row, int column)
getValueAt
in interface javax.swing.table.TableModel
row
- the row number.column
- the column number.
public void datasetChanged(DatasetChangeEvent event)
datasetChanged
in interface DatasetChangeListener
event
- the eventDatasetChangeListener
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)
XYDataset
if allowed.
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
value
- the new value.row
- the row.column
- the column.
|
Footer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |