| Method from org.jfree.data.xy.XYDatasetTableModel Detail: |
public void datasetChanged(DatasetChangeEvent event) {
fireTableDataChanged();
}
Receives notification that the underlying dataset has changed. |
public int getColumnCount() {
if (this.model == null) {
return 0;
}
return this.model.getSeriesCount() + 1;
}
Gets the number of columns in the model. |
public String getColumnName(int column) {
if (this.model == null) {
return super.getColumnName(column);
}
if (column < 1) {
return "X Value";
}
else {
return this.model.getSeriesKey(column - 1).toString();
}
}
|
public int getRowCount() {
if (this.model == null) {
return 0;
}
return this.model.getItemCount();
}
Returns the number of rows. |
public Object getValueAt(int row,
int column) {
if (this.model == null) {
return null;
}
if (column < 1) {
return this.model.getX(0, row);
}
else {
return this.model.getY(column - 1, row);
}
}
Returns a value of the specified cell.
Column 0 is the X axis, Columns 1 and over are the Y axis |
public boolean isCellEditable(int row,
int column) {
return false;
}
Returns a flag indicating whether or not the specified cell is editable. |
public void setModel(TableXYDataset dataset) {
this.model = dataset;
this.model.addChangeListener(this);
fireTableDataChanged();
}
Sets the model (dataset). |
public void setValueAt(Object value,
int row,
int column) {
if (isCellEditable(row, column)) {
// XYDataset only provides methods for reading a dataset...
}
}
|