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.AbstractTableModel
The 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 void
addRow()
Add a row.void
deleteRow(int selectedRow)
Delete a row.int
getColumnCount()
Get the column count.java.lang.String
getColumnName(int column)
Get the column name.int
getRowCount()
Return the row count.java.lang.Object
getValueAt(int arg0, int arg1)
Get the value at a particular cell.boolean
isCellEditable(int rowIndex, int columnIndex)
Return true, indicating that the cell is editable.void
saveModel()
Save the model.void
setValueAt(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:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in 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:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in 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, NameDuplicationException
Save 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:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in 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)
-
-