Class CvTableModel

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.swing.table.TableModel

    public class CvTableModel
    extends javax.swing.table.AbstractTableModel
    implements java.awt.event.ActionListener, java.beans.PropertyChangeListener
    Table data model for display of CvValues in symbolic programmer.

    This represents the contents of a single decoder, so the Programmer used to access it is a data member.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int MAXCVNUM  
      static int NUMCOLUMN  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      CvTableModel​(javax.swing.JLabel status, Programmer pProgrammer)  
    • Method Detail

      • allCvMap

        public java.util.HashMap<java.lang.String,​CvValueallCvMap()
      • getProgrammer

        public Programmer getProgrammer()
        Gives access to the programmer used to reach these CVs, so you can check on mode, capabilities, etc.
        Returns:
        Programmer object for the CVs
      • getRowCount

        public int getRowCount()
        Specified by:
        getRowCount in interface javax.swing.table.TableModel
      • getColumnCount

        public int getColumnCount()
        Specified by:
        getColumnCount in interface javax.swing.table.TableModel
      • getColumnName

        public java.lang.String getColumnName​(int col)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • getColumnClass

        public java.lang.Class<?> getColumnClass​(int col)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • isCellEditable

        public boolean isCellEditable​(int row,
                                      int col)
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
      • getName

        public java.lang.String getName​(int row)
      • getValString

        public java.lang.String getValString​(int row)
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int col)
        Specified by:
        getValueAt in interface javax.swing.table.TableModel
      • setValueAt

        public void setValueAt​(java.lang.Object value,
                               int row,
                               int col)
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent e)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • addCV

        public void addCV​(java.lang.String s,
                          boolean readOnly,
                          boolean infoOnly,
                          boolean writeOnly)
      • registerCvToVariableMapping

        public void registerCvToVariableMapping​(java.lang.String cv,
                                                java.lang.String variableName)
        Register a VariableValue in a common store mapping CV numbers to variable names. This is for use by e.g. a CVTable to show tooltips efficiently.
        Parameters:
        cv - specific CV number that the variable references
        variableName - from the variable being defined
      • getCvToVariableMapping

        public java.util.Set<java.lang.String> getCvToVariableMapping​(java.lang.String cv)