com.jstatcom.table
Class JSCNArrayTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.jstatcom.table.JSCAbstractTableModel
          extended by com.jstatcom.table.JSCNArrayTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class JSCNArrayTableModel
extends JSCAbstractTableModel

Implementation of JSCAbstractTableModel for JSCNArray data objects. It takes the transposed property into account.

Author:
Markus Kraetzig
See Also:
Serialized Form

Constructor Summary
JSCNArrayTableModel(Symbol symbol)
          Constructs a table model for a symbol of type JSCTypes.NARRAY.
 
Method Summary
 java.lang.Class<java.lang.Double> getColumnClass(int columnIndex)
          Returns the Double.class regardless of columnIndex.
 int getColumnCount()
           
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
          The data model is editable.
 
Methods inherited from class com.jstatcom.table.JSCAbstractTableModel
getColIndexEditableMap, getJSCData, getRowIndexEditableMap, isCellEditable, isEditable, setColEditableMap, setEditable, setRowEditableMap
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSCNArrayTableModel

public JSCNArrayTableModel(Symbol symbol)
Constructs a table model for a symbol of type JSCTypes.NARRAY. The argument can be null.

Parameters:
symbol - must be of type JSCTypes.NARRAY, can be null
Throws:
java.lang.IllegalArgumentException - if (symbol.type != JSCTypes.NARRAY)
Method Detail

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
The data model is editable. This method sets a value in the underlying data.

Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
Parameters:
aValue - must be a Double
rowIndex - the row index, will be treated with taking transposed into account
columnIndex - the column index, will be treated with taking transposed into account
Throws:
java.lang.IllegalArgumentException - if (!aValue instanceof Double)

getColumnClass

public java.lang.Class<java.lang.Double> getColumnClass(int columnIndex)
Returns the Double.class regardless of columnIndex.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
columnIndex - ignored
Returns:
Double.class