Package jmri.jmrit.decoderdefn
Class InstallDecoderURLAction
java.lang.Object
javax.swing.AbstractAction
jmri.util.swing.JmriAbstractAction
jmri.jmrit.decoderdefn.InstallDecoderURLAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
- Direct Known Subclasses:
InstallDecoderFileAction
Install decoder definition from URL
- See Also:
-
Field Summary
FieldsFields inherited from class jmri.util.swing.JmriAbstractAction
context, hint, wiFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
ConstructorsConstructorDescriptionInstallDecoderURLAction(String s, Icon i, WindowInterface wi) InstallDecoderURLAction(String s, JPanel who) -
Method Summary
Modifier and TypeMethodDescriptionvoid(package private) boolean(package private) voidcopyAndInstall(URL from, JPanel who) (package private) boolean(package private) URL(package private) org.jdom2.ElementRead and verify an XML file.Methods inherited from class jmri.util.swing.JmriAbstractAction
dispose, setContext, setHint, setName, setParameter, setParameter, setWindowInterface, toStringMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
_who
-
-
Constructor Details
-
InstallDecoderURLAction
-
InstallDecoderURLAction
-
InstallDecoderURLAction
-
InstallDecoderURLAction
-
-
Method Details
-
pickURL
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJmriAbstractAction
-
copyAndInstall
-
copyfile
-
checkFile
-
readFile
Read and verify an XML file.- Parameters:
url- the URL of the file- Returns:
- the root element in the file
- Throws:
org.jdom2.JDOMException- if the file cannot be parsedIOException- if the file cannot be read
-
makePanel
- Specified by:
makePanelin classJmriAbstractAction
-