public class OpenFileAction extends DiskAccessAction
Modifier and Type | Class and Description |
---|---|
static class |
OpenFileAction.OpenFileTask
Task to open files.
|
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
Modifier and Type | Field and Description |
---|---|
static ExtensionFileFilter |
URL_FILE_FILTER
The
ExtensionFileFilter matching .url files |
sc
Constructor and Description |
---|
OpenFileAction()
Create an open action.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
static void |
openFiles(java.util.List<java.io.File> fileList)
Open a list of files.
|
static void |
openFiles(java.util.List<java.io.File> fileList,
boolean recordHistory)
Open a list of files.
|
protected void |
updateEnabledState()
Override in subclasses to update the enabled state of the action when
something in the JOSM state changes, i.e.
|
createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser
destroy, getCurrentDataSet, getEditLayer, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setTooltip, updateEnabledState, updateEnabledStateOnCurrentSelection, waitFuture
public static final ExtensionFileFilter URL_FILE_FILTER
ExtensionFileFilter
matching .url filespublic OpenFileAction()
public void actionPerformed(java.awt.event.ActionEvent e)
protected void updateEnabledState()
JosmAction
JosmAction.updateEnabledState(Collection)
to respond to changes in the collection
of selected primitives.
Default behavior is empty.updateEnabledState
in class JosmAction
JosmAction.updateEnabledState(Collection)
,
JosmAction.initEnabledState()
,
JosmAction.listenToLayerChange()
public static void openFiles(java.util.List<java.io.File> fileList)
fileList
- A list of filespublic static void openFiles(java.util.List<java.io.File> fileList, boolean recordHistory)
fileList
- A list of filesrecordHistory
- true
to save filename in history (default: false)