|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
stella.jview.ParameterTableModel
public class ParameterTableModel
A class that represents a table model for parameters. Each entry in the
table is a parameter, thus its values may change. User edits are not
allowed. Value changes are only intended by changing parameter values.
As parameter do not notify if their value changes, a timer task is
scheduled to update the parameters. Displayed are the formatted strings,
if the parameter is a value, we justify to the right, triggers are
displayed as check boxes. All other parameters are using left-justified
labels, as is appropriate for text.
Each row has an TargetDefinition assigned to it,
the number of
available (thus observable) targets determine the number of rows. The column
headers are the names of the parameters. Note that the jtable associated
with this table model must override the getCellRenderer method
| Field Summary | |
|---|---|
private List |
columns
The list of parameters. |
private Object[][] |
data
The displayable data, a rowxcolumns array. |
private int |
observable
The number of currently observable targets. |
private Collection |
rows
The targets available. |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
ParameterTableModel(Collection targets,
List parameters)
Constructs a new table model. |
|
| Method Summary | |
|---|---|
Class |
getColumnClass(int col)
Returns the class object of the given column. |
int |
getColumnCount()
Returns the number of columns or the number of parameters. |
String |
getColumnName(int col)
Returns the name of the parameter constituing the given row. |
int |
getRowCount()
Returns the number of currently available targets. |
Object |
getValueAt(int row,
int col)
Returns the value to display on the given row number. |
void |
init()
Init simply assigns the data array. |
void |
setObservable(int valid)
Sets the refresh interval. |
void |
setValueAt(Object val,
int row,
int col)
Sets the table value at the given index. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Collection rows
private List columns
private Object[][] data
private int observable
| Constructor Detail |
|---|
public ParameterTableModel(Collection targets,
List parameters)
| Method Detail |
|---|
public void init()
init in interface Initializablepublic int getColumnCount()
getColumnCount in interface TableModelpublic int getRowCount()
setObservable(int).
getRowCount in interface TableModelpublic String getColumnName(int col)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic Class getColumnClass(int col)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModel
public Object getValueAt(int row,
int col)
getValueAt in interface TableModel
public void setValueAt(Object val,
int row,
int col)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic void setObservable(int valid)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||