class LoadXMLAction extends AbstractAction
Modifier and Type | Field and Description |
---|---|
private static Logger |
LOG
use to log messages
|
private JFileChooser |
mChooser
the file chooser - configured to allow only the selection of a
single file.
|
private XMLFileHandler |
mHandler
the content handler
|
private JFrame |
mParent
the parent frame
|
private XMLReader |
mParser
parser to read XML files
|
changeSupport, enabled
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 and Description |
---|
LoadXMLAction(JFrame aParent,
MyTableModel aModel)
Creates a new
LoadXMLAction instance. |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent aIgnore)
Prompts the user for a file to load events from.
|
private int |
loadFile(String aFile)
Loads the contents of file into the model
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
private final JFileChooser mChooser
private final XMLFileHandler mHandler
LoadXMLAction(JFrame aParent, MyTableModel aModel) throws SAXException, ParserConfigurationException
LoadXMLAction
instance.aParent
- the parent frameaModel
- the model to add events toSAXException
- if an error occursParserConfigurationException
- if an error occurspublic void actionPerformed(ActionEvent aIgnore)
aIgnore
- an ActionEvent
valueprivate int loadFile(String aFile) throws SAXException, IOException
aFile
- the file to extract events fromSAXException
- if an error occursIOException
- if an error occursWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses