Class ProgCheckAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.jmrit.symbolicprog.tabbedframe.ProgCheckAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public class ProgCheckAction extends javax.swing.AbstractAction
Check the names in an XML programmer file against the names.xml definitions- See Also:
XmlFile, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.swing.JPanel_who(package private) javax.swing.JFileChooserfci(package private) static java.util.regex.PatternffPattern(package private) static java.lang.StringffRegex(package private) static java.util.regex.PatternfrPattern(package private) static java.lang.StringfrRegex(package private) static java.util.regex.PatternnumericPattern(package private) static java.lang.StringnumericRegex
-
Constructor Summary
Constructors Constructor Description ProgCheckAction(java.lang.String s, javax.swing.JPanel who)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)(package private) static java.lang.StringcheckIncompleteComprehensive(java.io.File file)(package private) static java.lang.StringcheckMissingNames(java.io.File file)protected static voidexpandElement(org.jdom2.Element el, java.util.List<org.jdom2.Element> list)Find all of the display elements descending from this element.(package private) static booleanfunctionMapName(java.lang.String name)Check if the name is a function name, e.g.(package private) static org.jdom2.ElementreadFile(java.io.File file)Ask SAX to read and verify a file(package private) voidwarnIncompleteComprehensive(java.io.File file)Check for names in names.xml that are not in file(package private) voidwarnMissingNames(java.io.File file)Check for names in programer that are not in names.xml-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
fci
javax.swing.JFileChooser fci
-
_who
javax.swing.JPanel _who
-
numericRegex
static final java.lang.String numericRegex
- See Also:
- Constant Field Values
-
numericPattern
static volatile java.util.regex.Pattern numericPattern
-
ffRegex
static final java.lang.String ffRegex
- See Also:
- Constant Field Values
-
ffPattern
static volatile java.util.regex.Pattern ffPattern
-
frRegex
static final java.lang.String frRegex
- See Also:
- Constant Field Values
-
frPattern
static volatile java.util.regex.Pattern frPattern
-
-
Constructor Detail
-
ProgCheckAction
public ProgCheckAction(java.lang.String s, javax.swing.JPanel who)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
-
expandElement
protected static void expandElement(org.jdom2.Element el, java.util.List<org.jdom2.Element> list)
Find all of the display elements descending from this element.- Parameters:
el- the element to searchlist- the list that will be populated with the found elements
-
warnMissingNames
void warnMissingNames(java.io.File file)
Check for names in programer that are not in names.xml- Parameters:
file- A decoder definition XML file to be checked
-
checkMissingNames
static java.lang.String checkMissingNames(java.io.File file)
-
warnIncompleteComprehensive
void warnIncompleteComprehensive(java.io.File file)
Check for names in names.xml that are not in file- Parameters:
file- A decoder definition XML file to be checked
-
checkIncompleteComprehensive
static java.lang.String checkIncompleteComprehensive(java.io.File file)
-
functionMapName
static boolean functionMapName(java.lang.String name)
Check if the name is a function name, e.g. "F5 controls output 8" or "FL(f) controls output 14"- Parameters:
name- Possible function name to check- Returns:
- true if the input is a valid name
-
readFile
static org.jdom2.Element readFile(java.io.File file) throws org.jdom2.JDOMException, java.io.IOException
Ask SAX to read and verify a file- Parameters:
file- XML-formatted input file- Returns:
- root element if successful
- Throws:
org.jdom2.JDOMException- if file can't be parsedjava.io.IOException- if problems reading file
-
-