|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.problets.domain.model.variable.aggregate.ArrayTableModel
public class ArrayTableModel
Class: ArrayTableModel Purpose: The TableModel for class ArrayView's JTable component. It acts as an intermediate class between ArrayView's ArrayModel and JTable.
Constructor Summary | |
---|---|
ArrayTableModel(ArrayModel inModel,
boolean isEditable)
Creates the table model |
Method Summary | |
---|---|
java.lang.Class |
getColumnClass(int col)
gets the class of a given column for the table. |
int |
getColumnCount()
gets the number of columns in the table that this table model works for. |
java.lang.String |
getColumnName(int col)
returns the name of a column in the table |
java.lang.String |
getNameAt(int row,
int col)
Returns the name of a variable in the ArrayModel reference |
int |
getRowCount()
gets the number of rows in the table that this table model works for. |
java.lang.Object |
getValueAt(int row,
int col)
Gets the value for a certain cell in the table this class works for from the corresponding element in the ArrayModel reference. |
AbstractVarModel |
getVariableAt(int row,
int col)
Returns a variable from this class's ArrayModel reference at the given row and column. |
boolean |
isCellEditable(int row,
int col)
Returns true if the cell at the row and column specified is editable |
static void |
main(java.lang.String[] args)
For debugging |
void |
setValueAt(java.lang.Object inValue,
int row,
int col)
Used by a table to assign a new value to one of its cell's variables at the given row and column. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArrayTableModel(ArrayModel inModel, boolean isEditable)
inModel
- The array that this TableModel gets it's values fromisEditable
- true if the table that this table model works with is editableMethod Detail |
---|
public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
- the column in the table to get the name for
public int getColumnCount()
public java.lang.Class getColumnClass(int col)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
col
- the index of the column to get the class of
public int getRowCount()
public AbstractVarModel getVariableAt(int row, int col)
row
- the index of the rowcol
- the index of the column
public java.lang.Object getValueAt(int row, int col)
row
- the index of the rowcol
- the index of the column
public java.lang.String getNameAt(int row, int col)
row
- the index of the rowcol
- the index of the column
public boolean isCellEditable(int row, int col)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- the index of the rowcol
- the index of the column
public void setValueAt(java.lang.Object inValue, int row, int col)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
inValue
- the new value for the variablerow
- the index of the rowcol
- the index of the columnpublic static void main(java.lang.String[] args)
args
- the arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |