kea.programs.jPrimrose
Class ReportGraphTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by kea.programs.jPrimrose.ReportGraphTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public final class ReportGraphTableModel
extends javax.swing.table.AbstractTableModel

Table model for report graph-table.

Version:
2.17.
Author:
Kevin Ashelford.
See Also:
Serialized Form

Field Summary
static kea.programs.plot.CoordinateCollection[] NULL_DATA
          Null data for displaying in table.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ReportGraphTableModel()
          Creates a new instance of class.
 
Method Summary
 java.lang.Class getColumnClass(int columnIndex)
          Overridden AbstractTableModel method.
 int getColumnCount()
          Implementation of AbstractTableModel method.
 java.lang.String getColumnName(int columnIndex)
          Overridden AbstractTableModel method.
 int getRowCount()
          Implementaion of AbstractTableModel method.
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Implementation of AstractTableModel method.
 void setColumnWidths(javax.swing.JTable table)
          Sets widths of columns.
 void updateModel(kea.programs.plot.CoordinateCollection[] collections)
          Update model with new data for display.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_DATA

public static final kea.programs.plot.CoordinateCollection[] NULL_DATA
Null data for displaying in table.

Constructor Detail

ReportGraphTableModel

public ReportGraphTableModel()
Creates a new instance of class.

Method Detail

updateModel

public void updateModel(kea.programs.plot.CoordinateCollection[] collections)
Update model with new data for display.

Parameters:
collections - Array of CoordinateCollection objects containing data to display.

getColumnCount

public int getColumnCount()
Implementation of AbstractTableModel method.

Returns:
Number of columns.

getRowCount

public int getRowCount()
Implementaion of AbstractTableModel method.

Returns:
Number of rows.

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Implementation of AstractTableModel method.

Parameters:
rowIndex - Row index number for cell.
columnIndex - Column index number for cell.
Returns:
Object.

getColumnName

public java.lang.String getColumnName(int columnIndex)
Overridden AbstractTableModel method.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
columnIndex - Column index number.
Returns:
Column name as a String.

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Overridden AbstractTableModel method.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
columnIndex - Column index number.
Returns:
Class object for column.

setColumnWidths

public void setColumnWidths(javax.swing.JTable table)
Sets widths of columns.

Parameters:
table - JTable object within which columns will be displayed.