public static class OpenFileAction.OpenFileTask extends PleaseWaitRunnable
Modifier and Type | Field and Description |
---|---|
private boolean |
canceled |
private Set<String> |
failedAll |
private FileFilter |
fileFilter |
private Set<String> |
fileHistory |
private List<File> |
files |
private boolean |
recordHistory |
private List<File> |
successfullyOpenedFiles |
progressMonitor
Constructor and Description |
---|
OpenFileAction.OpenFileTask(List<File> files,
FileFilter fileFilter) |
OpenFileAction.OpenFileTask(List<File> files,
FileFilter fileFilter,
String title) |
Modifier and Type | Method and Description |
---|---|
protected void |
alertFilesNotMatchingWithImporter(Collection<File> files,
FileImporter importer) |
protected void |
alertFilesWithUnknownImporter(Collection<File> files) |
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
List<File> |
getSuccessfullyOpenedFiles()
Replies the list of files that have been successfully opened.
|
void |
importData(FileImporter importer,
List<File> files) |
boolean |
isRecordHistory() |
protected void |
realRun()
Called in the worker thread to do the actual work.
|
void |
setRecordHistory(boolean recordHistory)
save filename in history (for list of recently opened files)
default: false
|
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
private final List<File> successfullyOpenedFiles
private final Set<String> fileHistory
private final FileFilter fileFilter
private boolean canceled
private boolean recordHistory
public OpenFileAction.OpenFileTask(List<File> files, FileFilter fileFilter, String title)
public OpenFileAction.OpenFileTask(List<File> files, FileFilter fileFilter)
public void setRecordHistory(boolean recordHistory)
public boolean isRecordHistory()
protected void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable
protected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
protected void alertFilesNotMatchingWithImporter(Collection<File> files, FileImporter importer)
protected void alertFilesWithUnknownImporter(Collection<File> files)
protected void realRun() throws SAXException, IOException, OsmTransferException
PleaseWaitRunnable
realRun
in class PleaseWaitRunnable
SAXException
IOException
OsmTransferException
public void importData(FileImporter importer, List<File> files)
public List<File> getSuccessfullyOpenedFiles()