Class 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)
    • Field Summary

      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.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 interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.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.
      • setValueAt

        public void setValueAt​(java.lang.Object value,
                               int row,
                               int column)
        Set that value of a cell.
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.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)