Package jmri.jmrit.symbolicprog
Class ExtraMenuTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.symbolicprog.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
-
Constructor Summary
Constructors Constructor Description ExtraMenuTableModel(javax.swing.JLabel status, Programmer pProgrammer)
-
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 mindvoid
dispose()
protected void
flagIfOpsMode(java.lang.String mode)
int
getColumnCount()
java.lang.String
getIndividualElementName()
Name of the XML element for individual menu itemsjava.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 itemsjava.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 mindprotected 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
-
-
-
-
Field Detail
-
name
java.lang.String name
-
-
Constructor Detail
-
ExtraMenuTableModel
public ExtraMenuTableModel(javax.swing.JLabel status, Programmer pProgrammer)
-
-
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 classjava.lang.Object
-
setProgrammer
public void setProgrammer(Programmer p)
-
flagIfOpsMode
protected void flagIfOpsMode(java.lang.String mode)
-
hasOpsModeReset
public boolean hasOpsModeReset()
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
- Specified by:
getValueAt
in interfacejavax.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
-
performReset
protected void performReset(int row)
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.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 moderesetModes
- representation of reset modes availableavailableModes
- 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
-
dispose
public void dispose()
-
-