UniVista.beans
Class ArrayVariableDisplay.ArrayVariableTableModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--UniVista.beans.ArrayVariableDisplay.ArrayVariableTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Enclosing class:
ArrayVariableDisplay

protected class ArrayVariableDisplay.ArrayVariableTableModel
extends javax.swing.table.AbstractTableModel

the table model for a variable object. The two viewable dimensions of a variable will be displayed such that the index that occurs first is the column number and the dimension that occurs second will be the row number. Thus a(1,3) would occur in the first column, third row.

See Also:
Serialized Form

Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
protected ArrayVariableDisplay.ArrayVariableTableModel()
           
 
Method Summary
 java.lang.Class getColumnClass(int column)
          return the class of a column
 int getColumnCount()
          return the number of columns for the table.
 java.lang.String getColumnName(int column)
          return the column name as the fortran-1 based array index
 int getRowCount()
          return the number of rows for the table.
 java.lang.Object getValueAt(int row, int column)
          return the value at a specified location
 boolean isCellEditable(int rowIndex, int columnIndex)
          indicate that all cells are editable excpet for those in the first column if they're being used as labels
 void setValueAt(java.lang.Object obj, int row, int column)
          set the appropriate element of the ArrayWrapper
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayVariableDisplay.ArrayVariableTableModel

protected ArrayVariableDisplay.ArrayVariableTableModel()
Method Detail

getRowCount

public int getRowCount()
return the number of rows for the table. Determined from the second displayed dimension
Overrides:
getRowCount in class javax.swing.table.AbstractTableModel

getColumnCount

public int getColumnCount()
return the number of columns for the table. Determined from the first displayed dimension.
Overrides:
getColumnCount in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
indicate that all cells are editable excpet for those in the first column if they're being used as labels
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getColumnName

public java.lang.String getColumnName(int column)
return the column name as the fortran-1 based array index
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
return the value at a specified location
Overrides:
getValueAt in class javax.swing.table.AbstractTableModel

getColumnClass

public java.lang.Class getColumnClass(int column)
return the class of a column
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

setValueAt

public void setValueAt(java.lang.Object obj,
                       int row,
                       int column)
set the appropriate element of the ArrayWrapper
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel