Class ExtraMenuTableModel

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

    public class ExtraMenuTableModel
    extends javax.swing.table.AbstractTableModel
    implements java.awt.event.ActionListener, java.beans.PropertyChangeListener
    Holds a table of the extra menu items available for a particular decoder.
    See Also:
    ResetTableModel, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String name  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)  
      (package private) boolean badModeOk​(java.lang.String currentMode, java.lang.String resetModes, java.lang.String availableModes)
      Can provide some mechanism to prompt for user for one last chance to change his/her mind
      void dispose()  
      protected void flagIfOpsMode​(java.lang.String mode)  
      int getColumnCount()  
      java.lang.String getIndividualElementName()
      Name of the XML element for individual menu items
      java.lang.String getName()  
      protected java.util.List<java.lang.String> getResetModeList​(org.jdom2.Element e, org.jdom2.Element p)  
      int getRowCount()  
      java.lang.String getTopLevelElementName()
      Name of the XML element for the collection of extra menu items
      java.lang.Object getValueAt​(int row, int col)  
      boolean hasOpsModeReset()  
      (package private) boolean opsResetOk()
      Can provide some mechanism to prompt for user for one last chance to change his/her mind
      protected void performReset​(int row)  
      void propertyChange​(java.beans.PropertyChangeEvent e)  
      void setName​(java.lang.String n)  
      void setProgrammer​(Programmer p)  
      void setRow​(int row, org.jdom2.Element e, org.jdom2.Element p, java.lang.String model)  
      java.lang.String toString()  
      • Methods inherited from class javax.swing.table.AbstractTableModel

        addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        java.lang.String name
    • Method Detail

      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String n)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • flagIfOpsMode

        protected void flagIfOpsMode​(java.lang.String mode)
      • 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
      • getValueAt

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

        public void setRow​(int row,
                           org.jdom2.Element e,
                           org.jdom2.Element p,
                           java.lang.String model)
      • getResetModeList

        protected java.util.List<java.lang.String> getResetModeList​(org.jdom2.Element e,
                                                                    org.jdom2.Element p)
      • getTopLevelElementName

        public java.lang.String getTopLevelElementName()
        Name of the XML element for the collection of extra menu items
        Returns:
        element name for top level menu item
      • getIndividualElementName

        public java.lang.String getIndividualElementName()
        Name of the XML element for individual menu items
        Returns:
        element name for individual menu item
      • 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
      • badModeOk

        boolean badModeOk​(java.lang.String currentMode,
                          java.lang.String resetModes,
                          java.lang.String availableModes)
        Can provide some mechanism to prompt for user for one last chance to change his/her mind
        Parameters:
        currentMode - current programming mode
        resetModes - representation of reset modes available
        availableModes - representation of available modes
        Returns:
        true if user says to continue
      • opsResetOk

        boolean opsResetOk()
        Can provide some mechanism to prompt for user for one last chance to change his/her mind
        Returns:
        true if user says to continue