public class VariableTable
extends javax.swing.table.AbstractTableModel
Implements a table for storing variables for a dataset
Constructor and Description |
---|
VariableTable(Dataset data,
javax.swing.JPanel parent)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getColumnClass(int c)
Gets the class of a given column
|
int |
getColumnCount()
Gets the number of columns
|
java.lang.String |
getColumnName(int col)
Gets the name of a given column
|
java.lang.Object[][] |
getData()
Returns the data array
|
int |
getRowCount()
Gets the number of rows
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value of a cell
|
boolean |
isCellEditable(int row,
int col)
Is a cell editable?
|
void |
setData(java.lang.Object[][] data)
Sets the data array
|
void |
setValueAt(java.lang.Object value,
int row,
int col)
Sets the value of a cell
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public VariableTable(Dataset data, javax.swing.JPanel parent)
Constructor
data
- Datasetparent
- Parent framepublic int getRowCount()
Gets the number of rows
public int getColumnCount()
Gets the number of columns
public java.lang.String getColumnName(int col)
Gets the name of a given column
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
- Index of the columnpublic java.lang.Class getColumnClass(int c)
Gets the class of a given column
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
c
- Index of the columnpublic boolean isCellEditable(int row, int col)
Is a cell editable?
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- Row of the cellcol
- Column of the cellpublic java.lang.Object getValueAt(int rowIndex, int columnIndex)
Returns the value of a cell
rowIndex
- Row of the cellcolumnIndex
- Column of the cellpublic java.lang.Object[][] getData()
Returns the data array
public void setData(java.lang.Object[][] data)
Sets the data array
data
- Object[][] New data arraypublic void setValueAt(java.lang.Object value, int row, int col)
Sets the value of a cell
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
value
- value to set.row
- Row of the cellcol
- Column of the cell