Class MyTableModel

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel

    class MyTableModel
    extends javax.swing.table.AbstractTableModel
    Table model class for watched expressions.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private SwingGui debugGui
      The debugger GUI.
      private java.util.List<java.lang.String> expressions
      List of watched expressions.
      private static long serialVersionUID
      Serializable magic number.
      private java.util.List<java.lang.String> values
      List of values from evaluated from expressions.
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      MyTableModel​(SwingGui debugGui)
      Creates a new MyTableModel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnCount()
      Returns the number of columns in the table (2).
      java.lang.String getColumnName​(int column)
      Returns the name of the given column.
      int getRowCount()
      Returns the number of rows in the table.
      java.lang.Object getValueAt​(int row, int column)
      Returns the value in the given cell.
      boolean isCellEditable​(int row, int column)
      Returns whether the given cell is editable.
      void setValueAt​(java.lang.Object value, int row, int column)
      Sets the value in the given cell.
      (package private) void updateModel()
      Re-evaluates the expressions in the table.
      • 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
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serializable magic number.
        See Also:
        Constant Field Values
      • debugGui

        private SwingGui debugGui
        The debugger GUI.
      • expressions

        private java.util.List<java.lang.String> expressions
        List of watched expressions.
      • values

        private java.util.List<java.lang.String> values
        List of values from evaluated from expressions.
    • Constructor Detail

      • MyTableModel

        public MyTableModel​(SwingGui debugGui)
        Creates a new MyTableModel.
    • Method Detail

      • getColumnCount

        public int getColumnCount()
        Returns the number of columns in the table (2).
      • getRowCount

        public int getRowCount()
        Returns the number of rows in the table.
      • getColumnName

        public java.lang.String getColumnName​(int column)
        Returns the name of the given column.
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • isCellEditable

        public boolean isCellEditable​(int row,
                                      int column)
        Returns whether the given cell is editable.
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int column)
        Returns the value in the given cell.
      • setValueAt

        public void setValueAt​(java.lang.Object value,
                               int row,
                               int column)
        Sets the value in the given cell.
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
      • updateModel

        void updateModel()
        Re-evaluates the expressions in the table.