The operation result tablemodel is used to display the parser and converter
results to the user.
| Method from org.jfree.report.modules.gui.converter.components.OperationResultTableModel Detail: |
public Class getColumnClass(int columnIndex) {
switch (columnIndex)
{
case COLUMN_SEVERITY: return Object.class;
case COLUMN_MESSAGE: return String.class;
case COLUMN_LINE: return Integer.class;
case COLUMN_COLUMN: return Integer.class;
default: throw new IndexOutOfBoundsException("The column index is invalid");
}
}
Returns Object.class regardless of columnIndex. |
public int getColumnCount() {
return COLUMN_NAMES.length;
}
Returns the number of columns in the model. A
JTable uses this method to determine how many columns it
should create and display by default. |
public String getColumnName(int column) {
return resources.getString(COLUMN_NAMES[column]);
}
Returns a default name for the column using spreadsheet conventions:
A, B, C, ... Z, AA, AB, etc. If column cannot be found,
returns an empty string. |
public int getRowCount() {
return data.length;
}
Returns the number of rows in the model. A
JTable uses this method to determine how many rows it
should display. This method should be quick, as it
is called frequently during rendering. |
public Object getValueAt(int rowIndex,
int columnIndex) {
switch (columnIndex)
{
case COLUMN_SEVERITY: return data[rowIndex].getSeverity();
case COLUMN_MESSAGE: return (data[rowIndex].getMessage());
case COLUMN_LINE: return new Integer(data[rowIndex].getLine());
case COLUMN_COLUMN: return new Integer(data[rowIndex].getColumn());
default: throw new IndexOutOfBoundsException("The column index is invalid");
}
}
Returns the value for the cell at columnIndex and
rowIndex. |
public void setData(OperationResult[] data) {
if (data == null)
{
throw new NullPointerException();
}
if (data.length == 0)
{
this.data = new OperationResult[0];
}
else
{
this.data = new OperationResult[data.length];
System.arraycopy(data, 0, this.data, 0, data.length);
fireTableDataChanged();
}
}
Sets the data for the tablemodel. |