Package jmri.jmrit
Class XmlFileCheckAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.util.swing.JmriAbstractAction
-
- jmri.jmrit.XmlFileCheckAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public class XmlFileCheckAction extends JmriAbstractAction
Make sure an XML file is readable, without doing a DTD or Schema validation.- See Also:
XmlFile,XmlFileValidateAction, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlFileCheckAction(java.lang.String s, java.awt.Component who)XmlFileCheckAction(java.lang.String s, WindowInterface wi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)JmriPanelmakePanel()(package private) voidreadFile(java.io.File file)Read and verify a file is XML.-
Methods inherited from class jmri.util.swing.JmriAbstractAction
dispose, setContext, setHint, setName, setParameter, setParameter, setWindowInterface, toString
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
XmlFileCheckAction
public XmlFileCheckAction(java.lang.String s, java.awt.Component who)
-
XmlFileCheckAction
public XmlFileCheckAction(java.lang.String s, WindowInterface wi)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classJmriAbstractAction
-
readFile
void readFile(java.io.File file) throws org.jdom2.JDOMException, java.io.IOException
Read and verify a file is XML.- Parameters:
file- the file to read- Throws:
org.jdom2.JDOMException- if file is not XMLjava.io.IOException- if unable to read file
-
makePanel
public JmriPanel makePanel()
- Specified by:
makePanelin classJmriAbstractAction
-
-