Package ptolemy.vergil.scr
Class ModeTransitionTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- ptolemy.vergil.scr.ModeTransitionTableModel
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.table.TableModel
public class ModeTransitionTableModel extends javax.swing.table.AbstractTableModelThe mode transition table for configuring an SCR Model.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Patricia Derler
- See Also:
- Serialized Form
- Pt.AcceptedRating:
- Red (pd)
- Pt.ProposedRating:
- Red (pd)
-
-
Constructor Summary
Constructors Constructor Description ModeTransitionTableModel(FSMActor model)Construct the mode transition table for configuring an SCR Model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRow()Add a row.voiddeleteRow(int selectedRow)Delete a row.intgetColumnCount()Get the column count.java.lang.StringgetColumnName(int column)Get the column name.intgetRowCount()Return the row count.java.lang.ObjectgetValueAt(int arg0, int arg1)Get the value at a particular cell.booleanisCellEditable(int rowIndex, int columnIndex)Return true, indicating that the cell is editable.voidsaveModel()Save the model.voidsetValueAt(java.lang.Object value, int row, int column)Set that value of a cell.-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Constructor Detail
-
ModeTransitionTableModel
public ModeTransitionTableModel(FSMActor model)
Construct the mode transition table for configuring an SCR Model.- Parameters:
model- The model.
-
-
Method Detail
-
addRow
public void addRow()
Add a row.
-
deleteRow
public void deleteRow(int selectedRow)
Delete a row.- Parameters:
selectedRow- The row to be deleted.
-
getColumnCount
public int getColumnCount()
Get the column count.- Returns:
- In this base class, always return 3.
-
getColumnName
public java.lang.String getColumnName(int column)
Get the column name.- Specified by:
getColumnNamein interfacejavax.swing.table.TableModel- Overrides:
getColumnNamein classjavax.swing.table.AbstractTableModel- Parameters:
column- The column number.- Returns:
- the name of the column.
-
getRowCount
public int getRowCount()
Return the row count.- Returns:
- the row count
-
getValueAt
public java.lang.Object getValueAt(int arg0, int arg1)Get the value at a particular cell.- Parameters:
arg0- The row.arg1- The column.- Returns:
- the value at that cell.
- See Also:
setValueAt(Object, int, int)
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)Return true, indicating that the cell is editable.- Specified by:
isCellEditablein interfacejavax.swing.table.TableModel- Overrides:
isCellEditablein classjavax.swing.table.AbstractTableModel- Parameters:
rowIndex- The rowIndex, which is ignored in this base class.columnIndex- The columnIndex, which is ignored in this base class.- Returns:
- Always return true.
-
saveModel
public void saveModel() throws IllegalActionException, NameDuplicationExceptionSave the model.- Throws:
IllegalActionException- If thrown while saving the model.NameDuplicationException- If thrown while saving the model.
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int column)Set that value of a cell.- Specified by:
setValueAtin interfacejavax.swing.table.TableModel- Overrides:
setValueAtin classjavax.swing.table.AbstractTableModel- Parameters:
value- The value to be set.row- The index of the row.column- The index of the column.- See Also:
getValueAt(int, int)
-
-